# arshad-dev57/pos_mobile_app architecture

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

- Interactive diagram: https://gitdiagram.com/arshad-dev57/pos_mobile_app
- Repository: https://github.com/arshad-dev57/pos_mobile_app

## Overview

This is a Flutter point-of-sale mobile app, inferred from the repository name and its screens and services; the README itself describes only a starter Flutter project. The apparent user journey is authentication and company selection, followed by shift and sales operations, with screens for inventory, customers, returns, and reporting. The Dart implementation was not sampled, so those stages and their connections are inferred from filenames; no call or data-flow edges can be verified from the available evidence.

Main entry points: [`lib/screens/login_screen.dart`](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/login_screen.dart) (Login), [`lib/screens/company_select_screen.dart`](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/company_select_screen.dart) (Company selection), [`lib/screens/open_shif_screen.dart`](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/open_shif_screen.dart) (Shift opening), [`lib/main.dart`](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/main.dart) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["POS screens"]
  node_login["Login<br/>[login_screen.dart]"]
  node_company["Company selection"]
  node_shift["Shift opening"]
  node_poshome["POS home"]
  node_sell["Sell<br/>[sell_screen.dart]"]
  node_held["Held sales<br/>[held_screen.dart]"]
  node_sales["Sales<br/>[sales_screen.dart]"]
  node_returns["Returns"]
  node_products["Products"]
  node_stock["Stock<br/>[stock_screen.dart]"]
  node_categories["Categories"]
  node_expiry["Expiry<br/>[expiry_screen.dart]"]
  node_customers["Customers"]
  node_suppliers["Suppliers"]
  node_accounts["Accounts"]
  node_reports["Reports"]
  node_settings["Settings"]
  node_restaurant["Restaurant"]
  node_admin["POS administration"]
end

subgraph group_operations["App operations"]
  node_app["App entry<br/>[main.dart]"]
  node_authcontroller["Auth controller"]
  node_shiftcontroller["Shift controller"]
  node_authmodels["Auth models<br/>[auth_models.dart]"]
  node_config["App configuration<br/>[app_config.dart]"]
end

subgraph group_integration["Backend integration"]
  node_backend["Backend API"]
  node_posapi["POS API"]
  node_posdata["POS data service"]
  node_mastersync["Master sync"]
  node_apiclient["API client<br/>[api_client.dart]"]
end

subgraph group_persistence["Local persistence"]
  node_authstore["Auth storage<br/>[auth_store.dart]"]
  node_localdb[("Local database<br/>[local_db.dart]")]
  node_masterdb[("Master SQLite database")]
end

node_user(("POS user"))

node_user -.->|"starts app"| node_app
node_app -.->|"opens"| node_login
node_login -.->|"selects company"| node_company
node_company -.->|"opens shift"| node_shift
node_shift -.->|"enters POS"| node_poshome

