A serverless, peer-to-peer instant file-sharing web app. Zero setup. Zero sign-up.
-
Blink is an open-source, serverless file-sharing tool that lets you send any file directly from one browser to another — instantly and privately.
-
No accounts, no uploads to the cloud, no app installs. It works entirely over WebRTC, meaning your files travel directly between devices and never touch a server.
-
Just open Blink on two devices connected to the same Wi-Fi network, and start sharing.
| Feature | Description |
|---|---|
| 🔒 End-to-End Private | Files transfer directly between browsers via WebRTC Data Channels. Your data never touches any server. |
| ⚡ Blazing Fast | Direct peer-to-peer connections transfer files at the maximum speed your local network allows. |
| 📂 Any File Format | Send PDF, PNG, JPG, GIF, ZIP, MP4, or literally any file type — no restrictions, no compression. |
| 📡 Auto Discovery | Devices on the same Wi-Fi network are automatically discovered using a hashed public IP. No manual pairing needed. |
| ✨ Zero Setup | No accounts, no downloads, no room codes. Just open the page in your browser and start sharing. |
| 📱 Works Everywhere | Fully responsive — works seamlessly on desktop, tablet, and mobile browsers. |
| 🎯 Radar UI | A modern animated radar interface shows nearby peers in real time with device-type icons. |
| 📦 Chunked Transfer | Large files are handled gracefully with 64 KB chunking (File.slice + ArrayBuffer) for reliable delivery. |
| 📊 Progress Indicators | Circular and linear progress bars with live transfer speed and ETA. |
| 🖱️ Drag & Drop | Drop files directly onto the page — or click to browse. Supports multiple files at once. |
| ✅ Accept / Reject | Receivers get a notification and can accept or reject incoming files before any data is transferred. |
| 💓 Heartbeat Protocol | Ping/pong heartbeats detect disconnected peers and clean up stale connections automatically. |
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router and API routes |
| React 19 | UI library for building interactive components |
| TypeScript | Type-safe JavaScript for the entire codebase |
| Tailwind CSS 4 | Utility-first CSS framework for styling |
| PeerJS | WebRTC signaling layer (free cloud signaling server) |
| WebRTC Data Channels | Direct browser-to-browser file transfer |
| Vercel | Serverless deployment platform |
| Vercel Analytics | Lightweight usage analytics |
blink/
├── public/ # Static assets
│ └── favicon.png # App icon
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ └── ip/
│ │ │ └── route.ts # API route — returns SHA-256 hashed public IP
│ │ ├── globals.css # Global styles (Tailwind + custom CSS)
│ │ ├── layout.tsx # Root layout with SEO metadata
│ │ ├── page.tsx # Landing page (hero, features, how-it-works)
│ │ └── share/
│ │ └── page.tsx # Main file-sharing page (radar + drop zone)
│ ├── components/
│ │ ├── DeviceAvatar.tsx # Device icon displayed on the radar
│ │ ├── DropZone.tsx # Drag-and-drop file selection area
│ │ ├── Header.tsx # App header with navigation and GitHub link
│ │ ├── NetworkInfoPanel.tsx # Displays network ID, peer count, host status
│ │ ├── ProgressRing.tsx # Circular + linear progress bar for transfers
│ │ ├── RadarView.tsx # Animated radar showing nearby peers
│ │ ├── RoomCodePanel.tsx # Room code input panel (for cross-network use)
│ │ └── TransferNotification.tsx # Accept/reject incoming file notification
│ ├── hooks/
│ │ ├── useFileTransfer.ts # File chunking, sending, receiving, progress
│ │ └── usePeer.ts # PeerJS connection lifecycle & discovery
│ └── lib/
│ ├── discovery.ts # IP hashing, device detection, room code utils
│ ├── file-transfer.ts # Chunked file engine (slice, reassemble, download)
│ └── peer.ts # PeerJS wrapper (create, connect, destroy)
├── eslint.config.mjs
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── tsconfig.json
└── README.md
-
At a high level, Blink uses your public IP address to group devices on the same network. The first device becomes the "host" peer, and subsequent devices connect to it.
-
Once connected, PeerJS facilitates WebRTC signaling so that all file data flows directly between browsers — the server is never involved in the actual transfer.
-
Open the App:
- User visits
/share. The app calls the/api/ipendpoint, which returns a SHA-256 hash of the user's public IP.
- User visits
-
Peer Registration:
- Using the hashed IP as a network ID, the first device registers as the host peer on PeerJS (
blink<hash>host). Subsequent devices register as clients with a random suffix and connect to the host.
- Using the hashed IP as a network ID, the first device registers as the host peer on PeerJS (
-
Peer Discovery:
- The host broadcasts the list of all connected peer IDs to every client. Clients then establish direct WebRTC connections to each other, forming a mesh.
-
Heartbeat:
- A ping/pong protocol runs every 3 seconds. If a peer doesn't respond within 10 seconds, it's considered disconnected and removed from the radar.
-
File Transfer:
- When a user selects a peer and drops a file, a
file-requestmessage is sent. If the receiver accepts, the file is sliced into 64 KB chunks and streamed over the WebRTC Data Channel. The receiver reassembles the chunks and triggers a browser download.
- When a user selects a peer and drops a file, a
Key point: Only signaling metadata (SDP offers, ICE candidates) flows through PeerJS's cloud server. All actual file data travels directly between browsers via WebRTC.
⚠️ Important: Both devices must be connected to the same Wi-Fi network for auto-discovery to work.
-
Open Blink:
Visit the app URL on Device A and click "Start Sharing" to go to the sharing page.
-
Open on second device:
On Device B (connected to the same Wi-Fi), open the same URL and navigate to the sharing page.
-
Wait for discovery:
Within a few seconds, both devices will automatically detect each other. You'll see the other device appear as a blip on the radar.
-
Select a peer:
Click on the device avatar on the radar to select it as the transfer target.
-
Send a file:
Drag and drop any file onto the drop zone (or click to browse). The file request is sent instantly.
-
Accept the file:
On the receiving device, you'll see a notification with the file name and size. Click "Accept" to start the transfer.
-
Download completes:
The file transfers directly between browsers. Once complete, it's automatically downloaded to the receiver's device.
git clone https://github.com/ayushkcs/blink.git
cd blinknpm installnpm run devOpen http://localhost:3000 in your browser.
npm run build
npm startnpx vercelOr connect the GitHub repository to Vercel for automatic deployments on every push.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
Please make sure your code follows the existing style and passes linting (npm run lint).
If you find a bug or have a feature request, feel free to open an issue.

