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.
| Concern | Owner |
|---|---|
| Content, FAQs, guides, announcements, legal copy | Strapi |
| Reference data — organisations, communities, commute hubs, service areas, vehicle types, relationship types | Strapi |
| Policy drafts, rule definitions, risk signal definitions, pilot configuration | Strapi |
| Active policy version used for a decision | PostgreSQL (policy_versions) |
| Users, identities, journeys, requests, matches, bookings, contributions, ratings, incidents | PostgreSQL |
| Compliance decisions, compliance events, audit records | PostgreSQL |
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.
