# chkampawlow/el_fatoura_mobile architecture

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

- Interactive diagram: https://gitdiagram.com/chkampawlow/el_fatoura_mobile
- Repository: https://github.com/chkampawlow/el_fatoura_mobile

## Overview

El Fatoura Mobile is a Flutter companion for commercial operations handled by an existing PHP platform. The principal workflow is a user completing an operational task in the mobile UI, which communicates with the PHP JSON API; the backend applies authentication, company membership, permissions, and business rules before using its database. The README documents these capabilities, but no Dart application source was excerpted, so internal screen-to-service and service-to-repository calls are not asserted. Paths identify source files or directories present in the tree.

Main entry points: [`lib/core/api_client.dart`](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/core/api_client.dart) (API client), [`lib/main.dart`](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/main.dart) (App entry), [`lib/screens`](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens) (Business workflows), [`lib/services/auth_service.dart`](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/services/auth_service.dart) (Session and identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Mobile application"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_auth_ui["Authentication flows"]
  node_permission_ui["Permission-aware UI"]
end

subgraph group_operations["Commercial operations"]
  node_operations_ui["Business workflows"]
  node_dashboard_search["Dashboard and search"]
  node_supplier_reception["Supplier receptions"]
  node_accounting_review["Accounting review"]
  node_document_center["Document center"]
end

subgraph group_platform["Platform services"]
  node_auth_service["Session and identity<br/>[auth_service.dart]"]
  node_api_client["API client<br/>[api_client.dart]"]
  node_local_repositories["API and local repositories"]
end

subgraph group_integrations["Capture and exports"]
  node_capture_review["Capture and extractor review"]
  node_barcode_scanning["Barcode scanning"]
  node_document_exports["PDF and XML"]
  node_assistant["Optional assistant"]
end

node_user(("Mobile user"))
node_php_api["PHP JSON API"]
node_backend_auth["Auth and membership"]
node_business_services["Business services"]
node_database[("MariaDB / MySQL")]

node_user -.->|"uses"| node_app_entry
node_app_entry -.->|"presents"| node_auth_ui
node_app_entry -.->|"presents"| node_operations_ui
node_user -.->|"authenticates"| node_auth_ui
node_auth_ui -.->|"handles sessions"| node_auth_service
node_auth_service -.->|"sends requests"| node_api_client
node_operations_ui -.->|"checks access"| node_permission_ui
node_operations_ui -->|"uses API"| node_api_client
node_dashboard_search -.->|"uses API"| node_api_client
node_supplier_reception -.->|"submits reception"| node_api_client
node_accounting_review -.->|"uses API"| node_api_client
node_document_center -.->|"uses API"| node_api_client
node_capture_review -.->|"uses API"| node_api_client
node_barcode_scanning -.->|"uses API"| node_api_client
node_document_exports -.->|"uses API"| node_api_client
node_assistant -.->|"optional integration"| node_api_client
node_api_client -->|"sends requests"| node_php_api
node_php_api -->|"authenticates"| node_backend_auth
node_backend_auth -->|"authorizes"| node_business_services
node_business_services -->|"reads and writes"| node_database
node_local_repositories -.->|"uses API"| node_api_client

click node_app_entry "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/main.dart"
click node_auth_ui "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens"
click node_permission_ui "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens"
click node_operations_ui "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens"
click node_dashboard_search "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens"
click node_supplier_reception "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/supplier_receptions_screen.dart"
click node_accounting_review "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/accounting_review_screen.dart"
click node_document_center "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/document_center_screen.dart"
click node_auth_service "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/services/auth_service.dart"
click node_api_client "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/core/api_client.dart"
click node_local_repositories "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/storage"
click node_capture_review "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens"
click node_barcode_scanning "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/product_barcode_scanner_screen.dart"
click node_document_exports "https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/services"
click node_assistant "https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/services/assistant_service.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_entry,node_auth_ui,node_permission_ui,node_user toneBlue
class node_operations_ui,node_dashboard_search,node_supplier_reception,node_accounting_review,node_document_center,node_database toneAmber
class node_auth_service,node_api_client,node_local_repositories,node_php_api toneMint
class node_capture_review,node_barcode_scanning,node_document_exports,node_assistant toneRose
class node_backend_auth,node_business_services toneIndigo
```

## Components

### Mobile application

- [App entry](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/main.dart): `lib/main.dart`
- [Authentication flows](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens): `lib/screens`
- [Permission-aware UI](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens): `lib/screens`

### Commercial operations

- [Business workflows](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens): `lib/screens`
- [Dashboard and search](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens): `lib/screens`
- [Supplier receptions](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/supplier_receptions_screen.dart): `lib/screens/supplier_receptions_screen.dart`
- [Accounting review](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/accounting_review_screen.dart): `lib/screens/accounting_review_screen.dart`
- [Document center](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/document_center_screen.dart): `lib/screens/document_center_screen.dart`

### Platform services

- [Session and identity](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [API client](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/core/api_client.dart): `lib/core/api_client.dart`
- [API and local repositories](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/storage): `lib/storage`

### Capture and exports

- [Capture and extractor review](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/screens): `lib/screens`
- [Barcode scanning](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/screens/product_barcode_scanner_screen.dart): `lib/screens/product_barcode_scanner_screen.dart`
- [PDF and XML](https://github.com/chkampawlow/el_fatoura_mobile/tree/main/lib/services): `lib/services`
- [Optional assistant](https://github.com/chkampawlow/el_fatoura_mobile/blob/main/lib/services/assistant_service.dart): `lib/services/assistant_service.dart`

### Other components

- **Mobile user**
- **PHP JSON API**
- **Auth and membership**
- **Business services**
- **MariaDB / MySQL**

## Connections

- Mobile user → App entry: uses
- App entry → Authentication flows: presents
- App entry → Business workflows: presents
- Mobile user → Authentication flows: authenticates
- Authentication flows → Session and identity: handles sessions
- Session and identity → API client: sends requests
- Business workflows → Permission-aware UI: checks access
- Business workflows → API client: uses API (evidence: `README.md`)
- Dashboard and search → API client: uses API
- Supplier receptions → API client: submits reception
- Accounting review → API client: uses API
- Document center → API client: uses API
- Capture and extractor review → API client: uses API
- Barcode scanning → API client: uses API
- PDF and XML → API client: uses API
- Optional assistant → API client: optional integration
- API client → PHP JSON API: sends requests (evidence: `README.md`)
- PHP JSON API → Auth and membership: authenticates (evidence: `README.md`)
- Auth and membership → Business services: authorizes (evidence: `README.md`)
- Business services → MariaDB / MySQL: reads and writes (evidence: `README.md`)
- API and local repositories → API client: uses API
