Skip to content

fitiha/SnapLink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnapLink logo

SnapLink

Share links, text and images between your phone and PC — instantly, privately, no accounts.

FeaturesHow It WorksSecuritySelf-HostContribute

License Manifest V3 Encryption PRs Welcome


The Story

My PC lags. Like, noticeably, annoyingly lags — especially when I open heavy apps. And for the longest time, the way I shared links and photos between my phone and PC was opening Telegram, sending it to "Saved Messages", switching to my PC, opening Telegram (which by itself takes a few seconds and eats RAM), grabbing the link, then going back to delete it so my saved messages don't become a dumping ground. Every. Single. Time.

At some point I got fed up and thought — there has to be a dedicated tool for this.

Why Not Use What Already Exists?

I looked. Here's what I found:

Tool Issue
Pushbullet Pretty much abandoned. Free tier capped at 100 pushes/month, requires an account, your data goes through their servers.
KDE Connect Great if you're on KDE + Android + same WiFi. I'm not on KDE, and same-network requirement adds friction.
Join (joaoapps) Needs a Google account, routes through their backend, Android + Chrome only.
Apple Handoff Beautiful — if you own an iPhone, iPad, Mac, and iCloud. I don't.
Phone Link (Microsoft) Windows + Android, Bluetooth pairing, way too heavy for "send a link."

Either platform-locked, account-required, too heavy, questionable privacy, or just not the simple thing I needed. None of them were: open → tap → done.

So I built SnapLink.

The Problem It Solves

Sharing a link between your phone and PC shouldn't involve opening a social media app. But that's what most people do:

  • Telegram / WhatsApp "Saved Messages" → wastes time, eats RAM (Telegram's Electron app is not light), forces you to delete the message after, and you get distracted by notifications while you're there.
  • Emailing yourself → nobody talks about this but people do it. It's slow, feels weird, and clutters your inbox.
  • WhatsApp Web, iMessage, etc. → you're routing through a social platform to do something that has nothing to do with social interaction.

SnapLink cuts all of that out. Phone and PC talk through a WebSocket relay. A link, some text, a photo — it's there instantly. No account, no phone app to install (it's a PWA), no cleanup.


Features

🖥️ Browser Extension

Feature Description
Send current tab One click sends whatever page you're on to your phone
Send text or links Type or paste anything and send it
Send images Paste an image (Ctrl+V) — gets compressed and sent
Pin messages Keep important links pinned at the top
Delete / Clear Remove individual messages or clear everything
Auto-copy Received messages from phone → auto-copied to clipboard
Desktop notifications Notified when something arrives from your phone
Auto-reconnect Connection drops? Reconnects silently in the background

📱 Mobile PWA

Feature Description
No install Runs in any mobile browser, or add to home screen as an app
Saved browsers Remembers every browser you've paired — tap to reconnect
Rename connections Label each one: "Work PC", "Home Laptop", etc.
Built-in QR scanner Scan from the top-right icon to pair a new browser
Send to PC Type or paste links/text from your phone
Open links Tap to open received links directly in your phone browser
Copy with one tap Copy anything to your phone clipboard
Install prompt Download icon appears when the PWA is ready to install
Auto-reconnect Handles connection drops silently
E2E encrypted Everything encrypted before it leaves your device

How It Works

┌──────────────┐         ┌──────────────────┐         ┌──────────────┐
│   Extension  │ ──E2E──▶│   Relay Server   │◀──E2E── │  Phone PWA   │
│   (PC)       │         │  (sees nothing)  │         │  (Mobile)    │
└──────────────┘         └──────────────────┘         └──────────────┘
       │                                                       ▲
       └── QR code contains room ID + encryption key ──────────┘
           (key is in URL fragment — never sent to server)
  1. Install the browser extension
  2. Open snaplink-teal.vercel.app on your phone
  3. Scan the QR code from the extension — done. You're paired.

The pairing is saved on your phone. You never need to scan again.


Security

This was something I took seriously. The whole point is sharing things you'd normally send privately.

How encryption works

When the extension installs, it generates:

  • A room ID — 16-character cryptographically random hex (crypto.getRandomValues())
  • An encryption key — 256-bit AES-GCM key

Both go into the QR code. The key is placed in the URL fragment (#key=...). URL fragments are never sent to any server by design — the key travels from extension → QR pixels → phone camera. It never touches a network.

Every message is encrypted with AES-256-GCM before leaving the device. The relay server only sees ciphertext. Even if someone joined your room, they'd get garbled data they can't use.

Transparency

What Where
Relay server code server/index.js — ~70 lines
Encryption logic extension/crypto.js + mobile/public/app.js
Data collected None. No accounts, no logging, no analytics.

Tech Stack

Component Technology
Browser extension Manifest V3, vanilla JS, WebCrypto API
Mobile PWA HTML / CSS / JS, installable, works offline
Relay server Node.js + ws library
PWA hosting Vercel
Server hosting Render

Self-Hosting

The server is about 70 lines. Run your own:

cd server
npm install
node index.js

Then update the WebSocket URL in:

  • extension/background.js
  • mobile/public/app.js

Change wss://snaplink-makx.onrender.com to your server's URL.


Project Structure

SnapLink/
├── extension/           # Browser extension (Chrome/Edge/Firefox)
│   ├── manifest.json    # Extension manifest (MV3)
│   ├── background.js    # Service worker — WebSocket + encryption
│   ├── popup.html       # Extension popup UI
│   ├── popup.js         # Popup logic
│   ├── crypto.js        # Shared encryption module
│   ├── icon.svg         # Vector logo
│   └── icon-*.png       # Rasterized icons (16/48/128)
├── mobile/
│   ├── public/          # PWA files served by Vercel
│   │   ├── index.html   # Mobile app UI
│   │   ├── app.js       # Mobile app logic + crypto
│   │   ├── sw.js        # Service worker (network-first)
│   │   ├── manifest.json
│   │   ├── favicon.png
│   │   └── icon-*.png   # PWA icons (192/512)
│   ├── server.js        # Express server (dev)
│   └── vercel.json      # Vercel config + cache headers
├── server/
│   └── index.js         # WebSocket relay server
├── LICENSE              # GPL-3.0
└── README.md

Contributing

This is my first open source project. If something annoys you, if there's a feature you want, or you spotted a bug — open an issue or PR.

Ideas for the roadmap:

  • 🦊 Firefox extension support
  • 📁 File transfer (needs chunked upload, different from WebSocket messages)
  • 🔔 Better notification system
  • 🌐 Local network mode (no relay server needed)

If you find it useful, a ⭐ helps other people discover it.


License

GPL-3.0 — free to use, modify, and distribute. If you build on top of it, keep it open.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors