SARURA OS - Diagram Design

All diagrams, one page

White-smoke + dark green. Swimlane - Architecture - ER - Data topology.

1. Pre-order flow (Swimlane)

Order before harvest. Batch. Move in hours.

SARURA pre-order flow Swimlane showing HORECA pre-order batching into a cooperative pick list, harvest confirm, Nyabugogo sort, moto delivery, and settlement. HORECA OPS COOP MONEY BATCH Pre-order PWA · WhatsApp 1 Confirm by 5pm Day -1 Pick list per cooperative Sort Nyabugogo 1h Harvest USSD *384* · 6am Deliver moto by 11am MoMo + EBM 30/15-day settle LEGEND Step Focal handoff Flow

2. System overview (Architecture)

Supabase is the single source of truth.

SARURA system overview Architecture showing USSD, PWA, and WhatsApp clients connecting through an API to Supabase, with admin, MoMo, and EBM services. CLIENTS PLATFORM DATA HTTPS WRITE USSD *384* Africa's Talking PWA Portal horeca.sarura.rw WhatsApp Cloud API API Next.js routes Web Admin batch + sort Supabase orders = truth MoMo + EBM mock EBM v1 LEGEND Source of truth HTTPS / API

3. Data model (ER)

Orders is the aggregate root.

SARURA data model Entity diagram showing cooperatives, farmers, harvests, buyers, orders, batches, and payments with their relationships. cooperatives # id · name · district leader phone · by-law approval date farmers # id · → cooperative_id name · phone · lang harvests # id · → farmer_id crop · grade · kg · status buyers # id · name · type · TIN phone · address · lang orders ★ root # id · → buyer_id · crop grade · kg · source pwa/wa status · date · slot price_per_kg · address batches # id · date · crop · grade kg_needed · kg_listed payments # id · → order_id · amount momo_ref · ebm_ref · due 1 N 1 N 1 N LEGEND Aggregate root # PK · → FK

4. Data topology (DP integration)

Sources left, platform center, consumers right.

SARURA data topology Integration topology showing USSD, PWA, and WhatsApp sources feeding the SARURA platform zone with Supabase at the center, serving admin, MoMo, and loss consumers. SARURA PLATFORM USSD HTTPS SERVE USSD farmers *384* · harvests PWA HORECA cart · checkout WhatsApp order-by-1 Ingest API merge pwa + wa Supabase orders = truth Batch engine pick list · manifest Admin board sort · dispatch MoMo + EBM collect · receipt Loss tracker kg in vs out LEGEND Platform hub HTTPS wire