How mhafizz/dashboard-ffm works
This is a service-order operations dashboard: users review company-wide workload, inspect customer-representative performance and drill into work orders. The React app selects overview, representative and work-order pages; a shared API client requests Laravel summaries and paginated orders, whose controllers query relational models. The tree and sampled sources support these main paths and several dashboard capabilities, but page implementations and API route wiring were not sampled, so some frontend-to-endpoint links reflect the client’s documented endpoint responsibilities rather than inspected page calls.
Main entry points: ServiceOrder.php Service orders · client.js API client · DistrictController.php District API · CommitRequest.php Commit requests
Components 16
Dashboard UI
- App shell
frontend/src/App.jsx - Overview page
frontend/src/pages/OverviewPage.jsx - Customer reps
frontend/src/pages/CustomerRepsPage.jsx - Work orders
frontend/src/pages/WorkOrderListPage.jsx - API client
frontend/src/api/client.js
Laravel API
- District API
backend/app/Http/Controllers/Api/DistrictController.php - PIC API
backend/app/Http/Controllers/Api/PicController.php - Service-order API
backend/app/Http/Controllers/Api/ServiceOrderController.php
Operational data
- Districts
backend/app/Models/District.php - Customer reps
backend/app/Models/Pic.php - Service orders
backend/app/Models/ServiceOrder.php - Commit requests
backend/app/Models/CommitRequest.php - Locations
backend/app/Models/Location.php - Contractors
backend/app/Models/Contractor.php
Other components
- Dashboard user
- Relational database
Connections 26
- Dashboard user → App shell: uses
- App shell → Overview page: selects
- App shell → Customer reps: selects
- App shell → Work orders: selects
- Overview page → API client: requests summaries
- Customer reps → API client: requests PIC data
- Work orders → API client: requests orders
- API client → District API: requests district summary
- API client → PIC API: requests PIC data
- API client → Service-order API: requests orders and trends
- District API → Districts: reads districts
- District API → Locations: reads locations
- District API → Commit requests: counts incoming
- District API → Service orders: counts completion and overdue
- PIC API → Customer reps: reads PICs
- PIC API → Commit requests: counts requests
- PIC API → Service orders: queries orders
- Service-order API → Service orders: queries orders and stats
- Service-order API → Commit requests: queries requests and trends
- Service orders → Locations: belongs to
- Service orders → Commit requests: belongs to
- Service orders → Contractors: belongs to
- Districts → Relational database: reads
- Customer reps → Relational database: reads
- Service orders → Relational database: reads
- Commit requests → Relational database: reads