Skip to content

feat(optical-transfer): beam files device-to-device via QR (no network) - #92

Merged
slaveofcode merged 2 commits into
developfrom
feat/optical-transfer
Aug 1, 2026
Merged

feat(optical-transfer): beam files device-to-device via QR (no network)#92
slaveofcode merged 2 commits into
developfrom
feat/optical-transfer

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

New Optical File Transfer tool (/tools/optical-transfer, Network) — transfer a file between two devices using only a screen + camera. No network, no server, fully client-side. Inspired by Decimen Optical Transfer (MIT).

  • LT fountain codec (fountain.lib): each QR frame is the XOR of a pseudo-random block subset derived deterministically from the frame seq (shared mulberry32 PRNG + robust-soliton). The receiver peels frames in any order until solved — tolerant of dropped/blurred frames, no ACKs. Fully unit-tested (round-trips across sizes, out-of-order, lossy, duplicates).
  • Self-describing frames (frame.lib): session/k/size/hash/seq + payload; packFile/unpackFile carry the filename through the codec; fnv1a integrity. Tested.
  • qr.lib: fast QR render (byte-mode matrix) + jsqr decode.
  • Island: Sender loops an animated QR (~8fps); Receiver uses the camera, decodes, shows progress, verifies checksum, downloads.

Spec under docs/superpowers/. 564 tests · lint clean · build green.

⚠️ The codec is fully tested headlessly; the QR/camera pipeline needs a real two-device smoke (best for small files in v1 with jsqr; a zxing-wasm/Worker upgrade would boost throughput later).

🤖 Generated with Claude Code

Kresna and others added 2 commits August 1, 2026 19:58
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New Network tool (/tools/optical-transfer), inspired by Decimen Optical Transfer
(MIT). Transfer a file between two devices using only a screen + camera — no
network, no server, fully client-side.

- LT fountain codec (fountain.lib): each QR frame is the XOR of a pseudo-random
  subset of file blocks, subset derived deterministically from the frame seq
  (shared mulberry32 PRNG + robust-soliton degree distribution). The receiver
  peels frames in any order until all blocks solve — tolerant of dropped/blurred
  frames, no ACKs or retransmission. Fully unit-tested (round-trips across sizes,
  out-of-order, lossy, duplicate frames).
- Self-describing frame wire format (frame.lib): magic/version/session/k/size/
  hash/seq + payload; packFile/unpackFile carry the filename through the codec;
  fnv1a integrity. Tested.
- qr.lib: fast synchronous QR render (qrcode byte-mode matrix) + jsqr decode.
- Island: role picker; Sender loops an animated QR at ~8fps; Receiver uses the
  camera, decodes frames, shows progress, verifies the checksum, downloads.
- Registered optical-transfer (Network, ScanLine, beta).

Spec: docs/superpowers/specs/2026-08-01-optical-transfer-design.md
564 tests · lint clean · build green. Codec fully tested; QR/camera pipeline is
build + manual two-device smoke.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools d5fe5cd Aug 01 2026, 01:10 PM

@slaveofcode
slaveofcode merged commit a655891 into develop Aug 1, 2026
2 checks passed
@slaveofcode
slaveofcode deleted the feat/optical-transfer branch August 1, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant