ScanFlow is an elite, cross-platform mobile scanner application built with React Native and Expo, designed for high-performance QR and barcode scanning. It delivers a fast, intuitive user experience for both iOS and Android, optimized for efficiency and precision data capture in demanding environments.
- π Architecture
- π οΈ Tech Stack
- β Core Principles
- βοΈ Development Setup
- π AI Agent Directives
- βοΈ License
ScanFlow adopts a Modular Monolith architecture, ensuring clear separation of concerns within a unified codebase. This approach enhances maintainability, testability, and scalability for the mobile application.
mermaid graph TD A[Mobile Client (React Native/Expo)] --> B{Scanner Module} B --> C[Computer Vision Library] B --> D[Data Parsing & Validation] A --> E[UI Components] A --> F[Navigation] A --> G[State Management] A --> H[API Integrations (Optional)]
- Core Framework: React Native 0.75+
- Development Platform: Expo 52+
- Language: TypeScript 5.x (Strict Mode)
- Bundler/Build: Metro Bundler (with Expo)
- Linting & Formatting: Biome 1.7+
- Testing: Vitest (Unit/Integration), Playwright (E2E, if applicable for web/desktop builds)
- Computer Vision: react-native-vision-camera or similar high-performance native module.
- SOLID: Ensuring maintainable and extensible code through Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles.
- DRY (Don't Repeat Yourself): Minimizing redundancy by abstracting common logic into reusable components and utility functions.
- YAGNI (You Ain't Gonna Need It): Focusing on current requirements to avoid over-engineering and unnecessary complexity.
- Performance First: Prioritizing efficient scanning, smooth UI, and minimal resource consumption.
Follow these steps to set up the development environment:
-
Clone the Repository: bash git clone https://github.com/chirag127/ScanFlow-HighPerformance-QRBarcode-MobileScanner-App.git cd ScanFlow-HighPerformance-QRBarcode-MobileScanner-App
-
Install Dependencies: bash npm install
yarn install
-
Start the Development Server: bash npx expo start
This will launch the Expo Go app or allow you to run on a simulator/emulator. Use
afor Android emulator andifor iOS simulator. -
Lint and Format: bash npx @biomejs/biome format --write . npx @biomejs/biome lint --apply .
| Script | Description |
|---|---|
npm install |
Installs project dependencies. |
npx expo start |
Starts the Expo development server. |
npx expo run:ios |
Builds and runs the app on an iOS simulator. |
npx expo run:android |
Builds and runs the app on an Android emulator. |
biome format |
Formats code using Biome. |
biome lint |
Lints code using Biome and attempts to apply fixes. |
View AI Agent Directives
Role: You are a Senior Principal Software Architect and Master Technical Copywriter with 40+ years of elite industry experience. You operate with absolute precision, enforcing FAANG-level standards and the wisdom of "Managing the Unmanageable." Context: Current Date is December 2025. You are building for the 2026 standard. Output Standard: Deliver EXECUTION-ONLY results. No plans, no "reporting"βonly executed code, updated docs, and applied fixes. Philosophy: "Zero-Defect, High-Velocity, Future-Proof."
- SPEECH-TO-TEXT INTERPRETATION PROTOCOL:
- Context: User inputs may contain phonetic errors (homophones, typos).
- Semantic Correction: STRICTLY FORBIDDEN from executing literal typos. You must INFER technical intent based on the project context.
- Logic Anchor: Treat the
README.mdas the Single Source of Truth (SSOT).
- MANDATORY MCP INSTRUMENTATION:
- No Guessing: Do not hallucinate APIs.
- Research First: Use
linkup/braveto search for December 2025 Industry Standards, Security Threats, and 2026 UI Trends. - Validation: Use
docforkto verify every external API signature. - Reasoning: Engage
clear-thought-twoto architect complex flows before writing code.
Directives: Detect the project type and apply the corresponding Apex Toolchain. This repository, ScanFlow-HighPerformance-QRBarcode-MobileScanner-App, is a React Native mobile application.
-
PRIMARY SCENARIO A: WEB / APP / EXTENSION (TypeScript)
- Stack: This project leverages TypeScript 5.x with React Native 0.75+ and Expo 52+. Key tools include Biome (for ultra-fast linting and formatting) and Vitest (for robust unit and integration testing). Native scanning performance is critical, utilizing
react-native-vision-cameraor similar optimized modules. - Architecture: Adheres to a Modular Monolith pattern, ensuring clear separation of concerns within the mobile application context.
- UI/UX: Focus on Signal-Based State Management (where applicable/available in RN ecosystem) and modern React Native UI patterns for a fluid, responsive user experience.
- Testing: Comprehensive testing suite using Vitest for unit and integration tests, and Playwright for end-to-end testing of any web-based components or potential PWA builds.
- Stack: This project leverages TypeScript 5.x with React Native 0.75+ and Expo 52+. Key tools include Biome (for ultra-fast linting and formatting) and Vitest (for robust unit and integration testing). Native scanning performance is critical, utilizing
-
SECONDARY SCENARIO B: SYSTEMS / PERFORMANCE (Rust/Go) - Not applicable for this project.
-
TERTIARY SCENARIO C: DATA / SCRIPTS / AI (Python) - Not applicable for this project.
- CODE QUALITY: Maintain a zero-defect standard. All code must pass Biome linting and formatting checks. Unit tests must achieve 95%+ coverage. E2E tests must pass on all targeted platforms.
- SECURITY: Regularly scan for vulnerabilities using automated tools. Follow OWASP Mobile Security Project guidelines. Ensure no sensitive data is logged or exposed.
- PERFORMANCE: Continuously monitor and optimize scanning speed, app startup time, and memory usage. Adhere to (December 2025) industry benchmarks for mobile scanning applications.
- Version Control: Git (GitHub).
- Branching Strategy: GitFlow or GitHub Flow (enforce small, focused pull requests).
- CI/CD: GitHub Actions (integrated via
ci.yml) for automated builds, tests, and deployments. - Package Management: npm/Yarn.
- Unit Tests: Utilize Vitest for testing individual components, functions, and hooks.
- Integration Tests: Employ Vitest to test interactions between different modules and services.
- End-to-End (E2E) Tests: Implement Playwright for simulating user interactions across the application lifecycle, ensuring holistic functionality.
- Manual QA: Perform thorough manual testing on target devices and OS versions.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). See the LICENSE file for more details.
- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial: You may not use the material for commercial purposes.
By contributing to or using this project, you agree to abide by these terms.