# shizack/erpsystem architecture

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

- Interactive diagram: https://gitdiagram.com/shizack/erpsystem
- Repository: https://github.com/shizack/erpsystem

## Overview

This Laravel application provides employee requisitions and an admin-managed inventory workflow, including supplier purchase orders and AI-assisted stock insights. Employees authenticate, browse available products, submit and track requisitions; admins review them, update stock on approval, and manage inventory and purchasing. The graph highlights these domain stages and the controllers’ model/service interactions. The README describes Laravel rather than this product, and several source excerpts are partial, so uncertain command scheduling and other wiring are omitted.

Main entry points: [`routes/web.php`](https://github.com/shizack/erpsystem/blob/master/routes/web.php) (Web Routes), [`app/Models`](https://github.com/shizack/erpsystem/tree/master/app/Models) (Inventory Data), [`resources/views`](https://github.com/shizack/erpsystem/tree/master/resources/views) (Application Views), [`app/Http/Controllers/Admin/RequisitionController.php`](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/RequisitionController.php) (Admin Requisitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Routing"]
  node_routes["Web Routes<br/>[web.php]"]
  node_employee_auth["Employee Login"]
  node_admin_auth["Admin Login"]
  node_views["Application Views"]
end

subgraph group_requisition["Requisitions"]
  node_employee_req["Employee Requisitions"]
  node_admin_req["Admin Requisitions"]
  node_notifications["Requisition Notices"]
  node_rejected_notice["Rejection Notice"]
end

subgraph group_inventory["Inventory and Purchasing"]
  node_inventory_ctrl["Inventory Management"]
  node_suppliers_ctrl["Supplier Management"]
  node_purchase_ctrl["Purchase Orders"]
  node_stock_commands["Stock Checks"]
  node_models[("Inventory Data")]
end

subgraph group_insights["AI and Reporting"]
  node_employee_dashboard["Employee Dashboard"]
  node_admin_dashboard["Admin Dashboard"]
  node_inventory_ai_ctrl["Inventory AI View"]
  node_inventory_ai["Inventory Forecasting"]
  node_requisition_ai["Description Refinement"]
end

node_employee(("Employee"))
node_admin(("Administrator"))

node_employee -->|"requests"| node_routes
node_admin -->|"requests"| node_routes
node_routes -->|"dispatches"| node_employee_auth
node_routes -->|"dispatches"| node_admin_auth
node_routes -->|"dispatches"| node_employee_req
node_routes -->|"dispatches"| node_admin_req
node_routes -->|"dispatches"| node_inventory_ctrl
node_routes -->|"dispatches"| node_suppliers_ctrl
node_routes -->|"dispatches"| node_purchase_ctrl
node_routes -->|"dispatches"| node_employee_dashboard
node_routes -->|"dispatches"| node_admin_dashboard
node_routes -->|"dispatches"| node_inventory_ai_ctrl
node_employee_auth -->|"renders login"| node_views
node_admin_auth -->|"renders login"| node_views
node_employee_req -->|"reads products; saves requests"| node_models
node_employee_req -->|"refines text"| node_requisition_ai
node_employee_req -->|"renders requisitions"| node_views
node_admin_req -->|"reads and updates"| node_models
node_admin_req -->|"sends approval"| node_notifications
node_admin_req -->|"sends rejection"| node_rejected_notice
node_admin_req -->|"renders requisitions"| node_views
node_inventory_ctrl -->|"manages stock"| node_models
node_suppliers_ctrl -->|"manages suppliers"| node_models
node_purchase_ctrl -->|"reads and saves orders"| node_models
node_purchase_ctrl -->|"renders orders"| node_views
node_stock_commands -->|"checks stock"| node_models
node_employee_dashboard -->|"reads employee data"| node_models
node_employee_dashboard -->|"renders dashboard"| node_views
node_admin_dashboard -->|"reads inventory and requests"| node_models
node_admin_dashboard -->|"requests predictions"| node_inventory_ai
node_admin_dashboard -->|"renders dashboard"| node_views
node_inventory_ai_ctrl -->|"reads products"| node_models
node_inventory_ai_ctrl -->|"requests predictions"| node_inventory_ai
node_inventory_ai_ctrl -->|"renders insights"| node_views

click node_routes "https://github.com/shizack/erpsystem/blob/master/routes/web.php"
click node_employee_auth "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Auth/EmployeeLoginController.php"
click node_admin_auth "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Auth/AdminLoginController.php"
click node_employee_req "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Employee/RequisitionController.php"
click node_admin_req "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/RequisitionController.php"
click node_notifications "https://github.com/shizack/erpsystem/blob/master/app/Notifications/RequisitionApproved.php"
click node_rejected_notice "https://github.com/shizack/erpsystem/blob/master/app/Notifications/RequisitionRejected.php"
click node_inventory_ctrl "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/InventoryController.php"
click node_suppliers_ctrl "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/SupplierController.php"
click node_purchase_ctrl "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/PurchaseOrderController.php"
click node_stock_commands "https://github.com/shizack/erpsystem/blob/master/app/Console/Commands/CheckStockLevels.php"
click node_models "https://github.com/shizack/erpsystem/tree/master/app/Models"
click node_employee_dashboard "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/EmployeeDashboardController.php"
click node_admin_dashboard "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/AdminDashboardController.php"
click node_inventory_ai_ctrl "https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Dashboard/InventoryAIController.php"
click node_inventory_ai "https://github.com/shizack/erpsystem/blob/master/app/Services/InventoryAIService.php"
click node_requisition_ai "https://github.com/shizack/erpsystem/blob/master/app/Services/RequisitionAIService.php"
click node_views "https://github.com/shizack/erpsystem/tree/master/resources/views"

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_employee_auth,node_admin_auth,node_views toneBlue
class node_employee_req,node_admin_req,node_notifications,node_rejected_notice toneAmber
class node_inventory_ctrl,node_suppliers_ctrl,node_purchase_ctrl,node_stock_commands,node_models toneMint
class node_employee_dashboard,node_admin_dashboard,node_inventory_ai_ctrl,node_inventory_ai,node_requisition_ai toneRose
class node_employee,node_admin toneIndigo
```

## Components

### Access and Routing

- [Web Routes](https://github.com/shizack/erpsystem/blob/master/routes/web.php): `routes/web.php`
- [Employee Login](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Auth/EmployeeLoginController.php): `app/Http/Controllers/Auth/EmployeeLoginController.php`
- [Admin Login](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Auth/AdminLoginController.php): `app/Http/Controllers/Auth/AdminLoginController.php`
- [Application Views](https://github.com/shizack/erpsystem/tree/master/resources/views): `resources/views`

### Requisitions

- [Employee Requisitions](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Employee/RequisitionController.php): `app/Http/Controllers/Employee/RequisitionController.php`
- [Admin Requisitions](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/RequisitionController.php): `app/Http/Controllers/Admin/RequisitionController.php`
- [Requisition Notices](https://github.com/shizack/erpsystem/blob/master/app/Notifications/RequisitionApproved.php): `app/Notifications/RequisitionApproved.php`
- [Rejection Notice](https://github.com/shizack/erpsystem/blob/master/app/Notifications/RequisitionRejected.php): `app/Notifications/RequisitionRejected.php`

### Inventory and Purchasing

- [Inventory Management](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/InventoryController.php): `app/Http/Controllers/InventoryController.php`
- [Supplier Management](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/SupplierController.php): `app/Http/Controllers/Admin/SupplierController.php`
- [Purchase Orders](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Admin/PurchaseOrderController.php): `app/Http/Controllers/Admin/PurchaseOrderController.php`
- [Stock Checks](https://github.com/shizack/erpsystem/blob/master/app/Console/Commands/CheckStockLevels.php): `app/Console/Commands/CheckStockLevels.php`
- [Inventory Data](https://github.com/shizack/erpsystem/tree/master/app/Models): `app/Models`

### AI and Reporting

- [Employee Dashboard](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/EmployeeDashboardController.php): `app/Http/Controllers/EmployeeDashboardController.php`
- [Admin Dashboard](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/AdminDashboardController.php): `app/Http/Controllers/AdminDashboardController.php`
- [Inventory AI View](https://github.com/shizack/erpsystem/blob/master/app/Http/Controllers/Dashboard/InventoryAIController.php): `app/Http/Controllers/Dashboard/InventoryAIController.php`
- [Inventory Forecasting](https://github.com/shizack/erpsystem/blob/master/app/Services/InventoryAIService.php): `app/Services/InventoryAIService.php`
- [Description Refinement](https://github.com/shizack/erpsystem/blob/master/app/Services/RequisitionAIService.php): `app/Services/RequisitionAIService.php`

### Other components

- **Employee**
- **Administrator**

## Connections

- Employee → Web Routes: requests
- Administrator → Web Routes: requests
- Web Routes → Employee Login: dispatches
- Web Routes → Admin Login: dispatches
- Web Routes → Employee Requisitions: dispatches
- Web Routes → Admin Requisitions: dispatches
- Web Routes → Inventory Management: dispatches
- Web Routes → Supplier Management: dispatches
- Web Routes → Purchase Orders: dispatches
- Web Routes → Employee Dashboard: dispatches
- Web Routes → Admin Dashboard: dispatches
- Web Routes → Inventory AI View: dispatches
- Employee Login → Application Views: renders login
- Admin Login → Application Views: renders login
- Employee Requisitions → Inventory Data: reads products; saves requests
- Employee Requisitions → Description Refinement: refines text
- Employee Requisitions → Application Views: renders requisitions
- Admin Requisitions → Inventory Data: reads and updates
- Admin Requisitions → Requisition Notices: sends approval
- Admin Requisitions → Rejection Notice: sends rejection
- Admin Requisitions → Application Views: renders requisitions
- Inventory Management → Inventory Data: manages stock
- Supplier Management → Inventory Data: manages suppliers
- Purchase Orders → Inventory Data: reads and saves orders
- Purchase Orders → Application Views: renders orders
- Stock Checks → Inventory Data: checks stock
- Employee Dashboard → Inventory Data: reads employee data
- Employee Dashboard → Application Views: renders dashboard
- Admin Dashboard → Inventory Data: reads inventory and requests
- Admin Dashboard → Inventory Forecasting: requests predictions
- Admin Dashboard → Application Views: renders dashboard
- Inventory AI View → Inventory Data: reads products
- Inventory AI View → Inventory Forecasting: requests predictions
- Inventory AI View → Application Views: renders insights
