Live
Investor demo
One request runs GPS ingest, H3 lookup, Hungarian match, the trip state machine, inspection, simulated unlock, escrow split, and host payout — all in memory.
Isolated memory container
Run the marketplace loop
GPS → H3 → match → FSM → inspect → unlock → escrow → payout. No Stripe, Redis, or Postgres.
Also available as POST /api/v1/platform/demo.
POST/api/v1/platform/demoRate-limited. Safe to click in a meeting.
Meeting script (about four minutes)
- Open /docs — mode badge says demo, bills $0.
- Run the loop. Call out H3 cell, surge, matched driver.
- Show the FSM cannot skip arrival. Riders cannot cancel in_progress.
- Show the ledger legs summing to zero (fees, insurance pool, host payable).
- Say: DATABASE_URL is how this becomes a real database with backups. GO_LIVE is how it becomes allowed to take money in California.
Loop · On each state change
Trip lifecycle
Strict FSM with actor checks. Idempotency-Key required on HTTP. Same-state retries are no-ops.
- requested → searching (system)
- searching → matched (system/admin)
- matched → driver_en_route → driver_arrived → in_progress → completed
- Cancel is allowed until in_progress; after that only safety/admin.
backend/modules/trips/domain/states.ts
assertTransition — Legal edges + actors
backend/modules/trips/application/lifecycle.ts
TripLifecycle.transition — Version bump, events, push
app/api/v1/trips/[id]/transitions/route.ts
POST — Header Idempotency-Key
Loop · Booking hold, capture at completion, payout on demand
Escrow & ledger
Double-entry cents. Demo writes the journal without Stripe. Production refuses if GO_LIVE blockers remain.
- Authorize hold (stripe_pending ↔ platform_clearing).
- Capture splits fees, insurance pool, host payable, optional driver share.
- Refund reverses clearing to the processor.
- Cash-out moves payable to stripe_pending (Connect transfer in production).
backend/modules/payments/domain/ledger.ts
holdAtBooking / captureAndSplit — Zero-sum journals
backend/modules/payments/application/escrow.ts
EscrowService — Stripe when keys exist
backend/shared/golive/status.ts
assertProductionMoney — Go-live gate