# blair2004/nexopos architecture

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

- Interactive diagram: https://gitdiagram.com/blair2004/nexopos
- Repository: https://github.com/blair2004/nexopos

## Overview

NexoPOS is an extensible retail point-of-sale application for managing sales, inventory, purchasing, customers, accounting, and store operations. A typical staff workflow enters through dashboard controllers, which invoke domain services and persist or retrieve business records; the dashboard also exposes reporting. The README documents additional core capabilities, including permissions, rewards, barcode support, media, and extensibility. Some feature areas are represented by their listed controllers or services, but their internal call paths were not sampled, so the graph avoids inferring those connections.

Main entry points: [`app/Http/Controllers/DashboardController.php`](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/DashboardController.php) (Dashboard), [`app/Services/ProductService.php`](https://github.com/blair2004/nexopos/blob/master/app/Services/ProductService.php) (Product services), [`app/Services/OrdersService.php`](https://github.com/blair2004/nexopos/blob/master/app/Services/OrdersService.php) (Order processing), [`app/Http/Controllers/AuthController.php`](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/AuthController.php) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboard"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_dashboard["Dashboard"]
end

subgraph group_sales["Sales operations"]
  node_orders_ui["Order operations"]
  node_orders_service["Order processing<br/>[OrdersService.php]"]
  node_order["Order records<br/>[Order.php]"]
  node_order_product["Order line items<br/>[OrderProduct.php]"]
  node_customers["Customer management"]
end

subgraph group_catalog["Catalog and stock"]
  node_product_ui["Product operations"]
  node_product_service["Product services<br/>[ProductService.php]"]
  node_product["Product catalog<br/>[Product.php]"]
  node_stock_history["Stock history<br/>[ProductHistory.php]"]
  node_procurement["Procurement"]
end

subgraph group_insight["Reporting and accounting"]
  node_transactions["Transactions"]
  node_reports["Reports"]
  node_accounting["Accounting journals"]
end

subgraph group_platform["Extensibility and store"]
  node_modules["Module system<br/>[ModulesService.php]"]
  node_hooks["Extension hooks<br/>[Hook.php]"]
  node_mcp["MCP tools and resources<br/>[POSServer.php]"]
  node_media["Media management"]
end

node_staff(("Store staff"))

node_staff -->|"signs in"| node_auth
node_staff -.->|"uses"| node_dashboard
node_product_ui -->|"calls"| node_product_service
node_product_service -->|"uses"| node_product
node_product_service -->|"uses"| node_stock_history
node_orders_service -->|"processes"| node_order
node_orders_service -->|"processes"| node_order_product
node_dashboard -->|"loads"| node_modules
node_dashboard -.->|"serves"| node_reports
node_order -->|"associates"| node_accounting
node_product -->|"relates"| node_stock_history
node_auth -->|"filters redirect"| node_hooks
node_modules -.->|"supports extensions"| node_hooks

click node_auth "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/AuthController.php"
click node_dashboard "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/DashboardController.php"
click node_orders_ui "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/OrdersController.php"
click node_orders_service "https://github.com/blair2004/nexopos/blob/master/app/Services/OrdersService.php"
click node_order "https://github.com/blair2004/nexopos/blob/master/app/Models/Order.php"
click node_order_product "https://github.com/blair2004/nexopos/blob/master/app/Models/OrderProduct.php"
click node_product_ui "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/ProductsController.php"
click node_product_service "https://github.com/blair2004/nexopos/blob/master/app/Services/ProductService.php"
click node_product "https://github.com/blair2004/nexopos/blob/master/app/Models/Product.php"
click node_stock_history "https://github.com/blair2004/nexopos/blob/master/app/Models/ProductHistory.php"
click node_procurement "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/ProcurementController.php"
click node_customers "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/CustomersController.php"
click node_transactions "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/TransactionController.php"
click node_reports "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/ReportsController.php"
click node_accounting "https://github.com/blair2004/nexopos/blob/master/app/Models/AccountingJournal.php"
click node_modules "https://github.com/blair2004/nexopos/blob/master/app/Services/ModulesService.php"
click node_hooks "https://github.com/blair2004/nexopos/blob/master/app/Classes/Hook.php"
click node_mcp "https://github.com/blair2004/nexopos/blob/master/app/Mcp/Servers/POSServer.php"
click node_media "https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/MediasController.php"

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_auth,node_dashboard toneBlue
class node_orders_ui,node_orders_service,node_order,node_order_product,node_customers toneAmber
class node_product_ui,node_product_service,node_product,node_stock_history,node_procurement toneMint
class node_transactions,node_reports,node_accounting toneRose
class node_modules,node_hooks,node_mcp,node_media,node_staff toneIndigo
```

## Components

### Access and dashboard

- [Authentication](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Dashboard](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`

### Sales operations

- [Order operations](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/OrdersController.php): `app/Http/Controllers/Dashboard/OrdersController.php`
- [Order processing](https://github.com/blair2004/nexopos/blob/master/app/Services/OrdersService.php): `app/Services/OrdersService.php`
- [Order records](https://github.com/blair2004/nexopos/blob/master/app/Models/Order.php): `app/Models/Order.php`
- [Order line items](https://github.com/blair2004/nexopos/blob/master/app/Models/OrderProduct.php): `app/Models/OrderProduct.php`
- [Customer management](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/CustomersController.php): `app/Http/Controllers/Dashboard/CustomersController.php`

### Catalog and stock

- [Product operations](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/ProductsController.php): `app/Http/Controllers/Dashboard/ProductsController.php`
- [Product services](https://github.com/blair2004/nexopos/blob/master/app/Services/ProductService.php): `app/Services/ProductService.php`
- [Product catalog](https://github.com/blair2004/nexopos/blob/master/app/Models/Product.php): `app/Models/Product.php`
- [Stock history](https://github.com/blair2004/nexopos/blob/master/app/Models/ProductHistory.php): `app/Models/ProductHistory.php`
- [Procurement](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/ProcurementController.php): `app/Http/Controllers/Dashboard/ProcurementController.php`

### Reporting and accounting

- [Transactions](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/TransactionController.php): `app/Http/Controllers/Dashboard/TransactionController.php`
- [Reports](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/ReportsController.php): `app/Http/Controllers/Dashboard/ReportsController.php`
- [Accounting journals](https://github.com/blair2004/nexopos/blob/master/app/Models/AccountingJournal.php): `app/Models/AccountingJournal.php`

### Extensibility and store

- [Module system](https://github.com/blair2004/nexopos/blob/master/app/Services/ModulesService.php): `app/Services/ModulesService.php`
- [Extension hooks](https://github.com/blair2004/nexopos/blob/master/app/Classes/Hook.php): `app/Classes/Hook.php`
- [MCP tools and resources](https://github.com/blair2004/nexopos/blob/master/app/Mcp/Servers/POSServer.php): `app/Mcp/Servers/POSServer.php`
- [Media management](https://github.com/blair2004/nexopos/blob/master/app/Http/Controllers/Dashboard/MediasController.php): `app/Http/Controllers/Dashboard/MediasController.php`

### Other components

- **Store staff**

## Connections

- Store staff → Authentication: signs in (evidence: `app/Http/Controllers/AuthController.php`)
- Store staff → Dashboard: uses
- Product operations → Product services: calls (evidence: `app/Http/Controllers/Dashboard/ProductsController.php`)
- Product services → Product catalog: uses (evidence: `app/Services/ProductService.php`)
- Product services → Stock history: uses (evidence: `app/Services/ProductService.php`)
- Order processing → Order records: processes (evidence: `app/Services/OrdersService.php`)
- Order processing → Order line items: processes (evidence: `app/Services/OrdersService.php`)
- Dashboard → Module system: loads (evidence: `app/Http/Controllers/DashboardController.php`)
- Dashboard → Reports: serves
- Order records → Accounting journals: associates (evidence: `app/Models/Order.php`)
- Product catalog → Stock history: relates (evidence: `app/Models/Product.php`)
- Authentication → Extension hooks: filters redirect (evidence: `app/Http/Controllers/AuthController.php`)
- Module system → Extension hooks: supports extensions
