https://github.com/crabnebula-dev/qr-reader-demo
https://github.com/crabnebula-dev/qr-reader-demo
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/crabnebula-dev/qr-reader-demo
- Owner: crabnebula-dev
- License: apache-2.0
- Created: 2024-04-19T09:57:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T23:52:48.000Z (almost 2 years ago)
- Last Synced: 2024-12-26T17:26:23.599Z (over 1 year ago)
- Language: Rust
- Size: 252 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE_APACHE-2.0
Awesome Lists containing this project
README
# QR Reader App
This app is a demo of a cross-platform (desktop + mobile) Tauri application that can read QR codes.

The parsed QR code value(s) will be written into the clipboard.
Check out the [release page](https://github.com/crabnebula-dev/qr-reader-demo/releases) to get started.
## Desktop
On desktop (Windows, Linux, MacOS), this is a **tray app** that allows the user to:
- **Scan** for QR codes on the entire screen (not reliable for larger resolution).
- **Crop** an area of the screen to search for a QR code.
- **Load** an image from the clipboard and parse a QR code from it.
We use [`screenshots`](https://github.com/nashaofu/xcap) and
[`bardecoder`](https://github.com/piderman314/bardecoder) crates
to scan and extract the QR code.
## Mobile
On mobile (iOS, Android) it is a simple app with only
one main window to **scan** barcodes via the camera.
We use [`tauri-plugin-barcode-scanner`](https://beta.tauri.app/features/barcode-scanner/),
which uses the native mobile functionality to scan a
QR code with the camera.
## Development
To start with building and development, please make sure you
followed the [prerequisites](https://beta.tauri.app/guides/prerequisites/)
installation guide from Tauri and all dependencies are
installed on your system.
If you want to build for mobile, you need to follow the install
steps for the
[mobile development preriquisites](https://beta.tauri.app/guides/prerequisites/#configure-for-mobile-targets).
This repository uses [`pnpm`](https://pnpm.io/) for the frontend packages,
so please make sure you have installed it as well.
Starting from `npm` you could install it via `npm install -g pnpm`.
1. Install repository dependencies
```sh
pnpm install
```
2. Initialise the mobile development structure
Android:
```sh
pnpm tauri android init
```
iOS:
```sh
pnpm tauri ios init
```
3. Run the application in debug mode either local or in a mobile emulator.
Local:
```sh
pnpm tauri dev
```
Android:
```sh
pnpm tauri android dev
```
iOS:
```sh
pnpm tauri ios dev
```