Twende Uganda-first Ride-Hailing

Product Workboard โ€” Design mockups, roadmap, and sprint issues

Flutter Apps Microservices MoMo-first

UI/UX Interactive Mockups

Click any card to open the interactive screen-by-screen mockup for that app.

๐Ÿ๏ธ Boda ๐Ÿš— Car ๐Ÿ“ฆ
Get Quote โ†’
Passenger App

Passenger App Flow

29 interactive screens: full sign-up & log-in, home map, saved places, multi-stop builder, schedule-for-later, fare quote + Fare Explainer, matching, in-app chat, pickup + helmet verification, cancel, in-trip safety, share trip, MoMo payment + tipping, wallet, history, profile, referrals, lost & found, help center, and offline / USSD fallback.

29 screens Flutter Helmet ยท Multi-stop ยท Schedule
โ†’
Today
UGX 47,200
9 trips ยท โญ 4.8
๐Ÿ”ฅ Go to Wandegeya
Online โ—
Driver App

Driver App Flow

25 interactive screens: full sign-up flow, pre-shift plate verification, availability + demand heatmap + Head-Home mode, offer countdown, active trip + PIN, earnings + 4-hour Forecast + Quests & Bonuses + Tier (Bronze/Silver/Gold) loyalty, history, withdrawal, performance, vehicle & docs, change-vehicle, and safety center.

25 screens Flutter Quests ยท Tiers ยท Head-Home
โ†’
๐Ÿ—บ๏ธ Live Map
โš ๏ธ Fraud
๐Ÿ’ฐ Pricing
๐Ÿ“‹ Disputes
42
Trips
138
Drivers
3
Alerts
Admin Dashboard

Admin Dashboard

17 interactive screens: full admin sign-in (password, 2FA, Google SSO, forgot password), live ops map, fraud console, Pricing Engine (live signals + autonomous decisions), Fuel & FX Feeds, pricing controls, disputes, KYC review, vehicle compliance (plate-mismatch handling), user management, MoMo reconciliation, analytics + demand forecast, audit log, and platform settings.

17 screens React Web Pricing Engine
โ†’
PRIMARY SECONDARY
Foundations

Design System & Foundations

Color tokens, typography, spacing scale, core components, target viewports (360ร—640+), accessibility rules, microcopy reference, connectivity-state matrix, Pricing Intelligence (formula + signals), Vehicle Identity Trust (5-layer defence), and Google Maps integration architecture.

Tokens Pricing Vehicle Trust Maps
โ†’

UX Principles

โšก
Fast-first
Primary action reachable in 1 tap from home screen
๐Ÿ“ถ
Low-bandwidth
Minimal payload UI, skeletons, graceful retry, offline-lite queue
๐Ÿ”’
Trust-first
Transparent fare breakdown, verified badges, safety always visible
โ™ฟ
Accessible
Large tap targets, high contrast, readable on low-end Android
๐Ÿ“
Uganda-first
Map + landmark hybrid, +256 default, UGX currency, MoMo-first
๐Ÿ›ก๏ธ
Safety-first
SOS button always visible in-trip, share trip, safety AI prompts

System Architecture

Microservices + event-driven platform optimized for low connectivity and MoMo-first payments in Uganda.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  CLIENT LAYER                                                                   โ”‚
โ”‚  Passenger App (Flutter)  ยท  Driver App (Flutter)  ยท  Admin Web (React)        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚  HTTPS / WebSocket (TLS 1.3)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  API GATEWAY  (Kong / AWS API Gateway)                                          โ”‚
โ”‚  WAF ยท Rate Limiter ยท JWT Validation ยท RBAC scope check ยท Request routing       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚          โ”‚          โ”‚           โ”‚            โ”‚            โ”‚
      โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚  Auth  โ”‚ โ”‚  Trip   โ”‚ โ”‚Dispatch โ”‚ โ”‚ Pricing  โ”‚ โ”‚ Payment   โ”‚ โ”‚  Safety   โ”‚
      โ”‚  KYC   โ”‚ โ”‚ Service โ”‚ โ”‚Service  โ”‚ โ”‚ Service  โ”‚ โ”‚ Service   โ”‚ โ”‚  Fraud    โ”‚
      โ”‚Service โ”‚ โ”‚  FSM    โ”‚ โ”‚Matching โ”‚ โ”‚ AI Fare  โ”‚ โ”‚ MoMo/Cash โ”‚ โ”‚ Service   โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚          โ”‚          โ”‚           โ”‚            โ”‚            โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                             โ”‚
                            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                            โ”‚   Apache Kafka (Event Bus)          โ”‚
                            โ”‚   Topics: trip.* ยท payment.* ยท     โ”‚
                            โ”‚   driver.* ยท fraud.* ยท safety.*    โ”‚
                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                             โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”
   โ”‚ PostgreSQL โ”‚ โ”‚   Redis    โ”‚ โ”‚  ClickHouse    โ”‚ โ”‚ Object Store  โ”‚ โ”‚  Elastic  โ”‚
   โ”‚ Primary DB โ”‚ โ”‚Cache+Queue โ”‚ โ”‚ OLAP Analytics โ”‚ โ”‚ Receipts/KYC  โ”‚ โ”‚  Search   โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Microservices
