How aras-digital/adx-barcodes works
Project type and purpose
• This is a static, client-side barcode-scanning web application (“Adx Barcodes”) delivered via GitHub Pages.
• It bundles three scanning engines—ZBar (via WebAssembly), Quagga-JS, and ZXing-JS—for demo and test purposes.
File structure
• Top-level:
• index.html – a landing page (likely links to demos)
• test.html – a page for manual integration testing
• drgfactory/ – custom demo or integration (HTML only)
• quagga-js/, zxing-js/, zbar-wasm/ – each contains an index.html plus associated JS/WASM or dist artifacts
• zbar-wasm/dist – the compiled WASM binary plus JS wrappers (commonjs & ES modules, inlined variants)
• .github/workflows/static.yml – CI/deployment script (push → GitHub Pages)
Key insights from README
• Embeds barcode‐scanners in iframes or directly in page
• Parent ⇄ iframe communication via postMessage
• Hosted at https://aras-digital.github.io/adx-barcodes/
A. Browser Client
• Parent page (index.html/test.html)
• Optional iframe(s) pointing at quagga-js/index.html, zxing-js/index.html, zbar-wasm/index.html
B. Scanning Engines (all client-side)
• Quagga-JS (pure JS)
• ZXing-JS (pure JS module)
• ZBar-WASM (WASM binary + JS glue code)
C. Video Input
• User’s camera via Web APIs (getUserMedia)
D. Data Flow & Messaging
• Camera → Scanner engine → decoded payload → UI or postMessage to parent
E. Deployment Pipeline
• GitHub Actions → GitHub Pages hosting
Relationships and interactions
• The Browser Client loads a page; it requests camera access.
• The page loads a specific scanner library (Quagga/ZXing/ZBar).
• Scanner JavaScript/WASM processes video frames, returns decoded barcodes.
• The page displays results or posts messages back to parent (in iframe use-case).
• GitHub Actions CI pushes updated static files to the gh-pages branch.
Architectural patterns & design principles
• Modular, pluggable engines: each scanner lives in its own folder with self-contained HTML/JS
• Clear separation: UI (HTML/CSS), scanner logic (JS/WASM), hosting pipeline (CI config)
• Client-only architecture: no server component—fully static site
Essential elements
• Clear, unique labels on each node (e.g., “zbar-wasm/dist/zbar.wasm”)
• Deployment path: GitHub Actions → branch → Pages site