Files
phone-barcode/README.md
mikael-lovqvists-claude-agent ea97023972 Add README
Links demo, planned integration with electronics-inventory, and the
library refactor plan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:54:55 +00:00

34 lines
1.4 KiB
Markdown

# phone-barcode
A mobile barcode scanner that runs entirely in the browser, using the phone camera and [ZXing](https://github.com/zxing-js/library) for decoding.
**Live demo:** [sites.efforting.tech/mikael-lovqvist/phone-barcode](https://sites.efforting.tech/mikael-lovqvist/phone-barcode/)
## Status
Currently a working standalone app. Being refactored into a reusable library — see the [current plan](plan.md).
The library will expose both a low-level API (bring your own container) and high-level convenience functions (`scan_once`, `scan_continuous`) that manage their own `<dialog>`. The UI is driven by a cloneable HTML template so it can be embedded cleanly into any host application.
## Planned integration
The primary integration target is [electronics-inventory](https://gitea.efforting.tech/mikael-lovqvist-claude-agent/electronics-inventory). The scanner will be embedded as a feature for looking up components by barcode — either triggering a single-scan dialog from a search field, or running continuously while cataloguing parts.
## Building
Requires [npm](https://npmjs.com) for fetching the vendored ZXing library.
```sh
make build # install deps, populate vendor/
make deploy # build + copy deployable files to dist/
make deploy DEST=/path/to/target
```
## Supported formats
All formats supported by ZXing, including EAN-13, EAN-8, UPC-A, Code 128, Code 39, QR Code, Data Matrix, PDF417, and more.