/ Docs / Resumable Plan v1 · 2026
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-30): Docs complete (A0–A15). Track B (build) — Phase 0 backend COMPLETE: 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). geolocation ✅ (live partner-location index now backs matching's Locator; geofence custody check with accuracy gate + server timestamp; fuzzy-address resolver with Point-anchor fallback; anti-spoof mock/teleport/stale signals — in-memory stand-ins for Redis GEOSEARCH + PostGIS KNN); KYC ✅ (Cashfree Secure ID — Aadhaar OKYC masked-token-only, PAN, bank penny-drop, liveness+face; resumable idempotent pipeline; graduated trust tiers New→Platinum capping value/COD/distance; Aadhaar-token blacklist + one-account-per-Aadhaar; vehicle-class check matrix — cycle skips RC/DL); PUDO custody chain ✅ (#15) — RideChain Point onboarding (hub-role operator, KYC-gated activation, geofenced) + nearest-Points lookup; the India-Post-style custody chain with a tracking number and the four interlocking checks at every handover (assignment lock · unique tamper-evident QR · two-sided OTP · geofence+server-timestamp), threading origin-intake→carrier-pickup→hub-intake→destination-intake→receiver-collection over a multi-Point route; each carrier leg's escrow release is gated by its handover via the booking port, and every hop pushes a tracking notification through notify. The full Phase-0 vertical slice now runs end-to-end through real modules: book→quote→escrow-hold→match→drop-at-Point→carrier-handovers→per-leg-split-release→collect→settled. Backend is now LIVE in production — deployed as a Cloudflare Container (Go modular monolith behind a Worker entrypoint) at ridechain-api.pathakumashankar.workers.dev; /healthz returns all 10 modules, auth-OTP/RBAC/CORS verified over HTTPS. Payment gateways (Razorpay TEST + Cashfree SANDBOX) and Cashfree Secure ID KYC now make real HTTP calls (live-ready: going live = key/URL swap); persistence runs on Supabase Postgres when RC_DATABASE_URL is set (the running instance is in-memory until the DB secret + migration 0002_app_pg are applied — see backend/DEPLOY.md). The web booking form (ridechain.in) calls the live API once NEXT_PUBLIC_API_BASE_URL is set. Next action: finish go-live config (apply the Supabase migration + add the gateway/webhook repo secrets), then Phase 1 — bundling + milk-run + VRP routing + COD reconciliation + surge + fraud v1; plus the Flutter apps (#16) + admin web (#17).

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

#DocumentScopeStatus
A0Shared assets (CSS/JS/Mermaid/template)Design system, runtime, doc template & conventionsDone
A1Documentation HubIndex + navigation + KPIsDone
A2Context & VisionProblem, EU models, cost thesis, locked decisionsDone
A3System ArchitectureTopology, apps, modules, data, integrations, securityDone
A4Skills & Commandspublish-doc skill + /review-features command referenceDone
A5Booking & Delivery FlowEntry points, pickup/drop modes, state machine, OTP/POD, cancel/refundDone
A6Onboarding & KYCPartner/booker/PUDO onboarding, Cashfree Easy KYC, trust tiersDone
A7Last-Mile DeliveryPUDO, milk-run, relay legs, custody chain, reverse logisticsDone
A8Payments & IntegrationRZP→CF routing, escrow, integration sequences, webhooksDone
A9Split-Money SettlementRoute/Easy Split, per-leg split, ledger, reconciliationDone
A10Commission & PricingFare formula, vehicle rates, tiers, surge, worked examplesDone
A11GeolocationTracking, geofence, addressing, offline geo, anti-spoofDone
A12Nearest-Partner MatchingEligibility, scoring, dispatch cascade, bundling, fairnessDone
A13Fastest-Route FindingOSRM, VRP batching, rural weighting, ETA, re-routeDone
A14Scale & Low-CostCost levers, capacity model, caching/sharding, cost-to-millionsDone
A15Edge-Case CatalogExhaustive failure-mode catalog + mitigationsDone

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
        
Indicative build roadmap. Phase 0 proves cost-per-delivery & trust in one block; later phases add network economics and Europe-grade features. Dates are relative placeholders, not commitments.
PhaseDeliverableStatus
0 · MVPRepo scaffold — Go modular monolith (8 modules) + Next.js PWA live + Cloudflare/Terraform (Flutter pending)Done
0 · MVPCore data model + migrations (15 tables, 17 enums, PostGIS)Done
0 · MVPAppend-only escrow ledger (idempotent entries, balances as projections, canonical splits conserve money)Done
0 · MVPAuth (phone-OTP, HMAC session tokens, RBAC middleware, /me)Done
0 · MVPBooking lifecycle + state machine (DOOR/POINT modes, legs, dual-OTP + POD, cancel)Done
0 · MVPPayments gateway (Razorpay→Cashfree success-rate routing) + escrow webhooks (signature-verified, idempotent)Done
0 · MVPSplit settlement — always-balancing fare split + per-leg escrow release on drop-OTP+POD (remainder on final leg), idempotentDone
0 · MVPNearest-partner matching — eligibility matrix + cost-aware scoring + dispatch cascade (escrow_held→matching→assigned→AddLeg, no_partner→refund); geo behind a Locator portDone
0 · MVPGeolocation — live partner index (backs matching), geofence custody check, fuzzy-address resolver + Point anchor, anti-spoof signalsDone
0 · MVPCashfree Easy KYC — Secure ID OKYC/PAN/penny-drop/liveness, resumable pipeline (masked-token-only), graduated trust tiers, Aadhaar-token blacklistDone
0 · MVPRideChain Point (PUDO) onboarding (KYC-gated, geofenced) + nearest-Points lookup + four-check custody chain (assignment lock · unique QR · two-sided OTP · geofence+timestamp) with tracking number & per-hop notifications, gating per-leg escrow releaseDone
1Bundling + milk-run scheduling + VRP routing + COD reconciliation + surge + trust tiers + fraud v1To do
2Crowd couriers, reverse logistics, lockers, insurance, ONDC, graph-fraud, district scaleTo 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.