TorbatYar/docs/phase-handover/phase-dp-reg.md
Mortezakoohjani e41ecfad4c Sync platform docs, infra, and module services with Accounting integration.
Include Loyalty/Communication/Sports Center backends and registry updates alongside production nginx and compose wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 22:35:23 +03:30

106 lines
3.9 KiB
Markdown

# Phase Handover — DP-Reg Delivery & Fleet Platform Registration
## Metadata
| Field | Value |
| --- | --- |
| Phase ID | `delivery-reg` |
| Title | Delivery & Fleet Platform Registration |
| Status | Complete |
| Service(s) | `delivery` (registered; not yet implemented) |
| Version | n/a (docs-only) |
| Date | 2026-07-25 |
| ADR(s) | [ADR-015](../architecture/adr/ADR-015.md) |
## Reusable Components
| Component | Location | Reuse notes |
| --- | --- | --- |
| Platform registration pattern | Same as Sports Center SC-Reg | Docs + ADR + manifests before code |
| Service template | [service-template.md](../ai-framework/service-template.md) | Use in Phase 10.0 |
| Phase template | [phase-template.md](../ai-framework/phase-template.md) | Use for 10.x phase docs |
## Public APIs
| Method | Path | Auth / Permission | Notes |
| --- | --- | --- | --- |
| — | — | — | N/A — registration only; APIs begin in Phase 10.0 |
Planned surfaces (not implemented): `/health`, `/capabilities`, `/api/v1/*` under `delivery.*` permissions.
## Events
| Event type | Domain / Integration | Payload summary | Version |
| --- | --- | --- | --- |
| `delivery.*` (planned) | Delivery domain | Publish-only; catalog grows per phase | Planned |
## Extension Points
| Extension point | How to extend | Forbidden uses |
| --- | --- | --- |
| Routing engine providers | Adapter protocol in Delivery service | Verticals calling external routers directly |
| Fleet / courier providers | Provider registry + adapters | Credentials outside Delivery |
| Merchant connectors | Versioned REST/events for job intake | Shared DB with Restaurant/Marketplace |
| AI assist hooks | Optional contracts; core works offline | Hard dependency on AI for dispatch |
## Known Limitations
- No `backend/services/delivery` code yet — Phase 10.0
- No Alembic migrations yet
- No compose wiring / runtime health yet
- Driver App / Dispatcher Panel UI deferred to frontend phases
- Order ownership remains in vertical services
## Migration Notes
| Item | Detail |
| --- | --- |
| Alembic revision(s) | N/A (docs-only) |
| Upgrade steps | N/A |
| Downgrade support | N/A |
| Data backfill | N/A |
| Breaking changes | None |
## Dependencies
| Dependency | Type | Required for |
| --- | --- | --- |
| AI Framework | Docs | Development loop / gates |
| ADR-001 / 003 / 006 / 010 / 011 / 012 | Architecture | Boundaries |
| Core Platform | Service | Entitlement (from 10.0) |
| Communication | Service | Notifications (from 10.9) |
| Accounting | Service | Settlement posts (from 10.8) |
## Next Phase Entry
| Field | Value |
| --- | --- |
| Recommended next phase | `delivery-10.0` Foundation |
| Blockers for next phase | None for scaffold; runtime compose optional until wired |
| Entry checklist | Read this handover + [delivery-roadmap.md](../delivery-roadmap.md) + [ADR-015](../architecture/adr/ADR-015.md) + [service-template.md](../ai-framework/service-template.md); implement only foundation shells — no dispatch/routing engines yet |
What the next phase must read and assume:
1. This handover + [delivery-roadmap.md](../delivery-roadmap.md)
2. Updated [module-registry.md](../module-registry.md#delivery) / manifests
3. Open limitations above become Phase 10.0 scope (scaffold only)
4. Suggested next phase ID: `delivery-10.0`
## Completion Sign-Off
- [x] Quality gates passed (documentation / architecture / manifest / cross-reference / links)
- [x] Tests green (N/A service pytest — docs-only; validation script/checks)
- [x] Documentation updated
- [x] Progress / next-steps / registries updated
- [x] No TODO for claimed deliverables
- [x] Self audit completed
## Related Documents
- [Delivery Roadmap](../delivery-roadmap.md)
- [Phase Area](../phases/Delivery/README.md)
- [ADR-015](../architecture/adr/ADR-015.md)
- [Phase Manifest](../ai-framework/phase-manifest.yaml)
- [Service Manifest](../ai-framework/service-manifest.yaml)
- [Quality Gates](../ai-framework/quality-gates.md)