Nguyen Trung Hau2026-08-25Updated 2026-08-274 min read

FastDrop — P2P Secure Share

Real-time P2P encrypted file and text sharing web application via WebRTC DataChannel, zero-knowledge E2EE with Web Crypto API, backpressure flow control, and Web Worker acceleration.

VibeCodingReactTypeScriptWebRTCWeb Crypto APIWebSocketWeb WorkerTailwindCSSZustand
FastDrop — P2P Secure Share

Project Overview & VibeCoding Mindset

FastDrop is a modern real-time peer-to-peer (P2P) file and text sharing web application that transfers data directly between devices without passing through any intermediate cloud storage server. Built with a VibeCoding philosophy—combining rapid, AI-augmented iterative engineering with rigorous software architecture—it achieves zero-knowledge end-to-end encryption (E2EE Zero-Knowledge) and high-throughput streaming optimizations.

FastDrop Home Dashboard — Direct P2P Room Creation and Device Rendezvous
FastDrop Home Dashboard — Direct P2P Room Creation and Device Rendezvous

Network Architecture & WebRTC P2P Protocol

  • Direct WebRTC DataChannel Streaming: Fully utilizes local LAN or Internet bandwidth without cloud bandwidth limitations or storage caps.
  • Custom WebSocket Signaling Server (Node.js + ws): Lightweight signaling relay responsible for Offer/Answer exchange, ICE Candidate negotiation, and room orchestration.
  • Flexible Room Topology: Supports both 1-1 direct peer connections and Star Topology group rooms (up to 20 peers per room).
  • 6-Character Room Codes (XXX-XXX) & QR Code Pairing: Effortless device discovery and mobile-to-desktop onboarding.
Real-time P2P Transfer Room — Live File Chunk Streaming, SHA-256 Checksum, and E2EE Chat
Real-time P2P Transfer Room — Live File Chunk Streaming, SHA-256 Checksum, and E2EE Chat
Room Members & Host Controls Modal (Group Transfer Mode, Lock Room, and Connected Peers List)
Room Members & Host Controls Modal (Group Transfer Mode, Lock Room, and Connected Peers List)

Zero-Knowledge End-to-End Encryption (E2EE)

  • Automatic Passwordless Exchange: Generates browser-native ECDH (P-256) keypairs, exchanges public keys, and derives symmetric AES-256-GCM session keys.
  • Password/PIN Protection: Derives cryptographic keys using PBKDF2 with 310,000 rounds, SHA-256 hashing, and 16-byte random salts.
  • Unique 96-bit IVs: Every individual message packet and 64KB chunk uses a cryptographically fresh Initialization Vector (IV) to prevent replay vulnerabilities.
  • Zero-Knowledge & Anti-Persistence: The signaling server only handles initial rendezvous metadata and never inspects or stores user payloads.
Zero-Knowledge E2EE Security and Encryption Architecture Details
Zero-Knowledge E2EE Security and Encryption Architecture Details

Performance Engineering & Backpressure Flow Control

  • Backpressure Flow Control: Files are partitioned into 64KB chunks. Dynamic throttling based on RTCDataChannel.bufferedAmount and bufferedamountlow events prevents browser buffer overflows and memory exhaustion when sending multi-gigabyte files.
  • Background Web Worker Checksum: Offloads SHA-256 file hashing to an isolated Web Worker (fileHasher.worker.ts), guaranteeing data integrity verification without freezing the UI thread.
  • Transfer Controls: Real-time Pause, Resume, and Cancel capabilities for all transfers.
  • Memory Lifecycle Management: Immediate cleanup of object URLs and ArrayBuffers upon download completion.

Interactive Features & UX

  • Nearby Radar: Real-time local network peer discovery with single-click pairing requests.
  • Quick Drop & Clipboard: Instant Ctrl+V / Cmd+V screenshot and text paste with a fullscreen glassmorphic drop zone.
  • Rich In-Browser File Previews: Native previews for images, video, audio, Markdown (Marked), Word documents (docx-preview, mammoth), and Excel sheets (xlsx) sanitized via DOMPurify.
  • Global i18n: 100 localized languages powered by custom automated translation and parity verification scripts.
In-Browser Rich File Preview Modal — Safe and Instant Local Inspection
In-Browser Rich File Preview Modal — Safe and Instant Local Inspection
Quick Drop Feature — Fullscreen Drag & Drop and Instant Clipboard Paste
Quick Drop Feature — Fullscreen Drag & Drop and Instant Clipboard Paste
Global i18n Language Selector with 100 Supported Locales
Global i18n Language Selector with 100 Supported Locales

Tech Stack

React 19, TypeScript, Vite 6, TailwindCSS, Zustand, WebRTC DataChannel, Web Crypto API (SubtleCrypto: ECDH, AES-256-GCM, PBKDF2, SHA-256), Web Workers, WebSocket (Node.js/ws), STUN/TURN traversal, Lucide Icons, Canvas Confetti.

Live Demo