# sifoukhemira/troisquatorze architecture

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

- Interactive diagram: https://gitdiagram.com/sifoukhemira/troisquatorze
- Repository: https://github.com/sifoukhemira/troisquatorze

## Overview

Trois Quatorze is an offline-first Flutter delivery-receipt scanner. A driver captures a receipt; on-device OCR and regex extraction produce delivery details, which are saved locally and shown for navigation or calling. The README documents the product capabilities, but the Dart implementation was not excerpted, so relationships below are documented workflow rather than verified call sites.

Main entry points: [`lib/main.dart`](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart) (Active orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Receipt capture"]
  node_app["Scanner app<br/>[main.dart]"]
  node_camera["Camera capture<br/>[main.dart]"]
end

subgraph group_processing["Receipt processing"]
  node_ocr["On-device OCR<br/>[main.dart]"]
  node_mlkit["Google ML Kit"]
  node_extract["Data extraction<br/>[main.dart]"]
end

subgraph group_orders["Delivery management"]
  node_orders["Active orders<br/>[main.dart]"]
  node_storage[("Local persistence<br/>[main.dart]")]
  node_selection["Batch selection<br/>[main.dart]"]
end

subgraph group_actions["Delivery actions"]
  node_navigation["Map navigation<br/>[main.dart]"]
  node_maps["Google Maps"]
  node_calling["Customer calling<br/>[main.dart]"]
  node_phone["Phone app"]
end

node_driver(("Driver"))

node_driver -->|"uses"| node_app
node_app -->|"opens"| node_camera
node_camera -->|"provides image"| node_ocr
node_ocr -->|"recognizes text"| node_mlkit
node_ocr -->|"provides text"| node_extract
node_extract -->|"extracts details"| node_orders
node_orders -->|"saves orders"| node_storage
node_storage -->|"restores orders"| node_orders
node_orders -->|"supports selection"| node_selection
node_selection -->|"batch deletes"| node_orders
node_orders -->|"starts navigation"| node_navigation
node_navigation -->|"opens map"| node_maps
node_orders -->|"starts call"| node_calling
node_calling -->|"dials number"| node_phone

click node_app "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_camera "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_ocr "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_extract "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_orders "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_storage "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_selection "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_navigation "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart"
click node_calling "https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.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_app,node_camera toneBlue
class node_ocr,node_mlkit,node_extract toneAmber
class node_orders,node_storage,node_selection toneMint
class node_navigation,node_maps,node_calling,node_phone toneRose
class node_driver toneIndigo
```

## Components

### Receipt capture

- [Scanner app](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`
- [Camera capture](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`

### Receipt processing

- [On-device OCR](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`
- **Google ML Kit**
- [Data extraction](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`

### Delivery management

- [Active orders](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`
- [Local persistence](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`
- [Batch selection](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`

### Delivery actions

- [Map navigation](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`
- **Google Maps**
- [Customer calling](https://github.com/sifoukhemira/troisquatorze/blob/main/lib/main.dart): `lib/main.dart`
- **Phone app**

### Other components

- **Driver**

## Connections

- Driver → Scanner app: uses (evidence: `README.md`)
- Scanner app → Camera capture: opens (evidence: `README.md`)
- Camera capture → On-device OCR: provides image (evidence: `README.md`)
- On-device OCR → Google ML Kit: recognizes text (evidence: `README.md`)
- On-device OCR → Data extraction: provides text (evidence: `README.md`)
- Data extraction → Active orders: extracts details (evidence: `README.md`)
- Active orders → Local persistence: saves orders (evidence: `README.md`)
- Local persistence → Active orders: restores orders (evidence: `README.md`)
- Active orders → Batch selection: supports selection (evidence: `README.md`)
- Batch selection → Active orders: batch deletes (evidence: `README.md`)
- Active orders → Map navigation: starts navigation (evidence: `README.md`)
- Map navigation → Google Maps: opens map (evidence: `README.md`)
- Active orders → Customer calling: starts call (evidence: `README.md`)
- Customer calling → Phone app: dials number (evidence: `README.md`)
