Kasi (Swahili) — fast, speed, velocity
Local-first peer-to-peer file sharing. Open the app on any two devices on the same network, pair them, and transfer files directly — no cloud, no intermediaries.
- Both devices open the app and appear on each other's radar
- Device A clicks connect on Device B
- Device B receives a pairing request, generates a PIN and displays it
- Device A enters the PIN to confirm
- A direct WebRTC connection is established between the two devices
- Files transfer directly over the local network at full LAN speed
File data never leaves your network. The signaling server only handles the initial handshake (a few hundred bytes of text) and steps aside once the connection is established.
| Concern | Choice |
|---|---|
| Frontend | Next.js 14 App Router |
| Styling | Tailwind CSS + shadcn/ui |
| Language | TypeScript throughout |
| P2P protocol | WebRTC RTCDataChannel |
| Signaling | Hono + ws (Node.js) |
| Signaling host | Render.com |
| Frontend host | Vercel |
| Transfer history | IndexedDB via idb-keyval |
| QR pairing | qrcode.react |
kasip2p/
├── apps/
│ ├── web/ # Next.js app → Vercel
│ │ └── src/
│ │ ├── app/
│ │ │ ├── pair/[peerId]/ # Pairing flow
│ │ │ ├── transfer/[peerId]/ # File transfer UI
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx # Radar discovery page
│ │ ├── components/
│ │ │ └── pair-request-modal.tsx
│ │ ├── hooks/
│ │ │ ├── use-incoming-pair.ts
│ │ │ ├── use-peers.ts
│ │ │ └── use-webrtc.ts
│ │ ├── lib/
│ │ │ ├── signaling/
│ │ │ │ └── ws-client.ts
│ │ │ ├── store/
│ │ │ │ └── idb.ts
│ │ │ └── webrtc/
│ │ │ ├── chunk-utils.ts
│ │ │ └── peer-manager.ts
│ │ └── providers/
│ │ ├── pairing-provider.tsx
│ │ └── query-provider.tsx
│ └── signaling/ # Hono WebSocket server → Render
│ └── src/
│ └── index.ts
└── packages/
└── shared/ # Shared TypeScript types
└── src/
└── index.ts
- Node.js 20+
- pnpm 9+
git clone https://github.com/your-username/kasip2p.git
cd kasip2p
pnpm installcp apps/web/.env.localOpen apps/web/.env.local and set:
NEXT_PUBLIC_SIGNAL_URL=ws://<your-lan-ip>:3001Replace <your-lan-ip> with your machine's local IP address. On Linux run ip addr to find it. On macOS run ifconfig.
pnpm devThis starts both the Next.js app on http://localhost:3000 and the signaling server on ws://localhost:3001.
Open http://localhost:3000 on your laptop and http://<your-lan-ip>:3000 on any other device on the same network.
- Connect your GitHub repo on render.com
- Render auto-detects
render.yamland configures the service - Once deployed, copy your Render URL
- Import your GitHub repo on vercel.com
- Vercel auto-detects
vercel.jsonand configures the build - Add this environment variable in the Vercel dashboard: NEXT_PUBLIC_SIGNAL_URL=wss://
- WebRTC data channels are encrypted end-to-end via DTLS
- The signaling server validates PIN confirmation before relaying any SDP or ICE messages
- A rogue device on the same network cannot intercept a transfer without knowing the PIN
- File data never passes through any server
- Animated radar showing live device discovery
- OS detection with platform icons for each device
- QR code + PIN pairing flow
- Drag and drop file transfer
- Real-time progress bars with transfer speed in MB/s
- Transfer history stored locally in IndexedDB
- Automatic reconnection if the signaling server drops
- Works on any device with a modern browser