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)

  1. Open /docs — mode badge says demo, bills $0.
  2. Run the loop. Call out H3 cell, surge, matched driver.
  3. Show the FSM cannot skip arrival. Riders cannot cancel in_progress.
  4. Show the ledger legs summing to zero (fees, insurance pool, host payable).
  5. 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.

POST /api/v1/trips/:id/transitions
  1. requested → searching (system)
  2. searching → matched (system/admin)
  3. matched → driver_en_route → driver_arrived → in_progress → completed
  4. Cancel is allowed until in_progress; after that only safety/admin.

backend/modules/trips/domain/states.ts

assertTransitionLegal edges + actors

backend/modules/trips/application/lifecycle.ts

TripLifecycle.transitionVersion bump, events, push

app/api/v1/trips/[id]/transitions/route.ts

POSTHeader Idempotency-Key

$0 demo: Memory trip repo. Same code path as Postgres later.Scale: DATABASE_URL so trips survive process restart.

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.

POST /api/v1/payments/holds
  1. Authorize hold (stripe_pending ↔ platform_clearing).
  2. Capture splits fees, insurance pool, host payable, optional driver share.
  3. Refund reverses clearing to the processor.
  4. Cash-out moves payable to stripe_pending (Connect transfer in production).

backend/modules/payments/domain/ledger.ts

holdAtBooking / captureAndSplitZero-sum journals

backend/modules/payments/application/escrow.ts

EscrowServiceStripe when keys exist

backend/shared/golive/status.ts

assertProductionMoneyGo-live gate

$0 demo: Simulated PaymentIntent. Ledger still balances to zero.Scale: STRIPE_SECRET_KEY + Stripe Connect. No Adyen required.