๐Ÿ”‘
Auth / KYC Service
Identity ยท Access ยท Verification
Handles OTP-based login (+256), JWT issuance, refresh token rotation, and driver KYC document review workflow. RBAC scopes: passenger, driver, ops, fraud_analyst, finance, superadmin.
JWT RS256 OTP via Africa's Talking Redis OTP TTL KYC docs โ†’ S3
๐Ÿ—บ๏ธ
Trip Service
Lifecycle FSM ยท Audit ยท GPS Polyline
Owns the trip lifecycle finite state machine: REQUESTED โ†’ SEARCHING โ†’ MATCHED โ†’ ARRIVING โ†’ IN_PROGRESS โ†’ COMPLETED / CANCELLED. Records full GPS polyline in PostGIS for dispute resolution and safety audit.
PostgreSQL + PostGIS FSM validation Kafka trip.* events Driver PIN
๐Ÿ“ก
Dispatch Service
Matching ยท Fairness ยท WebSocket Offers
Smart driver matching using Haversine nearest-driver + fairness rotation (equal trip distribution per zone). Delivers offers via WebSocket with 12โ€“15 s countdown. Auto-retries with expanded radius if no accept.
Haversine geospatial Fairness rotation Redis offer locks WebSocket push
๐Ÿ’ฐ
Pricing Service
Explainable AI Fare ยท Surge ยท Fuel
Computes transparent upfront fares: Fare = (base + distร—k_d + timeร—k_t) ร— surge + fuel_adj โˆ’ promo. Surge capped at 1.8ร— (Uganda policy). Fuel index from NITA-U API weekly. All components returned to client for display.
Explainable formula Demand from ClickHouse NITA-U fuel API Quote token (Redis)
๐Ÿ’ณ
Payment Service
MoMo ยท Airtel ยท Wallet Ledger ยท Disbursement
Unified payment layer wrapping MTN MoMo Collection API, Airtel Money API, and internal wallet (append-only ledger). Idempotency keys prevent double-charge. Daily bulk driver disbursement via MoMo Bulk API at 23:00.
MTN MoMo API Airtel Money API Idempotency keys Append-only ledger
๐Ÿ›ก๏ธ
Safety & Fraud Services
SOS ยท Anomaly Detection ยท Rules + ML
Safety: monitors trip via Kafka position events, detects detours/stops, triggers SOS pipeline (FCM + SMS + Police). Fraud: hybrid rules engine (instant) + XGBoost ML model (async) for GPS spoof, cancel abuse, promo abuse, device reuse.
Dedicated SLA queue XGBoost model Device fingerprint Kafka stream analytics
Core Database Schema (PostgreSQL)
users Auth Service
iduuidPK
msisdn_hashvarchar(64)hashed
roleenumpassenger/driver/admin
kyc_statusenumpending/approved/rejected
created_attimestamptz
trips Trip Service
iduuidPK
passenger_iduuidFKโ†’users
driver_iduuidFKโ†’users
statusenumFSM state
pickup_geomgeometry(Point)
dropoff_geomgeometry(Point)
route_polylinegeometry(LineString)
fare_ugxinteger
service_typeenumboda/car/delivery
payment_transactions Payment Service
iduuidPK
trip_iduuidFKโ†’trips
amount_ugxinteger
methodenummtn_momo/airtel/wallet/cash
statusenumpending/completed/failed
idempotency_keyvarchar(64)unique
momo_refvarchar(64)operator ref
fraud_alerts Fraud Service
iduuidPK
trip_iduuidFKโ†’trips
subject_iduuidFKโ†’users
fraud_typeenumgps_spoof/cancel_abuse/โ€ฆ
ml_scorefloat40.0โ€“1.0
severityenumlow/medium/high/critical
statusenumopen/actioned/dismissed
AI / ML Modules
๐Ÿ“Š
Dynamic Pricing Engine
Explainable ยท Capped ยท Transparent
  • Demand score: ClickHouse aggregation of trip density per H3 hex zone every 5 min
  • Traffic score: Google Maps Distance Matrix API (travel time vs free-flow)
  • Surge = clamp(1 + ฮฑร—demand + ฮฒร—traffic, 1.0, 1.8) โ€” hard cap for Uganda fairness
  • Fuel adjustment: weekly NITA-U fuel index diff, bounded ยฑ15%
  • All components returned to client โ€” passengers see exactly why fare is X
