Request flow through the system

Every action flows through the Laravel V1 API. Side effects (notifications, wallet, emails) fire from registered eventsβ€”not from controller return paths.

Client apps
Company dashboard, customer app, driver app
API gateway
/api/v1 β€” JWT, throttling, actor middleware
Auth & gates
jwt.verify, checkType, ensure.*.user, subscription checks
Domain services
OrderService, BillingService, DispatchService, WalletService, FinixService
Persistence
MySQL β€” money as cents, soft deletes, status history tables
Async & realtime
Queue (sync local / supervised prod), Pusher, FCM, scheduled commands

Major workflows

Customer places an order

1
Customer app β€” POST /api/v1/customer/order/billing then POST /orders
2
BillingService β€” Calculates quote from asset_specification, term, promotion, taxes
3
OrderService::place β€” Creates pending order, snapshot, line items, status history
4
Events β€” Customer\Order\PlaceEvent β†’ listeners notify company

Company approves and dispatches

1
Company β€” PATCH approve/order β€” requires assignable asset_id
2
OrderService β€” awaiting_payment if upfront > 0, else approved/confirmed path
3
Company β€” POST /driver/assign/{order} after payment if needed
4
Order status β€” β†’ dispatched; DriverJob created for delivery

Driver executes job

1
Driver β€” POST check-in β†’ driver.checked_in middleware active
2
Driver β€” POST /driver/jobs/{id}/start, POST send-location, POST /driver/jobs/{id}/complete
3
OrderService / events β€” Order β†’ delivered or picked_up β†’ completed
4
FCM β€” SendJobReminder for incomplete jobs (queue-dependent)
Home Features How It Works Architecture Documentation Postman