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 /order/jobs/sync (or update job trees) after payment if needed
4
Order status — → dispatched when delivery job tree is planned with driver

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
Home Features How It Works Architecture Documentation Postman