# allzxxopemula/alzpoint-be architecture

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

- Interactive diagram: https://gitdiagram.com/allzxxopemula/alzpoint-be
- Repository: https://github.com/allzxxopemula/alzpoint-be

## Overview

This is a Laravel API for a business-scoped point-of-sale system. Users enter through API routes to authenticate, manage products and staff, create orders, and confirm or cancel them; order confirmation checks and updates stock. Supporting workflows cover customers, discounts, dashboard metrics, reports, activity logging, and business provisioning. The graph reflects relationships shown in excerpts and the source index; unsampled controller behavior is represented as capabilities, not inferred call chains.

Main entry points: [`routes/api.php`](https://github.com/allzxxopemula/alzpoint-be/blob/main/routes/api.php) (API routes), [`app/Http/Controllers/OrderController.php`](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/OrderController.php) (Order processing), [`app/Models/User.php`](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/User.php) (Users), [`app/Services/BusinessProvisioner.php`](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Services/BusinessProvisioner.php) (Business provisioner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["API entry"]
  node_routes["API routes<br/>[api.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_admin["Admin profile"]
end

subgraph group_operations["Sales operations"]
  node_cashier["Cashier management"]
  node_catalog["Product catalog"]
  node_categories["Category management"]
  node_discounts["Discount management"]
  node_orders["Order processing"]
  node_customers["Customer records"]
end

subgraph group_insights["Business insights"]
  node_dashboard["Dashboard metrics"]
  node_reports["Sales reports"]
end

subgraph group_domain["Domain and provisioning"]
  node_settings["Cooperative settings"]
  node_activity["Activity log access"]
  node_user["Users<br/>[User.php]"]
  node_business["Business<br/>[Business.php]"]
  node_product["Products<br/>[Product.php]"]
  node_category["Categories<br/>[Category.php]"]
  node_discount["Discounts<br/>[Discount.php]"]
  node_order["Orders<br/>[Order.php]"]
  node_item["Order items<br/>[OrderItem.php]"]
  node_coopsetting["Cooperative settings data"]
  node_activitymodel["Activity log data<br/>[ActivityLog.php]"]
  node_provisioner["Business provisioner"]
  node_productobserver["Product observer"]
  node_categoryobserver["Category observer"]
  node_provider["Observer registration"]
end

node_actor(("API clients"))

node_actor -->|"calls API"| node_routes
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_admin
node_routes -->|"routes to"| node_cashier
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_categories
node_routes -->|"routes to"| node_discounts
node_routes -->|"routes to"| node_orders
node_routes -->|"routes to"| node_customers
node_routes -->|"routes to"| node_settings
node_routes -->|"routes to"| node_activity
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_reports
node_auth -->|"reads and writes"| node_user
node_admin -->|"updates"| node_user
node_cashier -->|"manages"| node_user
node_catalog -->|"manages"| node_product
node_categories -->|"manages"| node_category
node_discounts -->|"manages"| node_discount
node_settings -->|"updates"| node_coopsetting
node_activity -->|"reads"| node_activitymodel
node_orders -->|"checks stock"| node_product
node_orders -->|"selects discount"| node_discount
node_orders -->|"creates and updates"| node_order
node_orders -->|"creates items"| node_item
node_customers -->|"reads orders"| node_order
node_customers -->|"reads customers"| node_user
node_dashboard -->|"queries"| node_order
node_dashboard -->|"queries"| node_item
node_reports -->|"queries"| node_order
node_reports -->|"aggregates"| node_item
node_user -->|"provisions admins"| node_provisioner
node_provisioner -->|"creates"| node_business
node_provisioner -->|"creates"| node_category
node_provisioner -->|"creates"| node_coopsetting
node_provider -->|"registers"| node_productobserver
node_provider -->|"registers"| node_categoryobserver
node_productobserver -->|"observes"| node_product
node_productobserver -->|"records changes"| node_activitymodel
node_categoryobserver -->|"observes"| node_category
node_categoryobserver -->|"records changes"| node_activitymodel

click node_routes "https://github.com/allzxxopemula/alzpoint-be/blob/main/routes/api.php"
click node_auth "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/AuthController.php"
click node_admin "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/AdminProfileController.php"
click node_cashier "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CashierController.php"
click node_catalog "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/ProductController.php"
click node_categories "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CategoryController.php"
click node_discounts "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/DiscountController.php"
click node_orders "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/OrderController.php"
click node_customers "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CustomerController.php"
click node_settings "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CooperativeSettingController.php"
click node_activity "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/ActivityLogController.php"
click node_dashboard "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/DashboardController.php"
click node_reports "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/ReportController.php"
click node_user "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/User.php"
click node_business "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Business.php"
click node_product "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Product.php"
click node_category "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Category.php"
click node_discount "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Discount.php"
click node_order "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Order.php"
click node_item "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/OrderItem.php"
click node_coopsetting "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/CooperativeSetting.php"
click node_activitymodel "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/ActivityLog.php"
click node_provisioner "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Services/BusinessProvisioner.php"
click node_productobserver "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Observers/ProductObserver.php"
click node_categoryobserver "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Observers/CategoryObserver.php"
click node_provider "https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Providers/AppServiceProvider.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_routes,node_auth,node_admin,node_actor toneBlue
class node_cashier,node_catalog,node_categories,node_discounts,node_orders,node_customers toneAmber
class node_dashboard,node_reports toneMint
class node_settings,node_activity,node_user,node_business,node_product,node_category,node_discount,node_order,node_item,node_coopsetting,node_activitymodel,node_provisioner,node_productobserver,node_categoryobserver,node_provider toneRose
```

## Components

### API entry

- [API routes](https://github.com/allzxxopemula/alzpoint-be/blob/main/routes/api.php): `routes/api.php`
- [Authentication](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Admin profile](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/AdminProfileController.php): `app/Http/Controllers/AdminProfileController.php`

### Sales operations

- [Cashier management](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CashierController.php): `app/Http/Controllers/CashierController.php`
- [Product catalog](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [Category management](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`
- [Discount management](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/DiscountController.php): `app/Http/Controllers/DiscountController.php`
- [Order processing](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Customer records](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CustomerController.php): `app/Http/Controllers/CustomerController.php`

### Business insights

- [Dashboard metrics](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Sales reports](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`

### Domain and provisioning

- [Cooperative settings](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/CooperativeSettingController.php): `app/Http/Controllers/CooperativeSettingController.php`
- [Activity log access](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Http/Controllers/ActivityLogController.php): `app/Http/Controllers/ActivityLogController.php`
- [Users](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/User.php): `app/Models/User.php`
- [Business](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Business.php): `app/Models/Business.php`
- [Products](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Categories](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Discounts](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Discount.php): `app/Models/Discount.php`
- [Orders](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Order items](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/OrderItem.php): `app/Models/OrderItem.php`
- [Cooperative settings data](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/CooperativeSetting.php): `app/Models/CooperativeSetting.php`
- [Activity log data](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Models/ActivityLog.php): `app/Models/ActivityLog.php`
- [Business provisioner](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Services/BusinessProvisioner.php): `app/Services/BusinessProvisioner.php`
- [Product observer](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Observers/ProductObserver.php): `app/Observers/ProductObserver.php`
- [Category observer](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Observers/CategoryObserver.php): `app/Observers/CategoryObserver.php`
- [Observer registration](https://github.com/allzxxopemula/alzpoint-be/blob/main/app/Providers/AppServiceProvider.php): `app/Providers/AppServiceProvider.php`

### Other components

- **API clients**

## Connections

- API clients → API routes: calls API (evidence: `routes/api.php`)
- API routes → Authentication: routes to (evidence: `routes/api.php`)
- API routes → Admin profile: routes to (evidence: `routes/api.php`)
- API routes → Cashier management: routes to (evidence: `routes/api.php`)
- API routes → Product catalog: routes to (evidence: `routes/api.php`)
- API routes → Category management: routes to (evidence: `routes/api.php`)
- API routes → Discount management: routes to (evidence: `routes/api.php`)
- API routes → Order processing: routes to (evidence: `routes/api.php`)
- API routes → Customer records: routes to (evidence: `routes/api.php`)
- API routes → Cooperative settings: routes to (evidence: `routes/api.php`)
- API routes → Activity log access: routes to (evidence: `routes/api.php`)
- API routes → Dashboard metrics: routes to (evidence: `routes/api.php`)
- API routes → Sales reports: routes to (evidence: `routes/api.php`)
- Authentication → Users: reads and writes (evidence: `app/Http/Controllers/AuthController.php`)
- Admin profile → Users: updates (evidence: `app/Http/Controllers/AdminProfileController.php`)
- Cashier management → Users: manages (evidence: `app/Http/Controllers/CashierController.php`)
- Product catalog → Products: manages (evidence: `app/Http/Controllers/ProductController.php`)
- Category management → Categories: manages (evidence: `app/Http/Controllers/CategoryController.php`)
- Discount management → Discounts: manages (evidence: `app/Http/Controllers/DiscountController.php`)
- Cooperative settings → Cooperative settings data: updates (evidence: `app/Http/Controllers/CooperativeSettingController.php`)
- Activity log access → Activity log data: reads (evidence: `app/Http/Controllers/ActivityLogController.php`)
- Order processing → Products: checks stock (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → Discounts: selects discount (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → Orders: creates and updates (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → Order items: creates items (evidence: `app/Http/Controllers/OrderController.php`)
- Customer records → Orders: reads orders (evidence: `app/Http/Controllers/CustomerController.php`)
- Customer records → Users: reads customers (evidence: `app/Http/Controllers/CustomerController.php`)
- Dashboard metrics → Orders: queries (evidence: `app/Http/Controllers/DashboardController.php`)
- Dashboard metrics → Order items: queries (evidence: `app/Http/Controllers/DashboardController.php`)
- Sales reports → Orders: queries (evidence: `app/Http/Controllers/ReportController.php`)
- Sales reports → Order items: aggregates (evidence: `app/Http/Controllers/ReportController.php`)
- Users → Business provisioner: provisions admins (evidence: `app/Models/User.php`)
- Business provisioner → Business: creates (evidence: `app/Services/BusinessProvisioner.php`)
- Business provisioner → Categories: creates (evidence: `app/Services/BusinessProvisioner.php`)
- Business provisioner → Cooperative settings data: creates (evidence: `app/Services/BusinessProvisioner.php`)
- Observer registration → Product observer: registers (evidence: `app/Providers/AppServiceProvider.php`)
- Observer registration → Category observer: registers (evidence: `app/Providers/AppServiceProvider.php`)
- Product observer → Products: observes (evidence: `app/Observers/ProductObserver.php`)
- Product observer → Activity log data: records changes (evidence: `app/Observers/ProductObserver.php`)
- Category observer → Categories: observes (evidence: `app/Observers/CategoryObserver.php`)
- Category observer → Activity log data: records changes (evidence: `app/Observers/CategoryObserver.php`)