click node_app "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/main.dart"
click node_login "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/login_screen.dart"
click node_company "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/company_select_screen.dart"
click node_shift "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/open_shif_screen.dart"
click node_poshome "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/pos_homepage_screen.dart"
click node_sell "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/sell_screen.dart"
click node_held "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/held_screen.dart"
click node_sales "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/sales_screen.dart"
click node_returns "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/returns_screen.dart"
click node_products "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/products_screen.dart"
click node_stock "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/stock_screen.dart"
click node_categories "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/categories_screen.dart"
click node_expiry "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/expiry_screen.dart"
click node_customers "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/customers_screen.dart"
click node_suppliers "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/suppliers_screen.dart"
click node_accounts "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/accounts_screen.dart"
click node_reports "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/reports_screen.dart"
click node_settings "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/settings_screen.dart"
click node_restaurant "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/restaurant_screen.dart"
click node_admin "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/pos_admin_screen.dart"
click node_authcontroller "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/controllers/auth_controller.dart"
click node_shiftcontroller "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/controllers/shift_controller.dart"
click node_authmodels "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/models/auth_models.dart"
click node_backend "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/backend_api_service.dart"
click node_posapi "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/pos_api_service.dart"
click node_posdata "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/pos_data_service.dart"
click node_mastersync "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/master_sync_service.dart"
click node_apiclient "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/network/api_client.dart"
click node_authstore "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/storage/auth_store.dart"
click node_localdb "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/database/local_db.dart"
click node_masterdb "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/database/master_sqlite_db.dart"
click node_config "https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/config/app_config.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_login,node_company,node_shift,node_poshome,node_sell,node_held,node_sales,node_returns,node_products,node_stock,node_categories,node_expiry,node_customers,node_suppliers,node_accounts,node_reports,node_settings,node_restaurant,node_admin,node_user toneBlue
class node_app,node_authcontroller,node_shiftcontroller,node_authmodels,node_config toneAmber
class node_backend,node_posapi,node_posdata,node_mastersync,node_apiclient toneMint
class node_authstore,node_localdb,node_masterdb toneRose
```

## Components

### POS screens

- [Login](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`
- [Company selection](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/company_select_screen.dart): `lib/screens/company_select_screen.dart`
- [Shift opening](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/open_shif_screen.dart): `lib/screens/open_shif_screen.dart`
- [POS home](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/pos_homepage_screen.dart): `lib/screens/pos_homepage_screen.dart`
- [Sell](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/sell_screen.dart): `lib/screens/sell_screen.dart`
- [Held sales](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/held_screen.dart): `lib/screens/held_screen.dart`
- [Sales](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/sales_screen.dart): `lib/screens/sales_screen.dart`
- [Returns](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/returns_screen.dart): `lib/screens/returns_screen.dart`
- [Products](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/products_screen.dart): `lib/screens/products_screen.dart`
- [Stock](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/stock_screen.dart): `lib/screens/stock_screen.dart`
- [Categories](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/categories_screen.dart): `lib/screens/categories_screen.dart`
- [Expiry](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/expiry_screen.dart): `lib/screens/expiry_screen.dart`
- [Customers](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/customers_screen.dart): `lib/screens/customers_screen.dart`
- [Suppliers](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/suppliers_screen.dart): `lib/screens/suppliers_screen.dart`
- [Accounts](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/accounts_screen.dart): `lib/screens/accounts_screen.dart`
- [Reports](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/reports_screen.dart): `lib/screens/reports_screen.dart`
- [Settings](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/settings_screen.dart): `lib/screens/settings_screen.dart`
- [Restaurant](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/restaurant_screen.dart): `lib/screens/restaurant_screen.dart`
- [POS administration](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/screens/pos_admin_screen.dart): `lib/screens/pos_admin_screen.dart`

### App operations

- [App entry](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/main.dart): `lib/main.dart`
- [Auth controller](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/controllers/auth_controller.dart): `lib/controllers/auth_controller.dart`
- [Shift controller](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/controllers/shift_controller.dart): `lib/controllers/shift_controller.dart`
- [Auth models](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/models/auth_models.dart): `lib/models/auth_models.dart`
- [App configuration](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/config/app_config.dart): `lib/core/config/app_config.dart`

### Backend integration

- [Backend API](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/backend_api_service.dart): `lib/services/backend_api_service.dart`
- [POS API](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/pos_api_service.dart): `lib/services/pos_api_service.dart`
- [POS data service](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/pos_data_service.dart): `lib/services/pos_data_service.dart`
- [Master sync](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/services/master_sync_service.dart): `lib/services/master_sync_service.dart`
- [API client](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/network/api_client.dart): `lib/core/network/api_client.dart`

### Local persistence

- [Auth storage](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/storage/auth_store.dart): `lib/core/storage/auth_store.dart`
- [Local database](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/database/local_db.dart): `lib/core/database/local_db.dart`
- [Master SQLite database](https://github.com/arshad-dev57/pos_mobile_app/blob/main/lib/core/database/master_sqlite_db.dart): `lib/core/database/master_sqlite_db.dart`

### Other components

- **POS user**

## Connections

- POS user → App entry: starts app
- App entry → Login: opens
- Login → Company selection: selects company
- Company selection → Shift opening: opens shift
- Shift opening → POS home: enters POS
