# carlojayco50-cpu/at-ice-erp-system-latest architecture

> Architecture diagram of the GitHub repository carlojayco50-cpu/at-ice-erp-system-latest, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/carlojayco50-cpu/at-ice-erp-system-latest
- Repository: https://github.com/carlojayco50-cpu/at-ice-erp-system-latest

## Overview

AT Ice ERP is a role-based ice-business management system: users sign in to a React application, use role-specific workflows, and receive results from a Laravel JSON API backed by business records. The major domains include HR and face-based attendance, leave and payroll, inventory, deliveries with GPS and proof, customer accounts and portal, receipts and payments, and business intelligence. The README documents optional real-time broadcasting and AI summaries. Several domain implementations are unsampled, so their relationships are shown only where the README or route index supports them.

Main entry points: [`at-ice-backend/routes/api.php`](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/routes/api.php) (JSON API routes), [`at-ice-frontend/src/App.jsx`](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/App.jsx) (Role-based interface), [`at-ice-backend/app/Models/Employee.php`](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/Employee.php) (Employee records), [`at-ice-backend/app/Http/Controllers/AttendanceController.php`](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/AttendanceController.php) (Attendance and leave)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_frontend["Role-based interface<br/>[App.jsx]"]
end

subgraph group_access["Identity and access"]
  node_auth_api["Authentication<br/>[AuthController.php]"]
  node_user_data[("User accounts and roles<br/>[User.php]")]
  node_api_routes["JSON API routes<br/>[api.php]"]
end

subgraph group_people["People operations"]
  node_employee_ui["HR employee management<br/>[EmployeesPage.jsx]"]
  node_attendance_ui["Attendance station"]
  node_employee_api["Employee administration"]
  node_attendance_api["Attendance and leave"]
  node_employee_data[("Employee records<br/>[Employee.php]")]
end

subgraph group_commerce["Customers and operations"]
  node_customer_ui["Customer portal"]
  node_admin_ui["Admin operations"]
  node_driver_ui["Driver GPS and deliveries"]
  node_customer_api["Customer accounts"]
  node_customer_data[("Customer records<br/>[Customer.php]")]
  node_delivery_api["Delivery management"]
  node_inventory_api["Inventory management"]
  node_receipt_api["Receipts and payments"]
end

subgraph group_insight["Reporting and live updates"]
  node_bi_api["Business intelligence<br/>[BiController.php]"]
  node_live["Live event feed<br/>[live.js]"]
  node_attendance_event["Attendance broadcast"]
end

node_users(("Admin, HR, employees, drivers, customers"))

node_users -->|"use"| node_frontend
node_frontend -.->|"request"| node_api_routes
node_frontend -->|"routes to"| node_employee_ui
node_frontend -->|"routes to"| node_attendance_ui
node_frontend -->|"routes to"| node_customer_ui
node_frontend -->|"routes to"| node_admin_ui
node_frontend -->|"routes to"| node_driver_ui
node_api_routes -->|"routes to"| node_auth_api
node_api_routes -->|"routes to"| node_employee_api
node_api_routes -->|"routes to"| node_attendance_api
node_api_routes -->|"routes to"| node_customer_api
node_api_routes -->|"routes to"| node_delivery_api
node_api_routes -->|"routes to"| node_inventory_api
node_api_routes -->|"routes to"| node_receipt_api
node_api_routes -->|"routes to"| node_bi_api
node_employee_api -->|"reads and writes"| node_employee_data
node_attendance_api -->|"reads"| node_employee_data
node_customer_api -->|"reads and writes"| node_customer_data
node_auth_api -.->|"authenticates"| node_user_data
node_employee_data -->|"belongs to"| node_user_data
node_customer_data -->|"belongs to"| node_user_data
node_attendance_api -->|"broadcasts"| node_attendance_event
node_frontend -->|"starts feed"| node_live
node_users -->|"record attendance"| node_attendance_ui
node_users -->|"track deliveries"| node_driver_ui
node_users -.->|"manage account"| node_customer_ui
node_bi_api -->|"queries"| node_employee_data
node_bi_api -->|"queries"| node_customer_data

