How hasim2006/qr-mesh works
QRMesh is a browser-based, air-gapped file-transfer application: a sender prepares an image or audio file, displays its data as cycling QR codes, and a receiver scans and reconstructs it for preview or download. The documented workflow and sampled components support the main calls and data flow shown; the README also documents offline operation, out-of-order chunk collection, adjustable transmission speed, and high QR error correction. Source excerpts are partial, so peripheral behavior is not mapped.
Main entry points: SendMode.tsx File selection and QR loop · ReceiveMode.tsx Scanning and chunk collection · App.tsx Mode and theme UI · dataUtils.ts Media preparation and chunking
Components 14
App interface
- Mode and theme UI
src/App.tsx
Transmit pipeline
- File selection and QR loop
src/components/SendMode.tsx - Media preparation and chunking
src/utils/dataUtils.ts - DEFLATE compression
- QR generation
Optical transfer
- Sender screen
- Optical light link
- Receiver camera
Receive pipeline
- Browser camera API
- Scanning and chunk collection
src/components/ReceiveMode.tsx - QR frame detection
- Reassembly and inflation
src/utils/dataUtils.ts - DEFLATE decompression
Other components
- User
Connections 20
- User → Mode and theme UI: selects mode
- Mode and theme UI → File selection and QR loop: renders transmit
- Mode and theme UI → Scanning and chunk collection: renders scan
- User → File selection and QR loop: selects file
- File selection and QR loop → Media preparation and chunking: prepares and chunks
- Media preparation and chunking → DEFLATE compression: compresses bytes
- DEFLATE compression → Media preparation and chunking: returns compressed data
- File selection and QR loop → QR generation: encodes chunk
- QR generation → File selection and QR loop: returns QR image
- File selection and QR loop → Sender screen: renders QR frames
- Sender screen → Optical light link: emits light
- Optical light link → Receiver camera: carries QR image
- Receiver camera → Browser camera API: provides video
- Browser camera API → Scanning and chunk collection: supplies frames
- Scanning and chunk collection → QR frame detection: decodes frames
- QR frame detection → Scanning and chunk collection: returns QR payload
- Scanning and chunk collection → Reassembly and inflation: reassembles chunks
- Reassembly and inflation → DEFLATE decompression: inflates bytes
- DEFLATE decompression → Reassembly and inflation: returns media bytes
- Scanning and chunk collection → User: previews or downloads