https://github.com/sumitsahoo/barcode-scanner
Barcode scanner using ZBar WASM
https://github.com/sumitsahoo/barcode-scanner
barcode-scanner biome daisyui javascript reactjs tailwind tailwindcss vite webassembly zbar-wasm
Last synced: 2 months ago
JSON representation
Barcode scanner using ZBar WASM
- Host: GitHub
- URL: https://github.com/sumitsahoo/barcode-scanner
- Owner: sumitsahoo
- License: mit
- Created: 2024-06-06T15:22:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-25T15:12:14.000Z (3 months ago)
- Last Synced: 2026-03-26T17:41:37.441Z (2 months ago)
- Topics: barcode-scanner, biome, daisyui, javascript, reactjs, tailwind, tailwindcss, vite, webassembly, zbar-wasm
- Language: JavaScript
- Homepage: https://sumitsahoo.github.io/barcode-scanner/
- Size: 6.76 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## âšī¸ Barcode Scanner with ZBar WASM
High-performance, offline-ready barcode scanner built with React 19, Vite, and ZBar WASM.
## đ¨đģâđģ Live App
[sumitsahoo.github.io/barcode-scanner](https://sumitsahoo.github.io/barcode-scanner)
## đ Features
- **âĄī¸ High Performance**: Off-main-thread image processing using Web Workers.
- **đą PWA Ready**: Fully offline capable with aggressive caching strategy.
- **đˇ Advanced Camera**: Torch control, camera switching, and zoom support.
- **đ¨ Modern UI**: Smooth animations, haptic feedback, and responsive design.
- **đ Privacy First**: All processing happens locally on the device.
## đī¸ Project Structure
```
src/
âââ components/ # UI Components (Scanner, Dialogs, Icons)
âââ config/ # App Configuration
âââ constants/ # Constants & Settings
âââ hooks/ # Custom React Hooks (useBarcodeScanner)
âââ utils/ # Helper Functions
âââ workers/ # Web Workers (Image Processing)
âââ App.jsx # Root Component
âââ main.css # Global Styles & Animations
âââ main.jsx # Entry Point
```
## đ ī¸ Tech Stack
- **Core**: React 19, Vite 7
- **Scanning**: @undecaf/zbar-wasm, Web Workers
- **Styling**: Tailwind CSS 4, DaisyUI 5
- **PWA**: VitePWA, Workbox
- **Tools**: Biome, Docker
## đĻ Quick Start
```bash
# Clone and Install
git clone https://github.com/sumitsahoo/barcode-scanner.git
cd barcode-scanner
npm install
# Run Development Server
npm run dev
# Build for Production
npm run build
```
## đĸ Docker
Build and run the containerized application:
```bash
# Build
docker build --no-cache -t barcode-scanner .
# Run
docker run -it -p 8080:8080 --name barcode-scanner barcode-scanner
```
## đŧ Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## đđģ Attributions
- [ZBar WASM](https://github.com/undecaf/zbar-wasm) - Barcode detection
- [SVG Repo](https://www.svgrepo.com/) - Icons
## đ License
MIT License
Copyright Š 2026 Sumit Sahoo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.