# webotapp-academy/webotapp-apex-manufacturing-erp architecture

> Architecture diagram of the GitHub repository webotapp-academy/webotapp-apex-manufacturing-erp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/webotapp-academy/webotapp-apex-manufacturing-erp
- Repository: https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp

## Overview

WebotApp Apex is a multi-company manufacturing ERP/MES. Users enter through Laravel web routes, which dispatch to domain controllers; those controllers provide operations for production, engineering, inventory, quality, procurement, accounting, maintenance, and administration. The sampled BOM and work-order handlers show database-backed costing, material checks, dispatch, and progress updates; README capabilities identify additional product areas, including quality gates and machine telemetry. The excerpts do not show every controller-to-view or subsystem interaction, so those links are omitted rather than inferred.

Main entry points: [`routes/web.php`](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/routes/web.php) (Web Routes), [`app/Models/Company.php`](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Company.php) (Company Model), [`app/Http/Controllers/BomController.php`](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/BomController.php) (BOM & Routings), [`app/Http/Controllers/CompanyController.php`](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/CompanyController.php) (Company Administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web Entry"]
  node_routes["Web Routes<br/>[web.php]"]
  node_dashboard["Dashboard"]
  node_dashboard_view["Dashboard View<br/>[index.blade.php]"]
end

subgraph group_operations["Manufacturing Operations"]
  node_bom["BOM &amp; Routings<br/>[BomController.php]"]
  node_workorders["Work Orders"]
  node_inventory["Inventory"]
  node_quality["Quality Control"]
  node_maintenance["Machine Maintenance"]
  node_products["Product Catalog"]
  node_bom_view["BOM View<br/>[bom.blade.php]"]
end

subgraph group_business["Business Modules"]
  node_procurement["Procurement"]
  node_accounting["Accounting"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_users["User Administration<br/>[UserController.php]"]
end

subgraph group_platform["Company Platform"]
  node_companies["Company Administration"]
  node_context["Company Context"]
  node_tenant["Tenant Scoping"]
  node_company["Company Model<br/>[Company.php]"]
  node_branch["Branch Model<br/>[Branch.php]"]
  node_department["Department Model<br/>[Department.php]"]
  node_user_model["User Model<br/>[User.php]"]
  node_activity["Activity Logging<br/>[ActivityLog.php]"]
end

node_user(("ERP User"))
node_database[("MySQL Database")]

node_user -->|"requests"| node_routes
node_routes -->|"dispatches"| node_dashboard
node_routes -->|"dispatches"| node_bom
node_routes -->|"dispatches"| node_workorders
node_routes -->|"dispatches"| node_inventory
node_routes -->|"dispatches"| node_quality
node_routes -->|"dispatches"| node_maintenance
node_routes -->|"dispatches"| node_products
node_routes -->|"dispatches"| node_procurement
node_routes -->|"dispatches"| node_accounting
node_routes -->|"dispatches"| node_auth
node_routes -->|"dispatches"| node_users
node_routes -->|"dispatches"| node_companies
node_dashboard -->|"renders"| node_dashboard_view
node_bom -->|"renders"| node_bom_view
node_bom -->|"reads and writes"| node_database
node_workorders -->|"reads and writes"| node_database
node_companies -->|"manages"| node_company
node_companies -->|"manages"| node_branch
node_companies -->|"manages"| node_department
node_users -->|"manages"| node_user_model
node_context -->|"applies to web"| node_routes
node_tenant -->|"scopes by"| node_company
node_branch -->|"uses"| node_tenant
node_department -->|"uses"| node_tenant
node_activity -->|"uses"| node_tenant
node_user_model -->|"belongs to"| node_company
node_user_model -->|"belongs to"| node_branch
node_user_model -->|"belongs to"| node_department
node_company -->|"has many"| node_branch
node_company -->|"has many"| node_department
node_dashboard -->|"loads recent logs"| node_activity
node_bom -->|"records actions"| node_activity
node_workorders -->|"records actions"| node_activity

click node_routes "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/routes/web.php"
click node_dashboard "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/DashboardController.php"
click node_bom "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/BomController.php"
click node_workorders "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/WorkOrderController.php"
click node_inventory "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/InventoryController.php"
click node_quality "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/QualityController.php"
click node_maintenance "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/MaintenanceController.php"
click node_products "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/ProductController.php"
click node_procurement "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/ProcurementController.php"
click node_accounting "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/AccountingController.php"
click node_auth "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/AuthController.php"
click node_users "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/UserController.php"
click node_companies "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/CompanyController.php"
click node_context "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Middleware/SetCompanyContext.php"
click node_tenant "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Traits/BelongsToCompany.php"
click node_company "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Company.php"
click node_branch "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Branch.php"
click node_department "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Department.php"
click node_user_model "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/User.php"
click node_activity "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/ActivityLog.php"
click node_dashboard_view "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/resources/views/dashboard/index.blade.php"
click node_bom_view "https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/resources/views/engineering/bom.blade.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_dashboard,node_dashboard_view,node_user toneBlue
class node_bom,node_workorders,node_inventory,node_quality,node_maintenance,node_products,node_bom_view,node_database toneAmber
class node_procurement,node_accounting,node_auth,node_users toneMint
class node_companies,node_context,node_tenant,node_company,node_branch,node_department,node_user_model,node_activity toneRose
```

## Components

### Web Entry

- [Web Routes](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/routes/web.php): `routes/web.php`
- [Dashboard](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Dashboard View](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/resources/views/dashboard/index.blade.php): `resources/views/dashboard/index.blade.php`

### Manufacturing Operations

- [BOM & Routings](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/BomController.php): `app/Http/Controllers/BomController.php`
- [Work Orders](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/WorkOrderController.php): `app/Http/Controllers/WorkOrderController.php`
- [Inventory](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/InventoryController.php): `app/Http/Controllers/InventoryController.php`
- [Quality Control](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/QualityController.php): `app/Http/Controllers/QualityController.php`
- [Machine Maintenance](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/MaintenanceController.php): `app/Http/Controllers/MaintenanceController.php`
- [Product Catalog](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [BOM View](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/resources/views/engineering/bom.blade.php): `resources/views/engineering/bom.blade.php`

### Business Modules

- [Procurement](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/ProcurementController.php): `app/Http/Controllers/ProcurementController.php`
- [Accounting](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/AccountingController.php): `app/Http/Controllers/AccountingController.php`
- [Authentication](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [User Administration](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`

### Company Platform

- [Company Administration](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Controllers/CompanyController.php): `app/Http/Controllers/CompanyController.php`
- [Company Context](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Http/Middleware/SetCompanyContext.php): `app/Http/Middleware/SetCompanyContext.php`
- [Tenant Scoping](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Traits/BelongsToCompany.php): `app/Traits/BelongsToCompany.php`
- [Company Model](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Company.php): `app/Models/Company.php`
- [Branch Model](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Branch.php): `app/Models/Branch.php`
- [Department Model](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/Department.php): `app/Models/Department.php`
- [User Model](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/User.php): `app/Models/User.php`
- [Activity Logging](https://github.com/webotapp-academy/webotapp-apex-manufacturing-erp/blob/main/app/Models/ActivityLog.php): `app/Models/ActivityLog.php`

### Other components

- **ERP User**
- **MySQL Database**

## Connections

- ERP User → Web Routes: requests (evidence: `routes/web.php`)
- Web Routes → Dashboard: dispatches (evidence: `routes/web.php`)
- Web Routes → BOM & Routings: dispatches (evidence: `routes/web.php`)
- Web Routes → Work Orders: dispatches (evidence: `routes/web.php`)
- Web Routes → Inventory: dispatches (evidence: `routes/web.php`)
- Web Routes → Quality Control: dispatches (evidence: `routes/web.php`)
- Web Routes → Machine Maintenance: dispatches (evidence: `routes/web.php`)
- Web Routes → Product Catalog: dispatches (evidence: `routes/web.php`)
- Web Routes → Procurement: dispatches (evidence: `routes/web.php`)
- Web Routes → Accounting: dispatches (evidence: `routes/web.php`)
- Web Routes → Authentication: dispatches (evidence: `routes/web.php`)
- Web Routes → User Administration: dispatches (evidence: `routes/web.php`)
- Web Routes → Company Administration: dispatches (evidence: `routes/web.php`)
- Dashboard → Dashboard View: renders (evidence: `app/Http/Controllers/DashboardController.php`)
- BOM & Routings → BOM View: renders (evidence: `app/Http/Controllers/BomController.php`)
- BOM & Routings → MySQL Database: reads and writes (evidence: `app/Http/Controllers/BomController.php`)
- Work Orders → MySQL Database: reads and writes (evidence: `app/Http/Controllers/WorkOrderController.php`)
- Company Administration → Company Model: manages (evidence: `app/Http/Controllers/CompanyController.php`)
- Company Administration → Branch Model: manages (evidence: `app/Http/Controllers/CompanyController.php`)
- Company Administration → Department Model: manages (evidence: `app/Http/Controllers/CompanyController.php`)
- User Administration → User Model: manages (evidence: `app/Http/Controllers/UserController.php`)
- Company Context → Web Routes: applies to web
- Tenant Scoping → Company Model: scopes by (evidence: `app/Traits/BelongsToCompany.php`)
- Branch Model → Tenant Scoping: uses (evidence: `app/Models/Branch.php`)
- Department Model → Tenant Scoping: uses (evidence: `app/Models/Department.php`)
- Activity Logging → Tenant Scoping: uses (evidence: `app/Models/ActivityLog.php`)
- User Model → Company Model: belongs to (evidence: `app/Models/User.php`)
- User Model → Branch Model: belongs to (evidence: `app/Models/User.php`)
- User Model → Department Model: belongs to (evidence: `app/Models/User.php`)
- Company Model → Branch Model: has many (evidence: `app/Models/Company.php`)
- Company Model → Department Model: has many (evidence: `app/Models/Company.php`)
- Dashboard → Activity Logging: loads recent logs (evidence: `app/Http/Controllers/DashboardController.php`)
- BOM & Routings → Activity Logging: records actions (evidence: `app/Http/Controllers/BomController.php`)
- Work Orders → Activity Logging: records actions (evidence: `app/Http/Controllers/WorkOrderController.php`)
