TorbatYar/backend/services/delivery
Mortezakoohjani 72077908f1 feat(delivery): deploy backend phases 10.2-10.8 through settlement
Ship fleet, availability, pricing, dispatch, routing, tracking, and settlement on delivery-service 0.10.8.0 with migrations and phase tests green.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 21:01:23 +03:30
..
alembic feat(delivery): deploy backend phases 10.2-10.8 through settlement 2026-07-27 21:01:23 +03:30
app feat(delivery): deploy backend phases 10.2-10.8 through settlement 2026-07-27 21:01:23 +03:30
scripts feat(delivery): deploy backend phases 10.2-10.8 through settlement 2026-07-27 21:01:23 +03:30
alembic.ini feat(platform): seed service registry, deploy all modules, and fix homepage catalog. 2026-07-27 12:39:51 +03:30
Dockerfile.dev feat(platform): seed service registry, deploy all modules, and fix homepage catalog. 2026-07-27 12:39:51 +03:30
pytest.ini feat(platform): seed service registry, deploy all modules, and fix homepage catalog. 2026-07-27 12:39:51 +03:30
README.md feat(platform): seed service registry, deploy all modules, and fix homepage catalog. 2026-07-27 12:39:51 +03:30
requirements.txt feat(platform): seed service registry, deploy all modules, and fix homepage catalog. 2026-07-27 12:39:51 +03:30

Delivery & Fleet Platform (Torbat Driver)

Field Value
Service delivery-service
Database delivery_db
Port 8007
Permission prefix delivery.*
Version 0.10.1.0
Phase 10.1 Driver Management
ADR ADR-015

Owns

  • Delivery organizations, hubs, configuration/settings shells
  • External provider / routing-engine registrations (adapters later)
  • Drivers: profiles, lifecycle, credential/document refs, lifecycle history
  • Delivery audit log + transactional outbox for driver events
  • Health / capabilities / metrics discovery
  • Publish-only delivery.* events

Does not own

  • Accounting journals / Posting Engine
  • Communication SMS/email providers or message delivery timeline
  • Loyalty ledger
  • Vertical order aggregates (Hospitality, Marketplace, Store, Pharmacy, Clinic, Sports Center)
  • Fleet / vehicles / dispatch / routing / tracking engines (later phases)
  • Identity user admin / CRM contact master / Storage blobs
  • Driver App / Dispatcher Panel UI (frontend)

APIs

Method Path
GET /health
GET /capabilities
GET /metrics
CRUD /api/v1/organizations
CRUD /api/v1/hubs
CRUD /api/v1/external-providers
CRUD /api/v1/routing-engines
CRUD /api/v1/configurations
PUT/GET /api/v1/settings
GET /api/v1/audit
CRUD + lifecycle /api/v1/drivers
GET /api/v1/permissions/catalog

Run (dev)

export DELIVERY_DATABASE_URL=postgresql+asyncpg://...
export DELIVERY_DATABASE_URL_SYNC=postgresql+psycopg://...
python scripts/ensure_db.py
alembic upgrade head
uvicorn app.main:app --host 0.0.0.0 --port 8007 --reload

Tests

pytest