ram21-transfer
v0.5.1
Published
Offline file and text transfer using fountain-coded animated QR codes — Night Coder Optical Transfer.
Readme
Night Coder Optical Transfer: Fountain-Coded QR File Transfer
Send any file or text between two devices using nothing but a screen and a camera. One device displays the file as an endless animated stream of high-contrast QR codes; another device points its camera at it and instantly reconstructs the file.
No cloud accounts, no pairing, no Wi-Fi/Bluetooth required, zero internet. The payload travels as pure light.
🚀 Instant CLI Usage (Zero Install)
You can run Night Coder directly with npx:
# 📡 1. Optical Air-Gapped Stream (Pure Light · Zero Networks)
npx ram21-transfer # Opens file picker dialog & starts streaming!
npx ram21-transfer ./document.pdf # Streams file directly
# ⚡ 2. Turbo Instant Download (50+ MB/s · Wi-Fi/Hotspot Scan)
npx ram21-transfer -t ./video.mp4 # Point any phone camera to download at 50+ MB/s
# 📱 3. Show Mobile Phone Receiver QR
npx ram21-transfer -s
# 🖱️ 4. Add to Windows Right-Click Menu
npx ram21-transfer menu🌐 Web Application
→ ram2106.github.io/decimen-optical-transfer
Open it on both devices and go — nothing to install. Works 100% offline after the first visit.
Files up to 64 MB (or pasted text), preserved filename, automatic gzip, SHA-256 integrity verification, and instant video playback. Extracted from a high-throughput engine reaching 130+ KB/s phone-to-phone over pure screen light.
Neither mode is encrypted: whatever is on the sending screen is readable by any camera pointed at it. The property this gives you is no network, not confidentiality — see privacy.
Documentation
Using it — quick start · sending · receiving · troubleshooting · install & offline · privacy
How it's built — architecture · protocol · platform quirks · build & release
The short version of the protocol: a screen-to-camera link has no back-channel, so the sender streams fountain-coded frames (Luby transform) — the receiver collects any ~K·1.15 distinct frames in any order and peels the file out. Dropped frames cost time, never correctness.
Run it yourself
npm install
npm run dev # https dev server with HMR
npm run serve # build, then serve the production bundle
npm run demo # demo mode: only the bundled payloads can be sent
npm test # golden wire-format vectors and unit tests
npm run build # the hosted site → dist/
npm run build:standalone # both self-contained pages → dist-standalone/
npm run build:all # everythingOpen https://localhost:5173/send/ on the sending device and the printed
Network URL on the receiving phone (accept the self-signed certificate
once). Walkthrough: quick start.
Similar projects
The concept here was arrived at independently. It turns out several people have had similar ideas, and their takes are all worth a look:
- mohankumarelec/airgapped-qr-code-transfer: browser-based QR file transfer with compression and sequential chunking. Discovered after publicly demoing this project; convergent evolution in action.
- divan/txqr (2018): animated QR plus fountain codes in Go, with two excellent write-ups on why fountain coding beats sequential looping.
- sz3/libcimbar: goes past QR entirely with a custom high-density color code purpose-built for this channel.
Built by Evan Crawley (Bash Alarmist), with node-qrcode and zxing-wasm.
License
MIT
