Mandobi
A delivery app published on Google Play for customers, couriers and partner stores with a web admin dashboard: instant delivery and custom shopping orders, live map tracking, commission accounting and push notifications
- Role
- Brand identity + full-stack engineering
- Timeline
- 2025 – 2026
- Platforms
- Android · iOS · Web
- Google Play
- published on Google Play
- 3 أدوار
- customer, courier & store
- خرائط حية
- route & courier tracking
- لوحة إدارة
- orders & payouts dashboard
Overview
Business problem & context
Local delivery requires real-time coordination across customer, courier and store while bounding multi-order courier capacity, calculating fixed commissions and net earnings, and reviewing payment proofs atomically
System Architecture
System layers & components
A Flutter mobile app (Android & iOS via Codemagic), a React/TypeScript/Workbox PWA and a dedicated React/Leaflet admin console backed by Supabase/PostgreSQL, 12 Edge Functions and authenticated FCM push dispatch
Mobile & PWA Surfaces
Customer, courier & store experiences
- Flutter App (Android / iOS)
- React + TypeScript PWA (Workbox)
- Live Map (flutter_map / Leaflet)
- Apple & Phone Auth
Admin Operations Console
Desktop web console for dispatch & financial review
- mandobi-admin (React + Vite)
- Driver Capacity & Bulk Activation
- Atomic Payment Request Review
- Excel Reporting Export
Supabase Backend & Push Engine
Database, RPC workflows & FCM dispatch
- 25 SQL Migrations + RLS
- 12 Deno Edge Functions
- Idempotent Order & Rating RPCs
- FCM Notification Router
Data Model
Database schema & core tables
Schema supporting both individual orders and batched guaranteed trips alongside wallets, payment proofs and atomic admin reviews
| Table | Role in the system |
|---|---|
profiles / drivers | User profiles, driver approval state & concurrent order capacity |
orders / rejection_queue | Orders, delivery fee, fixed commission & driver net earnings |
guaranteed_trip_routes / batches | Guaranteed trip routes and multi-order batches |
transactions / promotions | Wallet ledger, payment proofs and promo campaigns |
Implementation
Key technical decisions
Database-enforced multi-order courier capacity
Rather than relying on client checks when assigning a new order to an active courier, database constraints and RPCs enforce concurrent-order capacity under race conditions
Atomic payment-request review
Approving a payment proof from the admin console updates request state, credits the wallet and writes the ledger entry inside a single atomic transaction
Idempotent FCM push routing
Consolidated order and chat notifications through authenticated Edge Functions into Firebase Cloud Messaging with idempotency guards against duplicate dispatches
Security
Security & access control
- Reduced public RPC surface and restricted order-flow function execution to authorised roles
- Hardened profile creation and role/wallet routing so clients cannot self-escalate privileges
- Built-in account deletion request workflow compliant with Google Play and App Store policies
Code Highlight
Atomic payment review pattern (PL/pgSQL)
CREATE OR REPLACE FUNCTION public.review_payment_request(
p_request_id uuid,
p_decision text,
p_note text DEFAULT NULL
) RETURNS void
LANGUAGE plpgsql SECURITY DEFINER SET search_path = public AS $$
BEGIN
IF NOT public.is_admin(auth.uid()) THEN
RAISE EXCEPTION 'forbidden: admin role required';
END IF;
-- Lock row to prevent concurrent double-crediting
PERFORM 1 FROM public.payment_requests WHERE id = p_request_id AND status = 'pending' FOR UPDATE;
-- Update status + credit wallet + append transaction in one transaction
END; $$; Product Screens
System screenshots
Mobile app screens
Brand & product illustrations
Summary
Outcome & status
Published on Google Play (`com.mandobi.app` — v1.0.45+63) with a Codemagic iOS release pipeline and a web operations console