# abbasmuazam6-create/easysalepoints architecture

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

- Interactive diagram: https://gitdiagram.com/abbasmuazam6-create/easysalepoints
- Repository: https://github.com/abbasmuazam6-create/easysalepoints

## Overview

This is a multi-shop retail and inventory management application, with shop-specific roles and permissions and tailored reporting for business types. The main workflow runs from staff using the Vue interface, through API requests and Laravel controllers, to persisted sales, purchases, payments and stock movements. The graph preserves those transaction stages alongside administration, catalog, customer/supplier, reporting and dashboard capabilities visible in the repository tree. The README is empty, and several subsystems are represented by paths rather than inspected source; their internal calls are therefore not asserted.

Main entry points: [`laravel/routes/api.php`](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/routes/api.php) (API routing), [`laravel/app/Http/Controllers/Api/SaleController.php`](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/SaleController.php) (Sales and receipts), [`laravel/app/Http/Controllers/Api/PurchaseController.php`](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/PurchaseController.php) (Purchase processing), [`laravel/app/Http/Controllers/Api/CustomerReceiptController.php`](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/CustomerReceiptController.php) (Customer accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue client"]
  node_app["Application shell<br/>[App.vue]"]
  node_views["Shop workflows"]
  node_clientapi["API clients"]
end

subgraph group_backend["Laravel API"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_routes["API routing<br/>[api.php]"]
  node_transactions["Sales and receipts<br/>[SaleController.php]"]
  node_purchases["Purchase processing"]
  node_catalog["Product and stock"]
  node_customers["Customer accounts"]
  node_suppliers["Supplier accounts"]
  node_reports["Reports"]
  node_adminops["Shop administration"]
  node_dashboard["Dashboard data"]
  node_corecontroller["Shop resolution<br/>[Controller.php]"]
end

subgraph group_domain["Business data"]
  node_shop["Shop context<br/>[Shop.php]"]
  node_product["Products<br/>[Product.php]"]
  node_sale["Sales<br/>[Sale.php]"]
  node_saleitem["Sale lines<br/>[SaleItem.php]"]
  node_purchase["Purchases<br/>[Purchase.php]"]
  node_purchaseitem["Purchase lines<br/>[PurchaseItem.php]"]
  node_stock["Stock movements<br/>[StockMovement.php]"]
  node_payment["Payments<br/>[Payment.php]"]
  node_customer["Customers<br/>[Customer.php]"]
  node_supplier["Suppliers<br/>[Supplier.php]"]
  node_location["Locations<br/>[Location.php]"]
end

subgraph group_admin["Access and tenancy"]
  node_user["Users<br/>[User.php]"]
  node_role["Roles and permissions<br/>[Role.php]"]
  node_middleware["Request controls<br/>[app.php]"]
  node_admincontrollers["Admin operations"]
end

subgraph group_insight["Reporting and insight"]
  node_reportviews["Report interface"]
  node_dashboardviews["Dashboard interface"]
end

node_staff(("Shop staff"))
node_database[("Relational database")]

node_staff -->|"uses"| node_app
node_app -.->|"renders"| node_views
node_views -.->|"requests"| node_clientapi
node_clientapi -.->|"HTTP API"| node_routes
node_routes -->|"routes"| node_auth
node_routes -->|"routes"| node_transactions
node_routes -->|"routes"| node_purchases
node_routes -->|"routes"| node_catalog
node_routes -->|"routes"| node_customers
node_routes -->|"routes"| node_suppliers
node_routes -->|"routes"| node_reports
node_routes -->|"routes"| node_dashboard
node_routes -.->|"admin routes"| node_admincontrollers
node_transactions -->|"writes"| node_sale
node_transactions -->|"writes"| node_saleitem
node_transactions -->|"updates stock"| node_product
node_transactions -->|"records movement"| node_stock
node_transactions -.->|"uses account"| node_customer
node_transactions -.->|"records payment"| node_payment
node_purchases -->|"writes"| node_purchase
node_purchases -->|"writes"| node_purchaseitem
node_purchases -->|"updates stock"| node_product
node_purchases -->|"records movement"| node_stock
node_purchases -->|"updates balance"| node_supplier
node_purchases -->|"records payment"| node_payment
node_customers -->|"edits receipt"| node_sale
node_customers -->|"replaces lines"| node_saleitem
node_customers -->|"updates stock"| node_product
node_customers -->|"records movement"| node_stock
node_customers -->|"updates balance"| node_customer
node_customers -->|"records payment"| node_payment
node_catalog -->|"manages"| node_product
node_reports -->|"queries"| node_sale
node_reports -->|"queries"| node_product
node_reports -->|"queries"| node_payment
node_dashboard -.->|"serves"| node_dashboardviews
node_reportviews -.->|"requests"| node_reports
node_dashboardviews -.->|"requests"| node_dashboard
node_routes -->|"uses middleware"| node_middleware
node_middleware -->|"configures controls"| node_corecontroller
node_corecontroller -->|"resolves shop"| node_shop
node_corecontroller -->|"checks access"| node_user
node_admincontrollers -.->|"implements"| node_adminops
node_admincontrollers -->|"manages"| node_user
node_admincontrollers -->|"manages"| node_role
node_admincontrollers -->|"manages"| node_shop
node_sale -->|"has lines"| node_saleitem
node_saleitem -->|"references"| node_product

click node_app "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/frontend/src/App.vue"
click node_views "https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/views"
click node_clientapi "https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/api"
click node_auth "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/AuthController.php"
click node_routes "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/routes/api.php"
click node_transactions "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/SaleController.php"
click node_purchases "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/PurchaseController.php"
click node_catalog "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/ProductController.php"
click node_customers "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/CustomerReceiptController.php"
click node_suppliers "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/SupplierController.php"
click node_reports "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/ReportController.php"
click node_adminops "https://github.com/abbasmuazam6-create/easysalepoints/tree/main/laravel/app/Http/Controllers/Admin"
click node_dashboard "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/DashboardController.php"
click node_corecontroller "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Controller.php"
click node_shop "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Shop.php"
click node_product "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Product.php"
click node_sale "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Sale.php"
click node_saleitem "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/SaleItem.php"
click node_purchase "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Purchase.php"
click node_purchaseitem "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/PurchaseItem.php"
click node_stock "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/StockMovement.php"
click node_payment "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Payment.php"
click node_customer "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Customer.php"
click node_supplier "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Supplier.php"
click node_location "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Location.php"
click node_user "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/User.php"
click node_role "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Role.php"
click node_middleware "https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/bootstrap/app.php"
click node_admincontrollers "https://github.com/abbasmuazam6-create/easysalepoints/tree/main/laravel/app/Http/Controllers/Admin"
click node_reportviews "https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/views/reports"
click node_dashboardviews "https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/views/dashboard"

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,node_views,node_clientapi toneBlue
class node_auth,node_routes,node_transactions,node_purchases,node_catalog,node_customers,node_suppliers,node_reports,node_adminops,node_dashboard,node_corecontroller,node_database toneAmber
class node_shop,node_product,node_sale,node_saleitem,node_purchase,node_purchaseitem,node_stock,node_payment,node_customer,node_supplier,node_location toneMint
class node_user,node_role,node_middleware,node_admincontrollers toneRose
class node_reportviews,node_dashboardviews,node_staff toneIndigo
```

## Components

### Vue client

- [Application shell](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Shop workflows](https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/views): `frontend/src/views`
- [API clients](https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/api): `frontend/src/api`

### Laravel API

- [Authentication](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/AuthController.php): `laravel/app/Http/Controllers/Api/AuthController.php`
- [API routing](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/routes/api.php): `laravel/routes/api.php`
- [Sales and receipts](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/SaleController.php): `laravel/app/Http/Controllers/Api/SaleController.php`
- [Purchase processing](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/PurchaseController.php): `laravel/app/Http/Controllers/Api/PurchaseController.php`
- [Product and stock](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/ProductController.php): `laravel/app/Http/Controllers/Api/ProductController.php`
- [Customer accounts](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/CustomerReceiptController.php): `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`
- [Supplier accounts](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/SupplierController.php): `laravel/app/Http/Controllers/Api/SupplierController.php`
- [Reports](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/ReportController.php): `laravel/app/Http/Controllers/Api/ReportController.php`
- [Shop administration](https://github.com/abbasmuazam6-create/easysalepoints/tree/main/laravel/app/Http/Controllers/Admin): `laravel/app/Http/Controllers/Admin`
- [Dashboard data](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Api/DashboardController.php): `laravel/app/Http/Controllers/Api/DashboardController.php`
- [Shop resolution](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Http/Controllers/Controller.php): `laravel/app/Http/Controllers/Controller.php`

### Business data

- [Shop context](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Shop.php): `laravel/app/Models/Shop.php`
- [Products](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Product.php): `laravel/app/Models/Product.php`
- [Sales](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Sale.php): `laravel/app/Models/Sale.php`
- [Sale lines](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/SaleItem.php): `laravel/app/Models/SaleItem.php`
- [Purchases](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Purchase.php): `laravel/app/Models/Purchase.php`
- [Purchase lines](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/PurchaseItem.php): `laravel/app/Models/PurchaseItem.php`
- [Stock movements](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/StockMovement.php): `laravel/app/Models/StockMovement.php`
- [Payments](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Payment.php): `laravel/app/Models/Payment.php`
- [Customers](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Customer.php): `laravel/app/Models/Customer.php`
- [Suppliers](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Supplier.php): `laravel/app/Models/Supplier.php`
- [Locations](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Location.php): `laravel/app/Models/Location.php`

### Access and tenancy

- [Users](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/User.php): `laravel/app/Models/User.php`
- [Roles and permissions](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/app/Models/Role.php): `laravel/app/Models/Role.php`
- [Request controls](https://github.com/abbasmuazam6-create/easysalepoints/blob/main/laravel/bootstrap/app.php): `laravel/bootstrap/app.php`
- [Admin operations](https://github.com/abbasmuazam6-create/easysalepoints/tree/main/laravel/app/Http/Controllers/Admin): `laravel/app/Http/Controllers/Admin`

### Reporting and insight

- [Report interface](https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/views/reports): `frontend/src/views/reports`
- [Dashboard interface](https://github.com/abbasmuazam6-create/easysalepoints/tree/main/frontend/src/views/dashboard): `frontend/src/views/dashboard`

### Other components

- **Shop staff**
- **Relational database**

## Connections

- Shop staff → Application shell: uses
- Application shell → Shop workflows: renders
- Shop workflows → API clients: requests
- API clients → API routing: HTTP API
- API routing → Authentication: routes (evidence: `laravel/routes/api.php`)
- API routing → Sales and receipts: routes (evidence: `laravel/routes/api.php`)
- API routing → Purchase processing: routes (evidence: `laravel/routes/api.php`)
- API routing → Product and stock: routes (evidence: `laravel/routes/api.php`)
- API routing → Customer accounts: routes (evidence: `laravel/routes/api.php`)
- API routing → Supplier accounts: routes (evidence: `laravel/routes/api.php`)
- API routing → Reports: routes (evidence: `laravel/routes/api.php`)
- API routing → Dashboard data: routes (evidence: `laravel/routes/api.php`)
- API routing → Admin operations: admin routes (evidence: `laravel/routes/api.php`)
- Sales and receipts → Sales: writes (evidence: `laravel/app/Http/Controllers/Api/SaleController.php`)
- Sales and receipts → Sale lines: writes (evidence: `laravel/app/Http/Controllers/Api/SaleController.php`)
- Sales and receipts → Products: updates stock (evidence: `laravel/app/Http/Controllers/Api/SaleController.php`)
- Sales and receipts → Stock movements: records movement (evidence: `laravel/app/Http/Controllers/Api/SaleController.php`)
- Sales and receipts → Customers: uses account (evidence: `laravel/app/Http/Controllers/Api/SaleController.php`)
- Sales and receipts → Payments: records payment
- Purchase processing → Purchases: writes (evidence: `laravel/app/Http/Controllers/Api/PurchaseController.php`)
- Purchase processing → Purchase lines: writes (evidence: `laravel/app/Http/Controllers/Api/PurchaseController.php`)
- Purchase processing → Products: updates stock (evidence: `laravel/app/Http/Controllers/Api/PurchaseController.php`)
- Purchase processing → Stock movements: records movement (evidence: `laravel/app/Http/Controllers/Api/PurchaseController.php`)
- Purchase processing → Suppliers: updates balance (evidence: `laravel/app/Http/Controllers/Api/PurchaseController.php`)
- Purchase processing → Payments: records payment (evidence: `laravel/app/Http/Controllers/Api/PurchaseController.php`)
- Customer accounts → Sales: edits receipt (evidence: `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`)
- Customer accounts → Sale lines: replaces lines (evidence: `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`)
- Customer accounts → Products: updates stock (evidence: `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`)
- Customer accounts → Stock movements: records movement (evidence: `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`)
- Customer accounts → Customers: updates balance (evidence: `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`)
- Customer accounts → Payments: records payment (evidence: `laravel/app/Http/Controllers/Api/CustomerReceiptController.php`)
- Product and stock → Products: manages (evidence: `laravel/app/Http/Controllers/Api/ProductController.php`)
- Reports → Sales: queries (evidence: `laravel/app/Http/Controllers/Api/ReportController.php`)
- Reports → Products: queries (evidence: `laravel/app/Http/Controllers/Api/ReportController.php`)
- Reports → Payments: queries (evidence: `laravel/app/Http/Controllers/Api/ReportController.php`)
- Dashboard data → Dashboard interface: serves
- Report interface → Reports: requests
- Dashboard interface → Dashboard data: requests
- API routing → Request controls: uses middleware (evidence: `laravel/bootstrap/app.php`)
- Request controls → Shop resolution: configures controls (evidence: `laravel/bootstrap/app.php`)
- Shop resolution → Shop context: resolves shop (evidence: `laravel/app/Http/Controllers/Controller.php`)
- Shop resolution → Users: checks access (evidence: `laravel/app/Http/Controllers/Controller.php`)
- Admin operations → Shop administration: implements
- Admin operations → Users: manages (evidence: `laravel/app/Http/Controllers/Admin/UserController.php`)
- Admin operations → Roles and permissions: manages (evidence: `laravel/app/Http/Controllers/Admin/RoleController.php`)
- Admin operations → Shop context: manages (evidence: `laravel/app/Http/Controllers/Admin/ShopController.php`)
- Sales → Sale lines: has lines (evidence: `laravel/app/Models/Sale.php`)
- Sale lines → Products: references (evidence: `laravel/app/Models/SaleItem.php`)
