Ship the delivery platform UI under modules/delivery with thin app routes, BFF proxy, CRUD for phase 10.0-10.1 APIs, and capability-gated future screens. Co-authored-by: Cursor <cursoragent@cursor.com>
2.7 KiB
2.7 KiB
Delivery Frontend Validation Report
Date: 2026-07-26
Module version: Phase 10.1 UI
Backend: delivery-service v0.10.1.0 @ :8007
Automated checks
| Check | Command | Result |
|---|---|---|
| Route thinness | npm run validate:delivery-routes |
✅ PASS (56 routes) |
| Architecture boundaries | npm run validate:architecture |
✅ PASS (delivery marker registered) |
| TypeScript compile | next build (compile phase) |
✅ Compiled successfully |
| ESLint (delivery) | No delivery-specific errors | ✅ PASS |
API connectivity
| Screen | Mock/placeholder? | Backend endpoint |
|---|---|---|
| Executive dashboard | No | organizations, hubs, drivers list |
| Organizations | No | CRUD /api/v1/organizations |
| Branches (hubs) | No | CRUD /api/v1/hubs |
| Drivers list | No | CRUD /api/v1/drivers |
| Driver detail | No | get, lifecycle, credentials, documents |
| External providers | No | CRUD |
| Routing engines | No | CRUD |
| Configurations | No | CRUD |
| Settings | No | GET + PUT |
| Audit | No | GET with entity_type/id |
| Permissions | No | catalog |
| Health / Capabilities | No | public endpoints |
| Dispatch, orders, fleet, maps (live), settlement, AI | Phase gate (not mock) | Awaits backend phase |
Intentional phase-gated screens
34 screens map to PHASE_REGISTRY entries. They display:
- Current roadmap phase number
- Feature flag name from
/capabilities - Links to capabilities page and dashboard
This is production-honest behavior — no fake tables or dummy CRUD for APIs that do not exist.
BFF
| Path | Upstream |
|---|---|
/api/delivery/* |
DELIVERY_SERVICE_URL → http://localhost:8007 |
Headers forwarded: Authorization, X-Tenant-ID, Content-Type, Accept
Known limitations
- Realtime: No WebSocket client until Phase 10.7 backend support
- Map tiles: Placeholder canvas until shared map provider integrated
- Roles / API keys: Identity platform concern; phase-gated until dedicated APIs
- Build: Full
next buildmay require clean.nexton Windows if manifest race occurs (compile succeeds)
Regression commands
cd frontend
npm run validate:delivery
npm run build
node scripts/scaffold-delivery-module.mjs # idempotent regen
Sign-off criteria met
- Module under
frontend/modules/delivery/ - Thin routes under
app/delivery/ - BFF proxy configured
- All Phase 10.0–10.1 APIs wired
- Future screens capability-gated (no mocks)
- Loading / error / empty / permission states
- ESLint + architecture validation
- Documentation generated