Back to Portfolio
PeerWarp: Zero-Cloud P2P Direct File Transfer Platform
Cloud Engines & Infrastructure

PeerWarp: Zero-Cloud P2P Direct File Transfer Platform

Next.js 15 React 19 TypeScript WebRTC DataChannels W3C FileSystem Streams Cloudflare Workers & Durable Objects COTURN Fail2ban FastAPI Docker
Executive Summary

An open-source, production-grade file transfer platform engineered to move unlimited files and folders directly between browsers via encrypted WebRTC DataChannels, eliminating cloud storage intermediaries with direct-to-disk writing, on-the-fly compression, and local Wi-Fi radar.

Peak Browser RAM
< 3.2 MB
Transfers 20GB+ files without tab crashes
P2P Wire Speed
91.2 MB/s
9.2x faster than Google Drive & WeTransfer
Room Key Combinations
1.1 Trillion
High-entropy Base32 with client hash secret
Storage Overhead
0 Cloud
100% end-to-end encrypted direct transfer

The Double-Hop Problem: Why Traditional Cloud File Sharing Is Flawed

When developers, videographers, or remote teams need to send large payloads—such as 10 GB 4K video cuts, database backups, or source code trees—the default workflow is uploading to Google Drive, WeTransfer, or Dropbox. This model relies on an inefficient double-hop process: you must upload the entire file to a third-party server first, wait for the remote disk to stage it, and only then can your recipient download it.

This workflow wastes double the network bandwidth and time, stores sensitive enterprise assets unencrypted on corporate disks, and artificially throttles free tiers at 2 GB to push recurring subscriptions.

PeerWarp eliminates intermediate cloud storage entirely. It transforms modern web browsers into high-throughput peer-to-peer transfer nodes, creating direct encrypted data channels between devices so files move straight from device to device at wire speed.

WebRTC Transfer Architecture: Moving Data Without Intermediary Servers

At its architectural core, PeerWarp establishes direct peer-to-peer tunnels using W3C WebRTC DataChannels configured for ordered, reliable delivery over DTLS 1.3 and SCTP, guaranteeing end-to-end encryption.

The signaling server acts solely as a lightweight matchmaker during the initial handshake. Once client endpoints discover each other and complete ICE candidate exchange, the signaling server drops out of the loop and handles zero payload bytes:

The primary production signaling engine runs on Cloudflare Workers and Durable Objects, keeping ephemeral room state in edge memory without persistent database calls
A standalone Python FastAPI signaling server is included with WebSockets and Docker Compose for private, air-gapped corporate intranets
A Star Topology mesh enables a single sender to distribute files simultaneously to multiple recipients (up to 20 devices) with independent live telemetry tracking for each peer

Preventing Browser Crashes: Direct-to-Disk Streaming & On-The-Fly Compression

Traditional web apps crash when users attempt multi-gigabyte transfers because browsers stage the entire blob in heap memory before triggering a download. PeerWarp solves this browser memory ceiling through three key engineering decisions:

Direct-to-disk writing via the W3C FileSystemWritableFileStream API flushes incoming data chunks directly to local storage as they arrive over the wire, keeping browser RAM usage consistently under 3.2 MB even when moving 50 GB archives
Native on-the-fly Gzip compression using the CompressionStream API automatically compresses source code, CSVs, log dumps, and documents during transmission, boosting effective transfer rates by 2x to 6x
Full directory recursion preserves complete folder hierarchies on drop, and a client-side PKWARE bundler allows receivers to zip all received items in browser memory with a single click

Local Wi-Fi Radar & Human-Gated Knock Security

To offer an AirDrop-style zero-configuration experience that works across all operating systems (Windows, macOS, Linux, Android, iOS), PeerWarp includes an edge-routed local radar:

Edge workers hash public egress IPs to detect devices connected to the same local router, populating nearby peers on the dashboard automatically without manual room sharing.

To prevent unsolicited file transfers and protect user privacy:

A knock-to-join protocol pauses session negotiation when a new peer arrives, displaying the recipient device profile (e.g. iPhone Safari) to the sender
The sender must explicitly click Accept before any WebRTC SDP offer or data chunk is exchanged
Room security combines 8-character Base32 room codes yielding 1.1 trillion permutations with a 128-bit client-side hash secret (#k=...) stored exclusively in the URL fragment, ensuring keys never reach web server logs

Enterprise Firewall Traversal & Hardened COTURN Relay

In corporate environments where symmetric NATs and carrier-grade firewalls block direct P2P hole punching, PeerWarp provides an encrypted fallback:

A dedicated COTURN relay node deployed on hardened Ubuntu Linux handles encrypted fallback allocations over TLS on port 5349, guarded by automated fail2ban intrusion detection
The engine enforces lazy relay allocation: direct P2P connections are always attempted first (succeeding in over 90% of transfers without server overhead), activating TURN relay only when strict network isolation makes direct connections impossible

Field Benchmarks & Real-World Performance

Benchmarks conducted across local gigabit Wi-Fi 6 networks demonstrate clear advantages over centralized storage:

Transferred an 8.4 GB 4K ProRes video in 1 minute 34 seconds at 91.2 MB/s, beating traditional cloud upload/download times by 9.2x
Compressed and transferred a 650 MB source code repository in 4.8 seconds, achieving a 16.6x performance boost
Maintained zero memory leaks during transfers of 35 GB virtual disk images
Full Progressive Web App (PWA) support allowing installation on mobile devices and file sharing straight from the native OS Share Sheet
Bit-for-bit cryptographic SHA-256 streaming verification confirming payload integrity before closing file handles
Interactive System Studio & Architecture Screens

Click any screen below to inspect in high-resolution with zoom in, zoom out, pan, and full screen controls.

4 Displays

Interested in a similar project?

We can build a tailored solution customized to your business goals.

Contact Me Now