georapbox / barcode-scanner

A Progressive Web Application (PWA) that scans barcodes of various formats, using the Barcode Detection API.
https://georapbox.github.io/barcode-scanner/
MIT License
80 stars 36 forks source link

Barcode/QR code Scanner

A Progressive Web Application (PWA) that scans barcodes of various formats, using the Barcode Detection API.

[!NOTE] The Barcode Detection API is part of the Fugu project. Currently it is supported only on Chromium browsers in MacOS and Android. For non-supporting browsers, a polyfill is used.

Live demo

šŸ‘‰ Barcode/QR code Scanner

Features

Some of the key features of the application include:

Screenshots

The following screenshots show the application in action:

Camera scanner screenshot Image scanner screenshot

Development

Below are the instructions for setting up the development environment.

Prerequisites

Installation

Clone the repository to your local machine:

git clone git@github.com:georapbox/barcode-scanner.git

Navigate to the project's directory and install the dependencies:

npm install

Running the application

To run the application in development mode, run the following command:

npm start -- --open

This will start the development server and open the application in your default web browser.

Building the application for production

To build the application for production, run the following command:

npm run build

This will create a dist directory containing the production build of the application.

Deployment

To deploy the application, run the following command:

npm run deploy

This will build the application first and then deploy it to GitHub Pages in the gh-pages branch.

License

The MIT License (MIT)