# dushansenura/pos-system-flutter architecture

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

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

## Overview

This is a cross-platform Flutter POS application for retail and small businesses. Its documented core workflow is managing products, adding items to a cart, and completing sales and billing with automatic total, tax, and discount calculations. The tree also shows distinct authentication, employee, reporting, settings, scanning, and printing subsystems. Dart implementation excerpts were not provided, so internal calls and most integrations cannot be verified; dashed, unreferenced edges indicate inferred relationships rather than inspected wiring.

Main entry points: [`lib/features/pos/screens/pos_screen.dart`](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/pos/screens/pos_screen.dart) (POS checkout), [`lib/main.dart`](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/main.dart) (Flutter app), [`lib/features/auth/screens/login_screen.dart`](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/auth/screens/login_screen.dart) (Accounts and login), [`lib/features/sales/services/receipt_service.dart`](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/services/receipt_service.dart) (Receipt generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App foundation"]
  node_app_entry["Flutter app<br/>[main.dart]"]
  node_dashboard["Dashboard<br/>[home_screen.dart]"]
  node_auth["Accounts and login<br/>[login_screen.dart]"]
  node_users[("User records")]
end

subgraph group_checkout["Sales and checkout"]
  node_pos["POS checkout<br/>[pos_screen.dart]"]
  node_cart["Cart state<br/>[cart_provider.dart]"]
  node_payment["Payment selection"]
  node_sales[("Sales records")]
  node_receipt["Receipt generation"]
end

subgraph group_catalog["Catalog and staff"]
  node_products["Product management"]
  node_product_data[("Product data")]
  node_employees["Employee management"]
  node_employee_data[("Employee records")]
end

subgraph group_operations["Store operations"]
  node_printer["Printer service"]
  node_scanner["Barcode scanning"]
  node_settings[("Store settings")]
  node_backup["Backup and restore"]
end

subgraph group_insights["Sales insights"]
  node_reports["Sales history and summaries"]
  node_income["Income summary"]
end

node_operator(("Store operator"))
node_drive["Google Drive"]

node_operator -.->|"uses"| node_app_entry
node_app_entry -.->|"opens"| node_dashboard
node_operator -.->|"manages"| node_products
node_products -.->|"updates"| node_product_data
node_operator -.->|"checks out"| node_pos
node_pos -.->|"uses"| node_cart
node_pos -.->|"selects items"| node_product_data
node_pos -.->|"selects payment"| node_payment
node_pos -.->|"records sale"| node_sales
node_pos -.->|"generates receipt"| node_receipt
node_receipt -.->|"prints"| node_printer
node_operator -.->|"signs in"| node_auth
node_auth -.->|"checks accounts"| node_users
node_operator -.->|"manages"| node_employees
node_employees -.->|"updates"| node_employee_data
node_pos -.->|"scans items"| node_scanner
node_operator -.->|"configures"| node_settings
node_operator -.->|"manages backups"| node_backup
node_backup -.->|"backs up"| node_drive
node_operator -.->|"reviews"| node_reports
node_operator -.->|"reviews"| node_income

click node_app_entry "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/main.dart"
click node_dashboard "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/dashboard/screens/home_screen.dart"
click node_auth "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/auth/screens/login_screen.dart"
click node_users "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/auth/providers/users_provider.dart"
click node_products "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/products/screens/products_screen.dart"
click node_product_data "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/products/providers/products_provider.dart"
click node_employees "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/employees/screens/employees_screen.dart"
click node_employee_data "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/employees/providers/employees_provider.dart"
click node_pos "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/pos/screens/pos_screen.dart"
click node_cart "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/cart/providers/cart_provider.dart"
click node_payment "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/pos/widgets/payment_method_dialog.dart"
click node_sales "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/providers/sales_provider.dart"
click node_receipt "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/services/receipt_service.dart"
click node_printer "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/printer/services/printer_service.dart"
click node_scanner "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/scanner/services/barcode_scanner_service.dart"
click node_settings "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/settings/providers/settings_provider.dart"
click node_backup "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/settings/screens/backup_restore_screen.dart"
click node_reports "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/screens/sales_history_screen.dart"
click node_income "https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/screens/income_summary_screen.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_dashboard,node_auth,node_users toneBlue
class node_pos,node_cart,node_payment,node_sales,node_receipt toneAmber
class node_products,node_product_data,node_employees,node_employee_data toneMint
class node_printer,node_scanner,node_settings,node_backup toneRose
class node_reports,node_income,node_operator,node_drive toneIndigo
```

## Components

### App foundation

- [Flutter app](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/main.dart): `lib/main.dart`
- [Dashboard](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/dashboard/screens/home_screen.dart): `lib/features/dashboard/screens/home_screen.dart`
- [Accounts and login](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/auth/screens/login_screen.dart): `lib/features/auth/screens/login_screen.dart`
- [User records](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/auth/providers/users_provider.dart): `lib/features/auth/providers/users_provider.dart`

### Sales and checkout

- [POS checkout](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/pos/screens/pos_screen.dart): `lib/features/pos/screens/pos_screen.dart`
- [Cart state](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/cart/providers/cart_provider.dart): `lib/features/cart/providers/cart_provider.dart`
- [Payment selection](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/pos/widgets/payment_method_dialog.dart): `lib/features/pos/widgets/payment_method_dialog.dart`
- [Sales records](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/providers/sales_provider.dart): `lib/features/sales/providers/sales_provider.dart`
- [Receipt generation](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/services/receipt_service.dart): `lib/features/sales/services/receipt_service.dart`

### Catalog and staff

- [Product management](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/products/screens/products_screen.dart): `lib/features/products/screens/products_screen.dart`
- [Product data](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/products/providers/products_provider.dart): `lib/features/products/providers/products_provider.dart`
- [Employee management](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/employees/screens/employees_screen.dart): `lib/features/employees/screens/employees_screen.dart`
- [Employee records](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/employees/providers/employees_provider.dart): `lib/features/employees/providers/employees_provider.dart`

### Store operations

- [Printer service](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/printer/services/printer_service.dart): `lib/features/printer/services/printer_service.dart`
- [Barcode scanning](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/scanner/services/barcode_scanner_service.dart): `lib/features/scanner/services/barcode_scanner_service.dart`
- [Store settings](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/settings/providers/settings_provider.dart): `lib/features/settings/providers/settings_provider.dart`
- [Backup and restore](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/settings/screens/backup_restore_screen.dart): `lib/features/settings/screens/backup_restore_screen.dart`

### Sales insights

- [Sales history and summaries](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/screens/sales_history_screen.dart): `lib/features/sales/screens/sales_history_screen.dart`
- [Income summary](https://github.com/dushansenura/pos-system-flutter/blob/main/lib/features/sales/screens/income_summary_screen.dart): `lib/features/sales/screens/income_summary_screen.dart`

### Other components

- **Store operator**
- **Google Drive**

## Connections

- Store operator → Flutter app: uses
- Flutter app → Dashboard: opens
- Store operator → Product management: manages
- Product management → Product data: updates
- Store operator → POS checkout: checks out
- POS checkout → Cart state: uses
- POS checkout → Product data: selects items
- POS checkout → Payment selection: selects payment
- POS checkout → Sales records: records sale
- POS checkout → Receipt generation: generates receipt
- Receipt generation → Printer service: prints
- Store operator → Accounts and login: signs in
- Accounts and login → User records: checks accounts
- Store operator → Employee management: manages
- Employee management → Employee records: updates
- POS checkout → Barcode scanning: scans items
- Store operator → Store settings: configures
- Store operator → Backup and restore: manages backups
- Backup and restore → Google Drive: backs up
- Store operator → Sales history and summaries: reviews
- Store operator → Income summary: reviews
