c6e672bee760ed2db2f8880601acc3974e493973
Throwit
A Snapdrop-style local sharing app with a custom throw interaction.
Architecture
- Next.js on Vercel
- Upstash Redis REST for short-lived presence and WebRTC signaling
- WebRTC DataChannels for direct file and text transfer
- No Supabase, database tables, accounts, room codes, or client network tokens
- Files and text never pass through Redis or Vercel
Why Redis is required
Browsers cannot scan arbitrary devices on Wi-Fi. A small rendezvous service is required to announce browser presence and exchange WebRTC offers, answers, and ICE candidates. Vercel Functions do not share reliable in-memory state across instances, so Throwit uses serverless Redis REST for this short-lived coordination.
The client never receives a network token. The server groups requests by a one-way hash of the public network address and stores presence for only a few seconds.
Deploy
- Import the repository into Vercel.
- In the Vercel project, open Storage → Create Database → Upstash Redis.
- Connect it to the project. Vercel adds
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENautomatically. - Redeploy.
No other environment variables are required.
Local development
npm install
cp .env.example .env.local
npm run dev
Use an Upstash Redis database for local cross-device testing. HTTPS is required on physical devices for the full browser feature set.
Features
- Automatic same-network browser discovery
- Direct encrypted WebRTC file transfer
- Temporary text chat
- Explicit file acceptance
- Chunked transfer with progress and backpressure
- Up to 512 MB in-memory receive limit
- Paper mascot navigation logo and favicon
- Responsive orbit-based device interface
Description
GitHub account backup: https://github.com/s41r4j/throwit | Snapshot: 2026-11-06
135 KiB
0 Stars
1 Watchers
0 Forks
Languages
TypeScript
69.5%
CSS
28.9%
JavaScript
1.6%