# evan361425/flutter-pos-system architecture

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

- Interactive diagram: https://gitdiagram.com/evan361425/flutter-pos-system
- Repository: https://github.com/evan361425/flutter-pos-system

## Overview

POS System is an offline-oriented Flutter point-of-sale app for small restaurants and businesses. The principal workflow is managing products and ingredients, assembling and checking out orders, handling cash, and optionally printing receipts; the app also provides inventory management, analytics, and data transit for export and backup. The graph preserves these README-documented capabilities and groups their likely implementation areas by repository paths. Source excerpts cover only platform shells, not Dart runtime wiring, so most internal connections are shown as unverified dashed relationships rather than asserted calls.

Main entry points: [`lib/models/repository`](https://github.com/evan361425/flutter-pos-system/tree/master/lib/models/repository) (Domain repositories), [`lib/ui/order`](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/order) (Order and cart), [`lib/ui/home`](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/home) (Home and settings), [`lib/ui/order/order_checkout_page.dart`](https://github.com/evan361425/flutter-pos-system/blob/master/lib/ui/order/order_checkout_page.dart) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and settings"]
  node_app_entry["Flutter app<br/>[main.dart]"]
  node_home["Home and settings"]
end

subgraph group_sales["Sales workflow"]
  node_menu["Menu management"]
  node_order["Order and cart"]
  node_checkout["Checkout"]
  node_cashier["Cash register"]
  node_printer_ui["Printer setup"]
end

subgraph group_operations["Business operations"]
  node_inventory["Inventory and replenishment"]
  node_customer_data["Customer attributes"]
  node_analytics["Analytics and history"]
  node_transit["Import and export"]
end

subgraph group_platform["Data and integrations"]
  node_domain_models["Domain models"]
  node_repositories["Domain repositories"]
  node_database[("Local database<br/>[database.dart]")]
  node_bluetooth["Bluetooth printing<br/>[bluetooth.dart]"]
end

node_user(("Staff user"))
node_external_data(("External data destination"))

node_user -.->|"uses"| node_app_entry
node_app_entry -.->|"opens"| node_home
node_home -.->|"navigates"| node_menu
node_home -.->|"navigates"| node_order
node_order -.->|"checks out"| node_checkout
node_checkout -.->|"handles payment"| node_cashier
node_checkout -.->|"prints receipt"| node_printer_ui
node_printer_ui -.->|"configures"| node_bluetooth
node_bluetooth -.->|"prints receipt"| node_user
node_menu -.->|"uses"| node_repositories
node_order -.->|"uses"| node_repositories
node_inventory -.->|"uses"| node_repositories
node_analytics -.->|"uses"| node_repositories
node_repositories -.->|"persists data"| node_database
node_repositories -.->|"uses"| node_domain_models
node_customer_data -.->|"captures attributes"| node_order
node_transit -.->|"exports data"| node_external_data

click node_app_entry "https://github.com/evan361425/flutter-pos-system/blob/master/lib/main.dart"
click node_home "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/home"
click node_menu "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/menu"
click node_order "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/order"
click node_checkout "https://github.com/evan361425/flutter-pos-system/blob/master/lib/ui/order/order_checkout_page.dart"
click node_cashier "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/cashier"
click node_printer_ui "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/printer"
click node_inventory "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/stock"
click node_customer_data "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/order_attr"
click node_analytics "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/analysis"
click node_transit "https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/transit"
click node_domain_models "https://github.com/evan361425/flutter-pos-system/tree/master/lib/models"
click node_repositories "https://github.com/evan361425/flutter-pos-system/tree/master/lib/models/repository"
click node_database "https://github.com/evan361425/flutter-pos-system/blob/master/lib/services/database.dart"
click node_bluetooth "https://github.com/evan361425/flutter-pos-system/blob/master/lib/services/bluetooth.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_home,node_user toneBlue
class node_menu,node_order,node_checkout,node_cashier,node_printer_ui toneAmber
class node_inventory,node_customer_data,node_analytics,node_transit toneMint
class node_domain_models,node_repositories,node_database,node_bluetooth toneRose
class node_external_data toneIndigo
```

## Components

### App and settings

- [Flutter app](https://github.com/evan361425/flutter-pos-system/blob/master/lib/main.dart): `lib/main.dart`
- [Home and settings](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/home): `lib/ui/home`

### Sales workflow

- [Menu management](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/menu): `lib/ui/menu`
- [Order and cart](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/order): `lib/ui/order`
- [Checkout](https://github.com/evan361425/flutter-pos-system/blob/master/lib/ui/order/order_checkout_page.dart): `lib/ui/order/order_checkout_page.dart`
- [Cash register](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/cashier): `lib/ui/cashier`
- [Printer setup](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/printer): `lib/ui/printer`

### Business operations

- [Inventory and replenishment](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/stock): `lib/ui/stock`
- [Customer attributes](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/order_attr): `lib/ui/order_attr`
- [Analytics and history](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/analysis): `lib/ui/analysis`
- [Import and export](https://github.com/evan361425/flutter-pos-system/tree/master/lib/ui/transit): `lib/ui/transit`

### Data and integrations

- [Domain models](https://github.com/evan361425/flutter-pos-system/tree/master/lib/models): `lib/models`
- [Domain repositories](https://github.com/evan361425/flutter-pos-system/tree/master/lib/models/repository): `lib/models/repository`
- [Local database](https://github.com/evan361425/flutter-pos-system/blob/master/lib/services/database.dart): `lib/services/database.dart`
- [Bluetooth printing](https://github.com/evan361425/flutter-pos-system/blob/master/lib/services/bluetooth.dart): `lib/services/bluetooth.dart`

### Other components

- **Staff user**
- **External data destination**

## Connections

- Staff user → Flutter app: uses
- Flutter app → Home and settings: opens
- Home and settings → Menu management: navigates
- Home and settings → Order and cart: navigates
- Order and cart → Checkout: checks out
- Checkout → Cash register: handles payment
- Checkout → Printer setup: prints receipt
- Printer setup → Bluetooth printing: configures
- Bluetooth printing → Staff user: prints receipt
- Menu management → Domain repositories: uses
- Order and cart → Domain repositories: uses
- Inventory and replenishment → Domain repositories: uses
- Analytics and history → Domain repositories: uses
- Domain repositories → Local database: persists data
- Domain repositories → Domain models: uses
- Customer attributes → Order and cart: captures attributes
- Import and export → External data destination: exports data
