bashalarmistalt GitHub avatar

decimen-optical-transfer

bashalarmistalt

A proof-of-concept that transfers files between two devices using only a screen and camera by encoding data as an endless stream of animated QR codes with fountain coding to handle dropped frames.

Stars

179

7-day growth

No data

Forks

25

Open issues

1

License

MIT

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It demonstrates a practical air-gapped file transfer using fountain codes (Luby transform) that requires no network, app, or pairing, and includes hard-won details for browser compatibility and robust decoding.

Who it is for

  • Developers exploring offline data transfer methods
  • Researchers in optical communication and fountain coding
  • Makers building air-gapped or security-conscious systems
  • Privacy advocates seeking untrackable local transfers

Use cases

  • Transfer files between two devices without any network connection
  • Securely exchange data in air-gapped environments (e.g., sensitive documents)
  • Prototype and test optical communication channels with fountain codes
  • Educational demo of Luby transform coding and browser-based vision APIs

Strengths

  • No network, app, or permissions beyond camera access required
  • Fountain codes guarantee correctness despite dropped frames; receiver can join mid-stream
  • Self-describing frames enable automatic session recovery and restart
  • Open-source MIT license with detailed implementation notes

Considerations

  • Proof-of-concept with limited throughput (targets 512 KB or 2 MB images only)
  • Requires bright screen, steady camera, and HTTPS; iOS camera frame rate quirks
  • QR error correction set to minimum (L) – relies on fountain layer for erasure recovery, not corruption

README quick start

Decimen Optical Transfer: fountain-coded QR file transfer

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.

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 PoC keeps only the essential trick and transmits a 512 KB image (or a 2 MB one, selectable in the sender's settings) at a comfortable rate.

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

Try it

npm install
npm run dev
  • On the sending device (a laptop is ideal): open https://localhost:5173/send/ and it starts streaming immediately. Max screen brightness helps.
  • On the receiving device (a phone): open the Network URL Vite prints (https://:5173/receive/), accept the certificate warning once, tap Start camera, and point it at the code.
  • A few seconds later: Transfer Complete! and the received image, verified by hash.

Why the dev server is https-only: the receiver uses getUserMedia, and browsers remove that API entirely on insecure origins: a phone reaching your dev server over plain http has no camera, full stop (localhost is exempt, but your phone isn't localhost). That's a web platform rule, not a choice. The dev server therefore ships with a self-signed certificate (@vitejs/plugin-basic-ssl); the browser will warn on first visit. Tap "Show Details" then "visit this website" (iOS) or "Advanced" then "Proceed" (Android/desktop), and the page is still a secure context, so the camera works. The odd-looking lvh.me hosts Vite prints are a public convenience domain that resolves to 127.0.0.1 (same machine, nothing extra running).

Hold the phone steady, or better, prop it against something. Camera autofocus hunting from hand tremor is the #1 throughput killer.

How it works

The one-way channel problem. A screen-to-camera link has no back-channel: the receiver can't ask for retransmission, and it will inevitably miss frames (blur, refresh straddling, autofocus). Looping the frames and h

Related repositories

Similar projects matched by category, topics, and programming language.

TanStack
Featured
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web DevelopmentFrontend Frameworks
14,861
vercel-labs
Featured
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

Developer ToolsCode Quality & Build
1,985
Jakubantalik
Featured
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI & Machine LearningAI Agents
1,191