Ahmed AlsaidyProduct & Systems Engineer
← All projects
Multi-company logistics & shipping platform
LiveClient System

Wasla Express

An operations platform for Egyptian shipping companies covering parcel intake, branch hubs, courier run-sheets, proof of delivery, COD collection and merchant settlements across six role-based app variants

Role
Full-stack engineering & UI design
Timeline
2025 – 2026
Platforms
Android · iOS · Windows · Web · Server
6 تطبيقات
role-based app variants
باركود
AWB & parcel scanning
COD
cash collection & settlements
WhatsApp
automated status updates
Wasla Express live shipping and logistics platform
Wasla Express live shipping and logistics platform Click to expand ⤢

Overview

Business problem & context

Egyptian shipping carriers coordinate thousands of daily parcels across hubs, couriers and merchants. When operations rely on spreadsheets and manual WhatsApp threads, parcel state drifts, courier cash custody mixes with merchant balances and financial settlements stall

System Architecture

System layers & components

A single Flutter codebase compiles into six role-scoped variants (Full, Admin, Merchant, Customer, Courier, Employee) via dart-define flags and Android flavors, backed by a 230-migration Supabase/PostgreSQL core, 19 Edge Functions and a dedicated Node.js/Express WhatsApp automation server

Architecture diagram of Wasla Express 6-app logistics platform, RLS ledger, and WhatsApp serverARCHITECTURE BLUEPRINT · MULTI-COMPANY LOGISTICS6 APPS · 230 MIGRATIONS · COD LEDGERSINGLE FLUTTER CODEBASE · 6 COMPILE-TIME VARIANTS (ANDROID · iOS · WINDOWS · WEB)AdminWin / MobileMerchantBulk + AWBCourierQR + PODCustomerLive TrackBranch HubSort & ScanFull OpsRiverpodEDGE & PARTNER APIs19 Supabase Edge FunctionsE-Commerce Webhooks · Outbox Queue · Signed ReleasesREALTIME AUTOMATION SERVERNode.js / Express + WebSocketsAutomated WhatsApp Merchant Groups & Delivery AlertsPOSTGRESQL CORE · 230 MIGRATIONS · MULTI-COMPANY ROW LEVEL SECURITYshipments & immutable history · hub_transfers & runsheets · COD courier custody & merchant settlements · 155 test files
L1

Clients · Flutter (6 Variants)

Android, iOS, Windows & Web from one codebase

  • wasla_admin (Win/Mobile)
  • wasla_merchant (Win/Mobile)
  • wasla_courier
  • wasla_customer
  • wasla_employee
  • Riverpod + GoRouter
L2

Edge & Automation Services

Server workflows & real-time messaging

  • 19 Supabase Edge Functions
  • Outbox Notification Sender
  • wasla-whatsapp-server (Node/WS)
  • Ecommerce Webhooks & Partner API
L3

Data & Ledger Core · PostgreSQL

Multi-company RLS, hub transfers & COD ledger

  • 230 Declarative Migrations
  • Strict Row Level Security
  • RPCs (SECURITY DEFINER)
  • Signed Release Manifests (SHA-256)
Tech Stack — Technologies used:
  • Flutter
  • Dart
  • Riverpod
  • Supabase
  • PostgreSQL
  • Row Level Security
  • Edge Functions (Deno)
  • Node.js
  • Express
  • WebSockets
  • Docker
  • Railway
  • Codemagic

Data Model

Database schema & core tables

A multi-company relational schema linking the parcel lifecycle from AWB generation through hub sorting and courier runsheets down to COD cash collection and merchant settlement

Table Role in the system
shipments / shipment_items Parcel record, items, customer coordinates & COD amount
shipment_history Immutable audit trail for every status transition
hubs / hub_transfers Branches, warehouses and inter-hub dispatch manifests
runsheets / courier_location_events Courier delivery sheets and live GPS telemetry
financial_transactions Courier cash custody, merchant settlements & invoices
merchant_pricing_rules / awb_configs Per-merchant zone pricing rules and AWB print templates

Implementation

Key technical decisions

01

Single codebase, six apps via APP_VARIANT

Instead of maintaining five diverging repositories, `--dart-define=APP_VARIANT=...` and automated build scripts isolate package IDs, signing and entry routes per role while restricting Windows desktop builds to Admin and Merchant

02

Coupling delivery proof with financial settlement

Marking a parcel as delivered does not merely flip a status column; guarded RPCs atomically record courier cash custody and merchant receivable entries so balances never drift

03

Isolated WhatsApp server with rate limiting & session persistence

Offloaded WhatsApp group notifications into a standalone Node.js/Express service (`wasla-whatsapp-server`) with per-group token-bucket rate limiting and persistent session storage

04

SHA-256 signed release manifest center

Managed binary distribution through `wasla-app-releases` with `manifest.json` and `checksums.sha256` verified against a canonical release certificate

Security

Security & access control

  • Client apps ship with the publishable key only; zero service_role keys in client code, with all access enforced by PostgreSQL RLS
  • Sensitive mutations (settlements, role changes, runsheet handover) execute inside hardened RPC wrappers audited against RLS recursion
  • 155 test files, SQL benchmark suites and explicit foreign-key indexes across high-frequency operational tables

Code Highlight

Per-group rate limiter & queue guard in wasla-whatsapp-server

wasla-whatsapp-server/rateLimiter.js · JS
export class GroupRateLimiter {
  constructor({ windowMs = 60_000, maxPerGroup = 12 } = {}) {
    this.windowMs = windowMs;
    this.maxPerGroup = maxPerGroup;
    this.buckets = new Map();
  }
  allow(groupId, now = Date.now()) {
    const recent = (this.buckets.get(groupId) ?? []).filter((t) => now - t < this.windowMs);
    if (recent.length >= this.maxPerGroup) return { ok: false, retryAfterMs: this.windowMs - (now - recent[0]) };
    recent.push(now);
    this.buckets.set(groupId, recent);
    return { ok: true, remaining: this.maxPerGroup - recent.length };
  }
}

Summary

Outcome & status

Live in production at `wasla-system.site`, running the full shipping lifecycle across five mobile apps, two Windows desktop apps and the web portal on top of 230 versioned database migrations

Next project Warqa w Qalam → Connected storefront, POS & inventory

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.