๐ŸŽฏ
Smart Matching Algorithm
Proximity ยท Fairness ยท Preference
  • Phase 1: Haversine nearest available driver within 5 km radius
  • Phase 2: Fairness rotation weight โ€” drivers with fewer trips in zone get priority
  • Phase 3: Driver preference model โ€” learns accepted/declined route patterns per driver
  • Anti-bias: no demographic signals used in matching โ€” only geo + performance data
  • Offer timeout retry: expand radius by 1 km, retry up to 3 times
๐Ÿšจ
Fraud Detection System
Rules Engine + XGBoost ML
  • Rules (instant): GPS speed > 100 km/h jump, payment before trip start, cancel-after-accept pattern
  • ML model (async ~500ms): XGBoost trained on labeled fraud events, F1 score > 0.91
  • Features: speed variance, route deviation, device fingerprint, payment timing, cancellation history
  • Weekly retraining on newly labeled cases via MLflow-tracked pipeline
  • False positive SLA: < 5% โ€” protected by human review before account freeze
๐Ÿ”ฎ
Demand Prediction & Safety AI
Hotspot Forecasting ยท Anomaly Detection
  • Demand: time-series model (Prophet + zone features) predicts hotspots 30 min ahead
  • Driver positioning hints: top 3 demand zones shown on driver home screen
  • Safety AI: monitors trip via Kafka stream, flags stalls > 5 min off-route
  • Night-hour escalation: anomaly sensitivity increased 21:00โ€“05:00
  • Zone risk scoring: trip anomaly density + incident reports โ†’ hourly ClickHouse update
Tech Stack Rationale
๐Ÿ“ฑ Flutter (Mobile Apps)
Single codebase for Android + iOS. Compiles to native ARM โ€” fast on low-end devices. Riverpod for reactive state. Flutter Background Service for trip tracking when app is backgrounded. Works well on Android 8+ (dominant in Uganda).
โš™๏ธ Java Spring Boot (Backend)
Production-proven for high-throughput APIs. Spring WebFlux for reactive WebSocket streams (driver positions). Spring Security for JWT + RBAC. Large talent pool in East Africa. Docker + Kubernetes for horizontal scaling.
๐Ÿ“Š PostgreSQL + PostGIS + ClickHouse
PostgreSQL: ACID-safe ledger for payments and trips. PostGIS: native geospatial queries for driver matching and route storage. ClickHouse: columnar OLAP for analytics KPIs and ML features โ€” avoids PostgreSQL OLTP pressure.
๐Ÿ”ฅ Kafka + Redis
Kafka: event bus decouples microservices โ€” trip events fan-out to Safety, Fraud, Analytics without tight coupling. Redis: low-latency driver presence, OTP storage, offer locks, session cache. Both managed (Confluent Cloud + Redis Cloud) to reduce ops overhead.

MVP Roadmap โ€” 6 Sprints

Sprint 1

Platform foundation, OTP auth (+256), app shells, observability

P0 ยท Foundation

Sprint 2

Ride request, nearest-driver dispatch, real-time WebSocket tracking

P0 ยท Core Flow

Sprint 3

MTN MoMo + Airtel Money, wallet/ledger, SOS + share trip, KYC review

P0 ยท Payments & Safety

Sprint 4

Dynamic pricing engine, fare transparency breakdown, fairness-aware matching, earnings dashboard

P1 ยท Intelligence

Sprint 5

Fraud rules engine, dispute management workflow, masked calling, reliability hardening

P1 ยท Trust

Sprint 6

Offline-lite queue, USSD/SMS fallback, multi-city config framework, go-live runbook

P0 ยท Scale

Sprint Issue Backlog

IDSprintEpicTitleTypePriority
S1-01S1EPIC-07Bootstrap backend microservices monorepobackendP0
S1-02S1EPIC-01OTP authentication + JWT sessionssecurityP0
S1-04S1EPIC-01Client app shell (Flutter) with OTP loginmobileP0
S2-01S2EPIC-02Ride quote + request endpointbackendP0
S2-02S2EPIC-02Nearest-driver dispatch engineAIP0
S2-04S2EPIC-02Client booking + trip tracking screensmobileP0
S3-01S3EPIC-04MTN MoMo integrationbackendP0
S3-05S3EPIC-05SOS + share trip featuresecurityP0
S4-01S4EPIC-03Dynamic pricing engine v1AIP0
S5-01S5EPIC-05Fraud rules engine (real-time)securityP0
S5-03S5EPIC-05Dispute management workflowadminP0
S6-03S6EPIC-08Offline-lite queue + USSD/SMS fallbackmobileP0