The client needed a full-featured, scalable ride-hailing platform capable of managing the complete lifecycle of a taxi/ride-sharing business — from rider booking and real-time driver tracking to complex financial settlements across multiple stakeholders (individual drivers, fleet companies, and business partners). The platform had to support multi-language (Arabic/English), multi-region operations, multiple payment gateways, and real-time communication between all parties.
We designed a Clean Architecture with strict separation of concerns across 6 projects:
PaymentMethodFactory
├── CashPaymentMethod
├── CardPaymentMethod (Copy-and-Pay + IPN webhooks)
├── WalletPaymentMethod
├── STCPaymentMethod
└── BusinessCardMethod
┌──────────────────────┬───────────────────────────────────────────────────────┐ │ Pattern │ Usage │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Clean Architecture │ 6-project layered structure │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ CQRS │ Dual Read/Write database contexts │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Repository │ 88+ repository interfaces with implementations │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Strategy │ Payment methods, notification types, order processing │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Factory │ Notifications, order types │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Mediator (MediatR) │ Decoupled request/handler communication │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Dependency Injection │ Centralized IoC container │ ├──────────────────────┼───────────────────────────────────────────────────────┤ │ Middleware Pipeline │ Custom auth, rate limiting, security, language checks│ └──────────────────────┴───────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────┐ │ Metric │ Value │ ├─────────────────────┼────────────────┤ │ Total Commits │ 2,384 │ ├─────────────────────┼────────────────┤ │ Team Size │ 10+ developers │ ├─────────────────────┼────────────────┤ │ API Endpoints │ 109+ │ ├─────────────────────┼────────────────┤ │ Admin Modules │ 72 │ ├─────────────────────┼────────────────┤ │ Domain Entities │ 444 │ ├─────────────────────┼────────────────┤ │ Database Migrations │ 150+ │ ├─────────────────────┼────────────────┤ │ Admin Views │ 363 │ ├─────────────────────┼────────────────┤ │ Repositories │ 88+ │ ├─────────────────────┼────────────────┤ │ Business Services │ 50+ │ ├─────────────────────┼────────────────┤ │ NuGet Packages │ 40+ │ └─────────────────────┴────────────────┘
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ AWS S3 │ │ AWS SNS │ │ AWS CodeDeploy│
│ File Store │ │ Push Notif │ │ CI/CD Deploy │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
└───────────┬───────┴───────────────────┘
┌──────▼───────┐
│ .NET 7 App │
└──────┬───────┘
│
┌───────────┼───────────┐
│ │ │
┌──────▼──┐ ┌────▼────┐ ┌───▼──────┐
│PostgreSQL│ │Firestore│ │ Hangfire │
│Read/Write│ │Realtime │ │ Jobs DB │
└─────────┘ └─────────┘ └──────────┘