Building PeerFlow: Fast, Private WebRTC P2P File Transfer and Our Road to the Google Play Store
A deep dive into building PeerFlow — a zero-login, privacy-first peer-to-peer file transfer engine powered by WebRTC, Next.js, and React Native. Explore our architecture, multi-channel SCTP striping, and roadmap toward our Google Play Store launch.
Introduction: Why Another File Sharing Tool?
In an era where every file transfer tool requires creating an account, sitting through cloud uploads, and accepting third-party storage terms, sending a file between two devices has become needlessly complicated. Traditional cloud platforms — whether Google Drive, Dropbox, or WeTransfer — operate on an intermediary relay model: your file travels up to their remote servers, sits in their storage buckets, and only then streams down to the recipient.
This traditional pipeline introduces severe friction: bandwidth throttling, artificial file size ceilings, storage limits, and persistent privacy risks. With PeerFlow, our vision is fundamentally different: direct, encrypted, device-to-device communication without any server storing your bytes. You can experience the live web platform today at peerflow.ashwanitiwari.com.
The Aim: Frictionless, Zero-Cloud Data Movement
The primary aim of PeerFlow is to eliminate intermediaries. PeerFlow uses WebRTC DataChannels secured by DTLS encryption to establish a direct pipeline between sender and receiver. The core philosophy rests on three pillars:
- No Login Required: Anyone can open the app, pick their files, generate a short 6-character room code or QR code, and begin streaming immediately.
- Zero Data Storage on Servers: Files travel directly peer-to-peer. Our signaling infrastructure only relays SDP offer/answer handshakes and ICE candidates; it never sees, stores, or buffers a single byte of your files.
- Cross-Platform Parity: Seamless data exchange between desktop web browsers, mobile web, and native Android devices with full OS integration.
Under the Hood: The PeerFlow Architecture
PeerFlow is engineered across three coordinated layers:
- Web Client (Next.js & React 19): A responsive, glassmorphism-styled dashboard built with modern React paradigms, Lucide icons, and CSS modules. It provides full drag-and-drop file queues, live transfer speed gauges, and automatic link sharing.
- Signaling & Relay Infrastructure (Node.js & Coturn): A lightweight Node.js WebSocket signaling server running behind an Nginx reverse proxy on our VPS. For challenging NAT topologies (such as symmetric cellular networks), a dedicated
coturnTURN server relays encrypted packets when direct P2P connectivity is physically impossible. - Native Android App (React Native): Built with bare React Native CLI and the official
react-native-webrtc(v124) library, leveraging@react-native-documents/pickerfor file selection andreact-native-fsfor low-level filesystem I/O.
Current Progress & Technical Breakthroughs
Building production-grade WebRTC file transfer comes with substantial engineering challenges, especially around networking windows and memory pressure. Here is what has been developed and verified in PeerFlow:
1. Solving the SCTP Window Bottleneck with Multi-Channel Striping
WebRTC DataChannels run on top of SCTP. Because SCTP enforces congestion control per association, high-latency links (such as transatlantic transfers between India and North America) often stall in throughput regardless of individual chunk sizes. PeerFlow overcomes this by striping file payloads across multiple parallel DataChannels (scaling dynamically between 6 and 12 parallel links). Each link operates with independent sequence tagging and a 12-byte binary header, enabling the receiver to reassemble streams without packet starvation.
2. Wire-Level Backpressure & Dynamic Chunking
To avoid memory blowups and browser crashes when pushing gigabyte-sized files, PeerFlow implements strict backpressure throttling using the WebRTC bufferedAmount and bufferedAmountLowThreshold APIs. Senders dynamically tune chunk payloads between 16 KiB and 256 KiB, pausing chunk emission the instant internal network buffers reach capacity.
3. Adaptive On-The-Fly Compression
Transfers automatically inspect file MIME types and payload signatures. Text documents, source code, and uncompressed raw assets are compressed on the wire using streaming deflate/gzip (via pako), slashing network transit duration, while already-compressed files (like MP4, ZIP, or JPEG) bypass compression to preserve CPU cycles.
4. Offline Mode & Local Network Discovery
In environments without internet access or cellular reception, PeerFlow supports air-gapped signaling via compact SDP QR codes and local LAN discovery (mDNS/broadcast), enabling rapid direct transfers across local Wi-Fi networks.
The Next Major Milestone: Launching on the Google Play Store
While PeerFlow is already fully accessible via modern desktop and mobile browsers at peerflow.ashwanitiwari.com, our immediate focus is the mobile experience.
We are currently finalizing and stress-testing the native Android file transfer pipeline — specifically refining chunked background writes directly to local storage to guarantee that transferring multi-gigabyte files will not trigger Android system OOM (Out Of Memory) exceptions or get terminated by aggressive OS battery managers.
Our Play Store Commitment: As soon as the native file transfer feature achieves rock-solid stability, verified throughput across carrier networks, and flawless peer connection recovery, PeerFlow will be officially published and available for download on the Google Play Store.
Following the Play Store release, our roadmap includes introducing end-to-end encrypted real-time chat, crystal-clear WebRTC audio/video calling, and an optional unified dashboard for power users.
Try PeerFlow Today
PeerFlow is open, community-driven, and designed for anyone who values private, high-speed data transfer without unnecessary middlemen. Visit peerflow.ashwanitiwari.com to test a transfer between your phone and laptop, and stay tuned for our upcoming Google Play Store release!





