Skip to content

Database Overview ​

PostgreSQL + PostGIS is the operational data foundation.

Core domains:

  • identity
  • participants
  • vehicles
  • journeys
  • matching
  • booking
  • cost sharing
  • safety
  • compliance
  • audit
  • notifications

Use UUID identifiers and created_at / updated_at timestamps. Expose a separate public_id to clients rather than the internal UUID.

Data model ​

Primary chain:

users → driver_profiles → vehicles → journeys → ride_requests → matches → bookings → ratings

Supporting entities:

user_identities, user_sessions, user_relationships, emergency_contacts, passenger_profiles, vehicle_verifications, recurring_journeys, journey_routes, journey_stops, contributions, incidents, policy_versions, compliance_rules, compliance_decisions, compliance_events, audit_logs, notifications.

Separation of concerns ​

The transactional database is not the CMS.

ConcernOwner
Content, FAQs, guides, announcements, legal copyStrapi
Reference data — organisations, communities, commute hubs, service areas, vehicle types, relationship typesStrapi
Policy drafts, rule definitions, risk signal definitions, pilot configurationStrapi
Active policy version used for a decisionPostgreSQL (policy_versions)
Users, identities, journeys, requests, matches, bookings, contributions, ratings, incidentsPostgreSQL
Compliance decisions, compliance events, audit recordsPostgreSQL

Strapi authors policy. PostgreSQL records which policy version was active when a decision was made. Both are needed: the second is what makes the first auditable.

See Schema & Migrations for the full DDL and Strapi Overview for the content boundary.

KHAWI — same route, go together.