file-drop
Overview
LAN file sharing app — upload through a browser, share a link or 6-digit code, receive on any device. No sign-up, no cloud, no data leaves your network.
Problem
Sharing files between devices on the same network usually means cloud uploads (Google Drive, Dropbox), USB drives, or complex SMB shares. No simple zero-config tool exists for LAN-only file sharing with ephemeral links and no account setup.
Approach
Built a self-hosted Next.js app that runs on any machine on the LAN. Upload files via drag-drop in a browser, get a 6-digit code + QR code + direct link. Receiver enters the code, scans the QR, or clicks the link to download. All data stays local — SQLite for metadata, disk for files. No cloud, no sign-up, no internet needed.
Architecture
Next.js App Router with API routes handling upload (multipart with XMLHttpRequest for progress tracking), download (streaming via fs.createReadStream → Web ReadableStream), code lookup, password verify, and periodic cleanup. SQLite with WAL mode stores file metadata, hashed passwords, and access codes. Uploaded files are zipped with archiver (preserving drag-order). QR decoding is fully client-side via jsQR from uploaded screenshots.
Challenges
Multipart upload overhead beyond the 2 GB cap required careful handling. 6-digit access codes have a 900k space with collision retry (100 attempts). File streaming required bridging Node.js Streams to Web ReadableStream. Cross-browser clipboard fallback chain. SHA-256 for passwords (not bcrypt — acceptable for LAN threat model). Port-finding production server scans for available ports.
Results
A zero-config LAN file sharing tool. Upload via browser, share via code/QR/link, download on any device. No cloud, no sign-up, no data leaves the network. Self-hosted with SQLite persistence and automatic cleanup.