DEV Community

Shahid
Shahid

Posted on

Transfer files between devices with light — zero network, zero pairing, 100% offline.

Transfer files between devices with light — zero network, zero pairing, 100% offline.

a Progressive Web App that moves files and text snippets from one screen to another device's camera using fountain-coded animated QR codes.
Live at App — open it on both devices and
go. Works offline after the first visit.
Progressive Web App that moves files and text snippets

Why it's useful:

Air-gapped & offline: No Wi-Fi, Bluetooth, local LAN path, cloud storage, or account required.
Fountain-coded transmission: Uses Luby transform (soliton) fountain codes so the receiver can scan frames in any order. Dropping a frame never corrupts the transfer.
Any file or text: Automatically compresses compressible data with gzip and restores original filenames and bytes bit-exact (verified via SHA-256).
Zero-install PWA: Runs entirely in the browser. You can install it once and use it offline forever.
Open it on your laptop, point your phone camera at the screen, and transfer files with light. Send a file between two devices using nothing but a screen and a camera. One page displays the file as an endless stream of animated QR codes; another device points its camera at it and reconstructs the file. No network path between the devices, no app, no pairing, no permissions beyond the camera. The payload travels as light.

Live at App — open it on both devices and go. Works offline after the first visit.

This is a minimal proof of concept extracted from a larger experiment that reached 128 KB/s phone-to-phone with denser frames, multi-code grids, and an error-corrected color channel. This version accepts arbitrary files up to 64 MB, preserves their filename and media type inside the fountain stream, adaptively uses gzip only when it shrinks the optical payload, and verifies SHA-256 before offering the received file for download. The sender can also stream a pasted text snippet instead of a file; the receiver works out which one is arriving from the container's media type.

Phone receiving a 2 MB image over light: 129.2 KB/s goodput, decoding the sender's animated QR code

Mid-transfer: a phone pulling a 2 MB image out of the air at 129 KB/s.

Try it
App
The hosted site is live at App; everything below is for running it yourself.

Similar projects

I didn't come up with this on my own. It turns out a few different people have tackled this idea, and their perspectives are worth a look:

Built with node-qrcode and
zxing-wasm.

Top comments (0)