@yudiel/react-qr-scanner is a React library for scanning QR codes and barcodes using the device camera. It implements a layered hook architecture where `useCamera` manages low-level camera access and settings via a task queue pattern to prevent race conditions, `useScanner` implements the barcode detection loop using requestAnimationFrame with configurable timing and duplicate detection, and `useDevices` enumerates available video input devices. The main `Scanner` component orchestrates these hooks, handles coordinate transformation from video resolution to display space for accurate overlay rendering, and provides optional UI components for camera controls (torch, zoom, on/off). The library handles browser-specific quirks like the torch/zoom constraint conflict on mobile devices and provides robust error mapping for camera access issues.
This is a privacy-focused Android application for scanning and generating QR codes and barcodes, developed by the SECUSO research group (Security, Usability, Society) at TU Darmstadt. The app uses the device camera to decode codes, supports image picker scanning, and provides a QR code generator for various content types (URL, text, email, phone, SMS, WiFi, vCard, MeCard, BizCard, geo-location, product, calendar, etc.). It emphasizes minimal permissions (only camera, no internet required for scanning) and includes phishing protection by highlighting domains and requiring user confirmation before opening links. The architecture follows standard Android patterns: Activities with ViewModel + LiveData, Room database for scan history, Repository pattern, and a navigation drawer for main sections (Scanner, Generator, History, Settings, Help, About). The codebase is a mix of Java and Kotlin, uses AndroidX, Material Design, ZXing for barcode decoding, and Glide for image loading. It also integrates a backup service via a git submodule (privacy-friendly-backup-api). The app is part of the Privacy Friendly Apps suite and is licensed under GPLv3.