How mehedi-200/garageflow-api works
GarageFlow is a Laravel API for garage service management. Its main workflow moves authenticated garage users through customer and vehicle records into service-job intake, mechanic assignment, status progression, parts, invoicing, and payment. Controllers delegate business operations to services, which use Eloquent models; resources and a shared response envelope shape API output. The README documents dashboard, grouped search, and notifications as additional capabilities. Some controllers and services were not excerpted, so their internal calls are shown only where the index or README supports them.
Main entry points: Controllers API controllers · ServiceJobService.php Job workflow · ServiceJob.php Jobs and service items · InvoiceService.php Invoice processing
Components 20
API access
- API routes
routes/api.php - Role middleware
app/Http/Middleware/EnsureRole.php - API controllers
app/Http/Controllers - Response envelope
app/Traits/ApiResponse.php
Garage records
- Customer management
app/Services/CustomerService.php - Vehicle registry
app/Services/VehicleService.php - Customer and vehicle data
app/Models/Customer.php
Job operations
- Job workflow
app/Services/ServiceJobService.php - Job endpoints
app/Http/Controllers/ServiceJobController.php - Jobs and service items
app/Models/ServiceJob.php - Job response resource
app/Http/Resources/ServiceJobResource.php
Billing and insights
- Invoice processing
app/Services/InvoiceService.php - Invoice endpoints
app/Http/Controllers/InvoiceController.php - Invoice records
app/Models/Invoice.php - Dashboard metrics
app/Services/DashboardService.php - Grouped search
app/Services/SearchService.php
Identity and alerts
- Authentication
app/Services/AuthService.php - Users and roles
app/Models/User.php - Notifications
app/Services/NotificationService.php
Other components
- API client
Connections 26
- API client → API routes: sends requests
README.md - API routes → Role middleware: applies roles
routes/api.php - API routes → API controllers: routes to
routes/api.php - API controllers → Response envelope: formats responses
app/Http/Controllers/CustomerController.php - API controllers → Customer management: delegates customer work
app/Http/Controllers/CustomerController.php - API controllers → Vehicle registry: delegates vehicle work
app/Http/Controllers/VehicleController.php - API controllers → Job workflow: delegates job work
app/Http/Controllers/ServiceJobController.php - Job endpoints → Job workflow: changes job status
app/Http/Controllers/ServiceJobController.php - Job endpoints → Job response resource: serializes jobs
app/Http/Controllers/ServiceJobController.php - Job response resource → Jobs and service items: renders job fields
app/Http/Resources/ServiceJobResource.php - Job response resource → Invoice records: renders loaded invoice
app/Http/Resources/ServiceJobResource.php - Job workflow → Invoice processing: creates completion invoice
app/Services/ServiceJobService.php - Job workflow → Notifications: sends job alerts
app/Services/ServiceJobService.php - Invoice endpoints → Invoice processing: delegates invoice work
app/Http/Controllers/InvoiceController.php - Invoice processing → Invoice records: creates and updates
app/Services/InvoiceService.php - Invoice processing → Notifications: alerts admins on payment
app/Services/InvoiceService.php - Customer management → Customer and vehicle data: manages customer records
- Vehicle registry → Customer and vehicle data: manages vehicle records
- Jobs and service items → Customer and vehicle data: relates vehicle
app/Models/Vehicle.php - Jobs and service items → Users and roles: relates mechanic
app/Models/ServiceJob.php - Dashboard metrics → API controllers: provides dashboard metrics
README.md - Grouped search → Customer and vehicle data: searches customers and vehicles
app/Services/SearchService.php - Grouped search → Jobs and service items: searches jobs
app/Services/SearchService.php - Grouped search → Invoice records: searches invoices
app/Services/SearchService.php - Authentication → Users and roles: authenticates users
app/Services/AuthService.php - API client → Authentication: authenticates
README.md