How ZapFile Works
The Simple Version
Imagine you're passing a note directly to your friend across the room instead of putting it on a bulletin board for everyone to see. That's basically what ZapFile does with your files.
When you share a file through ZapFile, it goes straight from your device to the recipient's device. No middleman, no cloud storage, no servers keeping copies. Just you and them.
The Technical Bits (for the curious)
WebRTC - The Magic Behind It
We use something called WebRTC (Web Real-Time Communication). It's a technology built into your browser that was originally designed for video calls, but it turns out it's also perfect for sending files directly between devices.
Think of it like this: our server is just the person who introduces two strangers at a party. Once you've been introduced, you can talk directly to each other. The server's job is done.
Room Codes
When you select a file to send, we generate a random room code. This is basically a unique meeting point where sender and receiver can find each other. Share that code (or the link with the code in it) with whoever needs to receive your file.
The codes are random and temporary. Once the transfer is done, that's it - the room doesn't exist anymore.
The Connection Process
- You pick a file and click "Create Room" - we give you a code
- Your friend enters that code on their end
- Your browsers talk to each other through our server (just to say hi and exchange connection info)
- Once connected, the server steps back and your devices transfer the file directly
- Your file gets chopped into chunks, sent across, and reassembled on the other side
Why Chunks?
Breaking files into smaller pieces (we call them chunks) makes everything more reliable. If something hiccups during transfer, we don't have to restart the whole thing. Plus, we can send multiple chunks at once, which speeds things up.
Right now we send up to 4 chunks simultaneously. Each chunk is about 5MB.
Security
WebRTC encrypts everything by default. We're talking DTLS (Datagram Transport Layer Security) and SRTP (Secure Real-time Transport Protocol). Basically, even if someone could intercept your data (which is already super unlikely), they couldn't read it.
And since we never store your files, there's nothing to steal from us. Can't hack what doesn't exist.
Limitations (being honest here)
You both need to be online: Since it's a direct connection, both sender and receiver need to be connected at the same time. Can't send a file to someone who's offline - there's nowhere to store it.
Firewalls can be tricky: Some corporate networks or strict firewalls might block WebRTC connections. Most home networks are fine though.
Connection stability: If someone's internet drops mid-transfer, the connection breaks. We're working on resume functionality, but for now you'd need to restart.
What We're Working On
Resume support is at the top of our list. Nobody wants to restart a 10GB transfer because their WiFi hiccupped.
We're also looking at better connection fallbacks for when direct peer-to-peer doesn't work (like when both people are behind strict NATs).