Ahmed AlsaidyProduct & Systems Engineer
← All projects
Multi-role delivery platform
LiveClient System

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
Mandobi official web platform and multi-role delivery ecosystem
Mandobi official web platform and multi-role delivery ecosystem Click to expand ⤢

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

L1

Mobile & PWA Surfaces

Customer, courier & store experiences

  • Flutter App (Android / iOS)
  • React + TypeScript PWA (Workbox)
  • Live Map (flutter_map / Leaflet)
  • Apple & Phone Auth
L2

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
L3

Supabase Backend & Push Engine

Database, RPC workflows & FCM dispatch

  • 25 SQL Migrations + RLS
  • 12 Deno Edge Functions
  • Idempotent Order & Rating RPCs
  • FCM Notification Router
Tech Stack — Technologies used:
  • Flutter
  • Dart
  • Supabase
  • PostgreSQL
  • Row Level Security
  • Edge Functions (Deno)
  • Firebase Messaging
  • React
  • Vite
  • TypeScript
  • PWA / Workbox
  • Codemagic

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

01

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

02

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

03

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)

supabase/migrations/20260714204000_atomic_admin_payment_review.sql · SQL
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; $$;

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

Next project TEMM Workspace → Multi-Agent Developer Workspace

Technical Evaluation · GCC / Remote / Egypt

Building an operational system, rescuing an AI cloud stack, or hiring a Product Engineer on retainer?

Complete the 30-second scope qualifier so our first conversation goes directly into system architecture, milestones, and budget fit.