click node_frontend "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/App.jsx"
click node_employee_ui "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/pages/hr/EmployeesPage.jsx"
click node_attendance_ui "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/pages/AttendanceStation.jsx"
click node_customer_ui "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/tree/main/at-ice-frontend/src/pages/customer"
click node_admin_ui "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/tree/main/at-ice-frontend/src/pages/Admin"
click node_driver_ui "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/tree/main/at-ice-frontend/src/pages/drivers"
click node_employee_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/EmployeeController.php"
click node_attendance_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/AttendanceController.php"
click node_employee_data "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/Employee.php"
click node_customer_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/CustomerController.php"
click node_customer_data "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/Customer.php"
click node_delivery_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/DeliveryController.php"
click node_inventory_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/StockMovementController.php"
click node_receipt_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/ReceiptController.php"
click node_bi_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/BiController.php"
click node_live "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/lib/live.js"
click node_attendance_event "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Events/AttendanceRecorded.php"
click node_auth_api "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/AuthController.php"
click node_user_data "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/User.php"
click node_api_routes "https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/routes/api.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_frontend toneBlue
class node_auth_api,node_user_data,node_api_routes toneAmber
class node_employee_ui,node_attendance_ui,node_employee_api,node_attendance_api,node_employee_data toneMint
class node_customer_ui,node_admin_ui,node_driver_ui,node_customer_api,node_customer_data,node_delivery_api,node_inventory_api,node_receipt_api toneRose
class node_bi_api,node_live,node_attendance_event,node_users toneIndigo
```

## Components

### Web application

- [Role-based interface](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/App.jsx): `at-ice-frontend/src/App.jsx`

### Identity and access

- [Authentication](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/AuthController.php): `at-ice-backend/app/Http/Controllers/AuthController.php`
- [User accounts and roles](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/User.php): `at-ice-backend/app/Models/User.php`
- [JSON API routes](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/routes/api.php): `at-ice-backend/routes/api.php`

### People operations

- [HR employee management](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/pages/hr/EmployeesPage.jsx): `at-ice-frontend/src/pages/hr/EmployeesPage.jsx`
- [Attendance station](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/pages/AttendanceStation.jsx): `at-ice-frontend/src/pages/AttendanceStation.jsx`
- [Employee administration](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/EmployeeController.php): `at-ice-backend/app/Http/Controllers/EmployeeController.php`
- [Attendance and leave](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/AttendanceController.php): `at-ice-backend/app/Http/Controllers/AttendanceController.php`
- [Employee records](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/Employee.php): `at-ice-backend/app/Models/Employee.php`

### Customers and operations

- [Customer portal](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/tree/main/at-ice-frontend/src/pages/customer): `at-ice-frontend/src/pages/customer`
- [Admin operations](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/tree/main/at-ice-frontend/src/pages/Admin): `at-ice-frontend/src/pages/Admin`
- [Driver GPS and deliveries](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/tree/main/at-ice-frontend/src/pages/drivers): `at-ice-frontend/src/pages/drivers`
- [Customer accounts](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/CustomerController.php): `at-ice-backend/app/Http/Controllers/CustomerController.php`
- [Customer records](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Models/Customer.php): `at-ice-backend/app/Models/Customer.php`
- [Delivery management](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/DeliveryController.php): `at-ice-backend/app/Http/Controllers/DeliveryController.php`
- [Inventory management](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/StockMovementController.php): `at-ice-backend/app/Http/Controllers/StockMovementController.php`
- [Receipts and payments](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/ReceiptController.php): `at-ice-backend/app/Http/Controllers/ReceiptController.php`

### Reporting and live updates

- [Business intelligence](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Http/Controllers/BiController.php): `at-ice-backend/app/Http/Controllers/BiController.php`
- [Live event feed](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-frontend/src/lib/live.js): `at-ice-frontend/src/lib/live.js`
- [Attendance broadcast](https://github.com/carlojayco50-cpu/at-ice-erp-system-latest/blob/main/at-ice-backend/app/Events/AttendanceRecorded.php): `at-ice-backend/app/Events/AttendanceRecorded.php`

### Other components

- **Admin, HR, employees, drivers, customers**

## Connections

- Admin, HR, employees, drivers, customers → Role-based interface: use (evidence: `README.md`)
- Role-based interface → JSON API routes: request
- Role-based interface → HR employee management: routes to (evidence: `at-ice-frontend/src/App.jsx`)
- Role-based interface → Attendance station: routes to (evidence: `at-ice-frontend/src/App.jsx`)
- Role-based interface → Customer portal: routes to (evidence: `at-ice-frontend/src/App.jsx`)
- Role-based interface → Admin operations: routes to (evidence: `at-ice-frontend/src/App.jsx`)
- Role-based interface → Driver GPS and deliveries: routes to (evidence: `at-ice-frontend/src/App.jsx`)
- JSON API routes → Authentication: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Employee administration: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Attendance and leave: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Customer accounts: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Delivery management: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Inventory management: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Receipts and payments: routes to (evidence: `at-ice-backend/routes/api.php`)
- JSON API routes → Business intelligence: routes to (evidence: `at-ice-backend/routes/api.php`)
- Employee administration → Employee records: reads and writes (evidence: `at-ice-backend/app/Http/Controllers/EmployeeController.php`)
- Attendance and leave → Employee records: reads (evidence: `at-ice-backend/app/Http/Controllers/AttendanceController.php`)
- Customer accounts → Customer records: reads and writes (evidence: `at-ice-backend/app/Http/Controllers/CustomerController.php`)
- Authentication → User accounts and roles: authenticates
- Employee records → User accounts and roles: belongs to (evidence: `at-ice-backend/app/Models/Employee.php`)
- Customer records → User accounts and roles: belongs to (evidence: `at-ice-backend/app/Models/Customer.php`)
- Attendance and leave → Attendance broadcast: broadcasts (evidence: `at-ice-backend/app/Http/Controllers/AttendanceController.php`)
- Role-based interface → Live event feed: starts feed (evidence: `at-ice-frontend/src/main.jsx`)
- Admin, HR, employees, drivers, customers → Attendance station: record attendance (evidence: `README.md`)
- Admin, HR, employees, drivers, customers → Driver GPS and deliveries: track deliveries (evidence: `README.md`)
- Admin, HR, employees, drivers, customers → Customer portal: manage account
- Business intelligence → Employee records: queries (evidence: `at-ice-backend/app/Http/Controllers/BiController.php`)
- Business intelligence → Customer records: queries (evidence: `at-ice-backend/app/Http/Controllers/BiController.php`)
