A. Functional Architecture

  • Domain-Driven Design: Independent microservices mapped to entities like User, Plan, Top-Up, Coupon, and Notification.

  • Client-Side UI Pattern: Angular-based front-end with lightweight presentation layer for responsiveness.

  • Subscription Core: Services for managing plans, top-ups, renewals, cancellations, payments, and white labeling.

  • Gateways & Brokers: Kong API Gateway with HTTP header-based CORS. RabbitMQ considered but REST preferred for simplicity.

  • SSO & Credential Management: Services integrated with remittance platform for seamless partner login flows.

  • Entities Layer: Templates for Plans, Top-ups, Coupons, and Notification dynamically instantiated per tenant.

B. Non-Functional Architecture

  • DevOps Tooling: Recommendations made for Docker (Container), Jenkins (CI/CD), ELK (Logging), and Dropwizard/Prometheus (Metrics).

  • Security: Bespoke session tokening using cookies; OAuth2 and Keycloak evaluated but not adopted.

  • Rate Limiting & Tracing: Kong-based throttling and distributed tracing options (Zipkin, Google Dapper) considered.

  • Scalability:

    • High-volume services (e.g., Payments, Subscription Lifecycle) horizontally and vertically scaled.

    • Low-volume services (e.g., User Service, Credential Mgmt) deployed on lightweight virtual servers.

  • Fault Tolerance: Retry/circuit breaker logic embedded into gateway layer with clear failure routing and fallback paths.