8000 GitHub - lrehmann/barcode-scanner: Installable online barcode scanner and QR code recovery PWA with live camera, image, PDF, and AnyDCode fallback decoding · GitHub
[go: up one dir, main page]

Skip to content

About

Installable online barcode scanner and QR code recovery PWA with live camera, image, PDF, and AnyDCode fallback decoding

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Barcode Scanner Online & QR Code Recovery

Static GitHub Pages application for scanning barcodes with a live camera, images, PDFs, clipboard paste, drag and drop, and public URLs, plus difficult QR code recovery.

Open Barcode Scanner Online

Local development

cd /Users/lsr/Documents/manuals.plus
ln -s barcode-scanner.github.io barcode-scanner
python3 -m http.server 4173

Open http://127.0.0.1:4173/barcode-scanner/. The /barcode-scanner/ base path matches the GitHub project Pages deployment. Remove the local symlink after testing if it is no longer needed.

Checks

node --check assets/js/barcode-scanner.js
node --check assets/js/pwa.js
node --check service-worker.js
node tests/site-check.mjs

URL fetch order

Remote inputs are requested directly with CORS and no credentials. If that fails, the browser tries cors.eu.org, AllOrigins, and corsproxy.io, in that order. Local uploads, paste, and drag-and-drop never use these services.

Live camera

The live scanner prefers a rear-facing camera, enumerates camera devices after permission is granted, and exposes torch and zoom controls when the selected device supports them. Bounded-resolution frames are sampled locally and passed to a background ZXing-C++ AllReadable worker so decoding does not block camera controls. When ZXing returns no payload, the worker periodically tries the pinned AnyDCode WebAssembly decoder as a later fallback. Tracks and the worker are stopped when the user stops scanning, switches input modes, hides the page, or leaves the site.

The camera interaction was independently implemented with georapbox/barcode-scanner as a feature reference. Its source is MIT-licensed; no source from that project is bundled here.

Installable PWA

The scoped service worker precaches the application shell, camera worker, ZXing and AnyDCode decoders, QR fallbacks, and PDF.js core. Installed launches use /barcode-scanner/?mode=camera#scanner, while capable browsers can also expose camera/file shortcuts, accept shared public URLs, and hand supported image or PDF files to the app. Optional converters, OCR language data, PDF character maps, and other large recovery assets are cached at runtime after first use.

Updates do not call skipWaiting automatically. A waiting service worker presents an in-app update control so an active camera or file scan is never reloaded without the user choosing to update.

Deployment

The canonical target is https://lrehmann.github.io/barcode-scanner/. GitHub Pages publishes from the root of the main branch in lrehmann/barcode-scanner.

About

Installable online barcode scanner and QR code recovery PWA with live camera, image, PDF, and AnyDCode fallback decoding

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0