Overview · Plan
Resumable Plan
A phase-by-phase plan for both the documentation and the product build, with a live status board. Designed so any session can resume exactly where the last one stopped.
▶ Resume point (last updated 2026-06-27): Docs complete (A0–A15). Track B (build) underway — Phase 0: repo scaffold ✅ (Go backend + Next.js PWA live at ridechain.in + Cloudflare/Terraform); core data model + migrations ✅ (15 tables, 17 enums, append-only ledger, validated on live Postgres); auth ✅; booking lifecycle + state machine ✅ (DOOR/POINT modes, legs, dual-OTP + POD, idempotent create, RBAC — verified over HTTP); escrow ledger ✅; payments gateway ✅ (Razorpay→Cashfree success-rate routing, signature-verified idempotent webhooks → escrow Hold, verified live with the real Razorpay TEST key); split settlement ✅ (pure always-balancing fare split; per-leg partner release on drop-OTP+POD, remainder — Points/hub/commission/PG-fee/tax-reserve — on the final leg; idempotent, canonical ₹120/₹220 splits conserve escrow to 0); nearest-partner matching ✅ (vehicle eligibility matrix + cost-aware scoring + dispatch cascade with single-offer lock and progressive radius; escrow_held→matching→assigned→AddLeg, no_partner_found→auto-refund; geo proximity behind a Locator port stubbed with in-memory Haversine until #13). The full Phase-0 vertical slice now runs end-to-end through real modules: book→quote→escrow-hold→match→pickup-OTP→drop-OTP+POD→split-release→settled. Next action: geolocation/PostGIS (#13) — real nearest-partner queries behind the Locator port — and KYC onboarding (#14). Flutter apps still pending (#16). Backend is logic-only — not yet deployed or wired to the live site (deferred to a later "make it live" pass).
How to use this board
Each row is a unit of work with a status. On resume: scan for the first In progress or To do row, read its linked doc, and continue. Update the chip + the resume banner when you finish (the publish-doc skill requires it).
Done · In progress · To do · Blocked
Track A — Documentation
| # | Document | Scope | Status |
|---|---|---|---|
| A0 | Shared assets (CSS/JS/Mermaid/template) | Design system, runtime, doc template & conventions | Done |
| A1 | Documentation Hub | Index + navigation + KPIs | Done |
| A2 | Context & Vision | Problem, EU models, cost thesis, locked decisions | Done |
| A3 | System Architecture | Topology, apps, modules, data, integrations, security | Done |
| A4 | Skills & Commands | publish-doc skill + /review-features command reference | Done |
| A5 | Booking & Delivery Flow | Entry points, pickup/drop modes, state machine, OTP/POD, cancel/refund | Done |
| A6 | Onboarding & KYC | Partner/booker/PUDO onboarding, Cashfree Easy KYC, trust tiers | Done |
| A7 | Last-Mile Delivery | PUDO, milk-run, relay legs, custody chain, reverse logistics | Done |
| A8 | Payments & Integration | RZP→CF routing, escrow, integration sequences, webhooks | Done |
| A9 | Split-Money Settlement | Route/Easy Split, per-leg split, ledger, reconciliation | Done |
| A10 | Commission & Pricing | Fare formula, vehicle rates, tiers, surge, worked examples | Done |
| A11 | Geolocation | Tracking, geofence, addressing, offline geo, anti-spoof | Done |
| A12 | Nearest-Partner Matching | Eligibility, scoring, dispatch cascade, bundling, fairness | Done |
| A13 | Fastest-Route Finding | OSRM, VRP batching, rural weighting, ETA, re-route | Done |
| A14 | Scale & Low-Cost | Cost levers, capacity model, caching/sharding, cost-to-millions | Done |
| A15 | Edge-Case Catalog | Exhaustive failure-mode catalog + mitigations | Done |
Track B — Product build (gated, not started)
Not started. Per standing instruction, no code is written until the user explicitly says go. This track is the sequencing once unblocked.
gantt
title RideChain build roadmap (indicative)
dateFormat YYYY-MM-DD
axisFormat %b
section Phase 0 — MVP pilot
Repo scaffold (Go + Flutter + Next.js + CF) :p0a, 2026-07-01, 14d
Auth + OTP + data model + escrow ledger :p0b, after p0a, 21d
Vertical slice: book→match→OTP→POD→split payout :p0c, after p0b, 28d
KYC onboarding + PUDO custody/handover :p0d, after p0c, 21d
Single-block pilot launch :milestone, after p0d, 0d
section Phase 1 — Network economics
Bundling + milk-run + VRP routing :p1a, after p0d, 30d
COD + reconciliation + surge + trust tiers :p1b, after p1a, 25d
Fraud ML v1 + WhatsApp/IVR booking :p1c, after p1b, 25d
section Phase 2 — EU-grade + scale
Crowd couriers + reverse logistics + lockers :p2a, after p1c, 40d
Insurance + ONDC + graph-fraud + district scale :p2b, after p2a, 45d
| Phase | Deliverable | Status |
|---|---|---|
| 0 · MVP | Repo scaffold — Go modular monolith (8 modules) + Next.js PWA live + Cloudflare/Terraform (Flutter pending) | Done |
| 0 · MVP | Core data model + migrations (15 tables, 17 enums, PostGIS) | Done |
| 0 · MVP | Append-only escrow ledger (idempotent entries, balances as projections, canonical splits conserve money) | Done |
| 0 · MVP | Auth (phone-OTP, HMAC session tokens, RBAC middleware, /me) | Done |
| 0 · MVP | Booking lifecycle + state machine (DOOR/POINT modes, legs, dual-OTP + POD, cancel) | Done |
| 0 · MVP | Payments gateway (Razorpay→Cashfree success-rate routing) + escrow webhooks (signature-verified, idempotent) | Done |
| 0 · MVP | Split settlement — always-balancing fare split + per-leg escrow release on drop-OTP+POD (remainder on final leg), idempotent | Done |
| 0 · MVP | Nearest-partner matching — eligibility matrix + cost-aware scoring + dispatch cascade (escrow_held→matching→assigned→AddLeg, no_partner→refund); geo behind a Locator port | Done |
| 0 · MVP | Geolocation/PostGIS (real Locator) + Cashfree Easy KYC onboarding + PUDO custody/handover | In progress |
| 1 | Bundling + milk-run scheduling + VRP routing + COD reconciliation + surge + trust tiers + fraud v1 | To do |
| 2 | Crowd couriers, reverse logistics, lockers, insurance, ONDC, graph-fraud, district scale | To do |
Locked decisions & open questions
The authoritative copy lives in Context & Vision §7. Open: exact pilot block; first B2B feeder partner. Neither blocks starting the build.