One spine.
Ten doors.
One build.
Thirteen documents describe the same system from ten different angles. This page assembles the parts inventory, maps existing code to the architecture, and lays out what gets built first.
— Synthesis brief (first read.docx)
System Architecture
Four layers, two rails. Every vertical is a door into the same spine. RUIL is not a vertical — it's trade infrastructure.
Parts Inventory
13 source documents across 11 components. Status = current state of development materials.
The five personas insight: The same five fictional people recur across all eleven briefs — proof that ten doors are really one product for five personas.
Existing Code Assets
Six separate projects already exist. All use React + Tailwind. Four use Next.js. Two use Vite/React. The unified build picks one framework and one Supabase instance.
Unification Strategy
Framework choice: Next.js App Router — already used by 4 of 6 code projects. The two Vite projects (Lekker Local, Beat Best Before) are more feature-complete; their component and service patterns get migrated in, not their bundler.
Single Supabase instance — one auth, one schema, shared across all doors. The shared core OS (identity, wallet, compliance) lives here. Each door gets its own schema prefix but the same auth user.
Monorepo or single app? Single Next.js app with App Router route groups: /(lekker-local), /(winskopies), etc. Shared layout provides the nav, identity, and wallet. One deploy, one domain.
Build Phases
Sequencing by dependency first, then frequency. Identity and compliance before any door. Food corridor first — daily, universal, clearest trust story. Regulated verticals last.
Technical Requirements
Build the spine once. Partner for commodities. Never build twice across doors.
| Service | What it does | Build / Partner |
|---|---|---|
| Identity & Trust | FICA-once KYC · OIDC auth (Supabase) · Ubuntu Ledger obligation graph · 4-dim reputation · Category certification badges (COA, SANS 2088, PDP, roadworthy, FFC) · Fraud graph (cross-door visibility) | Build Core moat |
| Money Kernel | Dual-ledger wallet (Rand + RUIL Credits + Points) · Mixed-till checkout · Escrow API · Notional ZAR valuation feed (VAT 404 compliance) · Stokvel group escrow | Partner + Build PayFast/Gumroad payments; build credit ledger |
| Compliance Engine | Rule packs per vertical: COA/R638, SANS 2088, CPA 55(2) condition grading, Second-Hand Goods Act, PPRA/FICA, NLTAA, POPIA · Document generation templates · Regulator reporting APIs | Build + Counsel |
| Commerce Core | Listings · Condition grading · Inventory lifecycle state machine (listed → bundled → reserved → sold → donated) · Multi-format sales · Orders · Bundles engine · 5 personas' journeys as shared flows | Build |
| Logistics | Multi-carrier API (Pargo / Pudo / Courier Guy / PAXI) · Hub registry · Taxi-parcel route integration · Donation routing (FoodForward SA, TCB) · Delivery tracking | Partner Pargo, Pudo, Loop/AftaRobot |
| AI (Nexus) | WhatsApp concierge · Demand forecasting · Photo condition assessment · Skills matching · Sentiment analysis · Document factory (31 docs/idea) · Business plan + pricing calculator on demand | Partner-internal Already exists at :8090 |
| Channels | WhatsApp Business API (primary) · USSD gateway (134RUIL#) · Next.js PWA (offline-first) · Agent app for non-smartphone communities | Build + Partner USSD provider |
| Data & Impact | Shared warehouse across all doors · Township demand curves (what sells, at what price, which kasi) · Impact ledger: jobs created, meals saved, kg diverted, Rand retained · B-BBEE/SDG reporting for corporate SED clients | Build Revenue line + capital rail proof |
| Physical Ops | Hub network operations · RUIL Days protocol · Ecosystem agent programme · Stokvel liaison · Market Day Elders coordination | Ops, not tech |
Where We Start
Phase A: the unified Next.js project. One repo, one schema, the shared core. Lekker Local as the first door from Phase B.
pietarien-one/. App route groups for each door. Tailwind + shadcn/ui (already used across projects). Single Supabase project.Target Location for the Unified Project
D:\Nexus-Pietarien\1 LekkeLocal\pietarien-one\
New Next.js 14+ project. Pulls patterns from the six existing code projects but starts clean — no legacy bundler conflicts, one shared Supabase config, one Tailwind setup. The existing projects stay as reference/migration sources.
Say "start building" and the project gets scaffolded — shared core schema first, then Lekker Local door, then Beat Best Before. Or say which part you want to tackle first and we go there directly.