# mathankumar-dev/qrgenx architecture

> Architecture diagram of the GitHub repository mathankumar-dev/qrgenx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mathankumar-dev/qrgenx
- Repository: https://github.com/mathankumar-dev/qrgenx

## Overview

QrGenX is a Flutter QR/barcode utility. The main user journey is scanning with the camera or from a gallery image, viewing the decoded result, and retaining scans in local history; separate branches generate and share QR images and manage settings and themes. The README documents these capabilities and paths, but no Dart implementation was excerpted, so the relationships below rely on README statements rather than inspected call sites.

Main entry points: [`lib/common/pages/main_template_screen.dart`](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/main_template_screen.dart) (Navigation shell), [`lib/common/provider/history_provider.dart`](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/provider/history_provider.dart) (History state), [`lib/features/scan/qr_camera_scan_page.dart`](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/scan/qr_camera_scan_page.dart) (Camera scanning), [`lib/features/scan`](https://github.com/mathankumar-dev/qrgenx/tree/master/lib/features/scan) (Gallery scanning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_entry["App entry<br/>[main.dart]"]
  node_splash["Splash screen<br/>[splash_screen.dart]"]
  node_welcome["Welcome screen<br/>[welcome_page.dart]"]
  node_shell["Navigation shell"]
  node_settings["Settings<br/>[settings_page.dart]"]
  node_theme["Theme state"]
end

subgraph group_scanning["Scanning"]
  node_camera["Camera scanning"]
  node_gallery["Gallery scanning"]
  node_decoder["Image decoder<br/>[qr_decoder.dart]"]
  node_result["Scan result"]
end

subgraph group_history["Scan history"]
  node_history_page["History screen<br/>[history_page.dart]"]
  node_history_state["History state"]
  node_history_store[("Local scan store")]
end

subgraph group_creation["QR creation"]
  node_generator["QR generator<br/>[generate_page.dart]"]
  node_share["QR image sharing<br/>[generate_page.dart]"]
  node_share_service["Share service"]
end

node_user(("User"))

node_user -->|"opens app"| node_entry
node_splash -->|"followed by"| node_welcome
node_shell -->|"offers scan"| node_camera
node_shell -->|"offers create"| node_generator
node_shell -->|"offers history"| node_history_page
node_shell -->|"offers settings"| node_settings
node_camera -->|"shows detection"| node_result
node_gallery -->|"decodes image"| node_decoder
node_decoder -->|"provides result"| node_result
node_camera -->|"saves scan"| node_history_state
node_gallery -->|"saves scan"| node_history_state
node_history_state -->|"persists locally"| node_history_store
node_history_page -->|"shows history"| node_history_state
node_settings -->|"toggles theme"| node_theme
node_generator -->|"exports PNG"| node_share
node_share -->|"shares image"| node_share_service

click node_entry "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/main.dart"
click node_splash "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/splash_screen.dart"
click node_welcome "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/welcome_page.dart"
click node_shell "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/main_template_screen.dart"
click node_settings "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/setting/settings_page.dart"
click node_theme "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/provider/theme_provider.dart"
click node_camera "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/scan/qr_camera_scan_page.dart"
click node_gallery "https://github.com/mathankumar-dev/qrgenx/tree/master/lib/features/scan"
click node_decoder "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/utils/qr_decoder.dart"
click node_result "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/scan/ScanResultpage.dart"
click node_history_page "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/history/history_page.dart"
click node_history_state "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/provider/history_provider.dart"
click node_history_store "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/data/models/scanned_code_model.dart"
click node_generator "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/generate/generate_page.dart"
click node_share "https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/generate/generate_page.dart"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_splash,node_welcome,node_shell,node_settings,node_theme,node_user toneBlue
class node_camera,node_gallery,node_decoder,node_result toneAmber
class node_history_page,node_history_state,node_history_store toneMint
class node_generator,node_share,node_share_service toneRose
```

## Components

### App experience

- [App entry](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/main.dart): `lib/main.dart`
- [Splash screen](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/splash_screen.dart): `lib/common/pages/splash_screen.dart`
- [Welcome screen](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/welcome_page.dart): `lib/common/pages/welcome_page.dart`
- [Navigation shell](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/pages/main_template_screen.dart): `lib/common/pages/main_template_screen.dart`
- [Settings](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/setting/settings_page.dart): `lib/features/setting/settings_page.dart`
- [Theme state](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/provider/theme_provider.dart): `lib/common/provider/theme_provider.dart`

### Scanning

- [Camera scanning](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/scan/qr_camera_scan_page.dart): `lib/features/scan/qr_camera_scan_page.dart`
- [Gallery scanning](https://github.com/mathankumar-dev/qrgenx/tree/master/lib/features/scan): `lib/features/scan`
- [Image decoder](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/utils/qr_decoder.dart): `lib/common/utils/qr_decoder.dart`
- [Scan result](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/scan/ScanResultpage.dart): `lib/features/scan/ScanResultpage.dart`

### Scan history

- [History screen](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/history/history_page.dart): `lib/features/history/history_page.dart`
- [History state](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/common/provider/history_provider.dart): `lib/common/provider/history_provider.dart`
- [Local scan store](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/data/models/scanned_code_model.dart): `lib/data/models/scanned_code_model.dart`

### QR creation

- [QR generator](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/generate/generate_page.dart): `lib/features/generate/generate_page.dart`
- [QR image sharing](https://github.com/mathankumar-dev/qrgenx/blob/master/lib/features/generate/generate_page.dart): `lib/features/generate/generate_page.dart`
- **Share service**

### Other components

- **User**

## Connections

- User → App entry: opens app (evidence: `README.md`)
- Splash screen → Welcome screen: followed by (evidence: `README.md`)
- Navigation shell → Camera scanning: offers scan (evidence: `README.md`)
- Navigation shell → QR generator: offers create (evidence: `README.md`)
- Navigation shell → History screen: offers history (evidence: `README.md`)
- Navigation shell → Settings: offers settings (evidence: `README.md`)
- Camera scanning → Scan result: shows detection (evidence: `README.md`)
- Gallery scanning → Image decoder: decodes image (evidence: `README.md`)
- Image decoder → Scan result: provides result (evidence: `README.md`)
- Camera scanning → History state: saves scan (evidence: `README.md`)
- Gallery scanning → History state: saves scan (evidence: `README.md`)
- History state → Local scan store: persists locally (evidence: `README.md`)
- History screen → History state: shows history (evidence: `README.md`)
- Settings → Theme state: toggles theme (evidence: `README.md`)
- QR generator → QR image sharing: exports PNG (evidence: `README.md`)
- QR image sharing → Share service: shares image (evidence: `README.md`)
