Overview
Three Modern Apps, One Gateway, Single Source of Truth
The platform adopted a layered architecture where each PWA manages its own permissions, local data model, and caching strategies, while SQL Server remains the authoritative single source of truth for operational and accounting data.
Customer App
PWAEnd-to-end journey from booking to payment, featuring reliable real-time status tracking and transactional messaging.
- Phone number & OTP authentication
- Booking, tracking, and rescheduling
- Invoicing, receipts, and Paymob checkout
Technician App
Offline ReadyDevice-first field execution with clear state synchronization and conflict resolution mechanisms.
- Notes, photo capture, and measurements
- Spare parts reservation and usage tracking
- Customer e-signature & proof of completion
Workshop Portal
Web / PWAUnified workflow for intake, repair dispatch, stock management, and exception handling.
- Custody tracking & device health logs
- Technician queues & repair testing
- Parts issuance, returns, and replacements
Challenge & Solution
Integration Boundaries Protecting Legacy Business Logic
The enterprise operated on a legacy ERP embedded with deeply intricate business logic. The primary architectural challenge was to build modern interfaces on top of the existing infrastructure while refactoring core rules for optimal performance with new applications without interrupting daily legacy operations.
Additionally, field technician operations required seamless functionality in low or zero connectivity environments. This was achieved by architecting an Offline-first PWA paradigm, persisting data locally and syncing automatically once connectivity is restored.
Core Architectural Decision Decoupled command acceptance from processing execution. Mobile requests never block waiting on heavy legacy database transactions; commands can be safely retried idempotently without duplicating spare parts, invoices, or payments.
Offline-first PWA
Offline-First as a Core State, Not an Exception
The technician app was designed to operate seamlessly during connectivity outages. Every action is assigned a UUID and written to IndexedDB before network dispatch, queued until confirmed by an authoritative server response.
Purpose-Driven Storage Tiering
- Cache Storage — App shell, static assets, and UI components.
- IndexedDB — Tasks, work orders, spare parts catalog, drafts, and outbox mutations.
- Memory — Transient view states and non-persisted sensitive session data.
Independent & Re-entrant Sync
Data integrity does not rely solely on Background Sync; multi-factor verification occurs at the backend gateway to validate and commit incoming state events.
Minimizing On-Device Footprint
- Smaller cached projections
- Automated cleanup & expriy
- Device-bound session tokens
- Redacted payment details
Offline command envelope
{ "client_action_id": "60a9f923-7fac-4f70-84fe-2f6ea945ef1a", "aggregate_type": "work_order", "aggregate_id": "WO-18472", "operation": "record_part_usage", "expected_version": "0x000000000001A74B", "occurred_at": "2026-09-10T14:18:22Z", "payload": { "part_id": 381, "quantity": 1 } } Paymob + SMS Gateway
Replay-Safe & Auditable Workflow for Payments and Notifications
Payment initiation tokens are strictly generated backend-side based on validated invoice records; the client runtime is never trusted to pass final transaction amounts.
Client-side responses strictly handle interface feedback, while cryptographically signed Webhooks serve as the authoritative confirmation of payment processing.
- 1
Invoice Validation
Validates record ownership, pending balances, currency match, and payable status directly against SQL Server.
- 2
Local Attempt Initialization
Generates a unique Merchant Reference and Paymob Checkout Token.
- 3
Authoritative Webhook Processing
Verifies digital HMAC signatures, transaction amounts, and currencies, preventing duplicate processing via idempotency checks.
- 4
Ledger Settlement & Event Dispatch
Updates payment status, invoice settlement, and emits outbox events within a unified DB transaction.
Financial Integrity Rule A Late Failure Callback can never void a Captured Payment unless accompanied by an explicit, authenticated Refund or Reversal event.
Results
Modernizing Core Workflows Without High-Risk System Overhauls
-
Delivered a modern, fluid user experience for field technicians and workshop staff, modernizing business processes while tapping into legacy capabilities without risky complete rewrites.
-
Established a direct communication channel for end customers to request home appliance repairs, track real-time job progress, and inspect/pay repair invoices transparently.
-
Paved the way for incremental feature migration from the legacy ERP over time, mitigating operational risks tied to big-bang system replacements.
Phased rollout with rollback capability.
Reduction in invoice settlement time
Drop in Status Inquiry Support Calls
Customer Acquisition Cost (CAC) Reduction
Increase in Customer Lifetime Value (CLV)
Accept commands reliably, apply them idempotently, reconcile against the authoritative state, and make every state transition observable.
Client Testimonial
Muhammad translated our messy requirements into a clear architecture we could actually build. Performance is up, technical debt is down, and the team finally has a roadmap.
FAQ