KARIM
Mobile | Backend

Z-Laundry System

Enterprise-grade on-demand laundry platform — 3 mobile apps, admin dashboard, payment processing, geospatial delivery zones, and real-time analytics serving thousands of customers across 5 years of continuous development.

Role
Mobile Developer → Backend Developer → Team Lead
Timeline
2021 – Present (5+ years)
Status
Production — Active Development
FlutterLaravelMySQLFirebaseSanctumPaymobCloudflare R2Queue Jobs

The Problem

What needed to be solved

The platform started as a basic ordering app, but as the business scaled, every department needed software — operations needed delivery optimization, finance needed real-time analytics, quality teams needed inspection workflows, and marketing needed customer segmentation. The backend had to evolve from simple CRUD into a production system handling complex order pipelines, multi-provider coordination, and thousands of concurrent customers — all without downtime.

What I Built

My technical contributions

1

Scalable Service Architecture

Designed 72 dedicated service classes following single-responsibility principles — separating order creation, status management, pricing calculations, and query logic into focused modules. This enabled parallel feature development and reduced regression risk across a 100K+ LOC codebase.

2

Event-Driven Order Pipeline

Built an event-driven order lifecycle with 10+ states (created → assigned → picked → processed → delivered), supporting order splitting, partial deliveries, returns, and hard-cancel logic with provider capacity validation — all tracked with immutable activity logs.

3

Geospatial Delivery System

Implemented polygon-based zone matching using MySQL spatial functions for delivery coverage validation, automatic customer zone assignment, and area-split migrations — enabling the business to expand to new regions without code changes.

4

Performance & Caching Strategy

Introduced tag-based cache invalidation, eliminated N+1 queries with eager loading, built denormalized analytics snapshot tables for instant dashboard loads, and implemented server-side DataTables pagination for datasets of 2,800+ records.

5

Scalable Notification Engine

Architected a queue-based notification system using batch jobs (100 customers per batch with staggered dispatch) supporting Firebase push, Telegram alerts, scheduled delivery, per-customer delivery tracking, and retry logic with exponential backoff — processing 3,000+ notifications in under 8 minutes.

6

Full Codebase Refactor (2025–2026)

Led a large-scale refactor spanning 99+ files with +129K lines added and -45K lines removed — restructuring the entire backend architecture, modularizing inline assets, adding API documentation, implementing area-split logic, and improving customer filtering. The result: a cleaner, scalable codebase ready for team growth.

System Architecture

How it's built

Client Apps
Customer App (Flutter)Delivery Man App (Flutter)Provider App (Flutter)Admin Dashboard (Blade)
API Gateway
RESTful APIsLaravel Sanctum AuthRate LimitingAPI Versioning
Service Layer
Order Pipeline (10+ states)Payment ProcessingNotification EngineGeospatial ZonesAnalytics & ReportsQuality Control
Data Layer
MySQL (114 Models)Database CacheSoft DeletesActivity LogsDenormalized Analytics
Infrastructure
Queue WorkersFirebase FCMPaymob GatewayCloudflare R2Telegram Bot
114
Database Models
72
Service Classes
110+
API Endpoints
3K+
Batch Notifications
Architecture Patterns

Service Layer Pattern

72 dedicated service classes with single-responsibility, enabling parallel feature development

Event-Driven Architecture

Order lifecycle events trigger notifications, analytics snapshots, and cross-module updates

Queue-Based Processing

Batch notification jobs processing 3,000+ customers with staggered dispatch and retry logic

Repository Pattern

Data access abstraction with Eloquent scopes and query builders for complex filtering

Observer Pattern

Model observers for lifecycle hooks — auto-creating analytics snapshots on order changes

Strategy Pattern

Different calculation strategies for pricing by context (dimensions, weight, flat rate)

Scope of Work

Key features delivered

Multi-app ecosystem (Customer, Delivery, Provider)
Order state machine with 10+ lifecycle stages
Paymob payment gateway with tokenization & refunds
Geospatial polygon zone matching for delivery coverage
Queue-based batch notifications (Firebase + Telegram)
Multi-role analytics dashboards (Executive, Finance, Operations)
Quality control inspection workflows with photo evidence
Customer segmentation & targeted promo campaigns
Provider price comparison & cost analytics
Order splitting & partial delivery support
Promo code engine with abuse prevention
Multi-language support (English / Arabic)
Cloudflare R2 image storage integration
Immutable activity logging & audit trail

Visual Proof

App screenshots

Results & Impact

What it achieved

12.4K+
Git Commits
114
Database Models
261
Migrations Shipped
72
Service Classes