From a PHP monolith to 12+ federated GraphQL subgraphs. Load times cut by 50%, ~10 MENA payment providers connected, and video links that expire and trace back to the account.
// request path
01 Client
02 Apollo Gateway
03 12+ subgraphs
04 Entitlement cache
05 Signed CDN
The problem
A growing streaming service on an ageing PHP stack, with traffic spikes around new releases and families across the region who pay in very different ways.
What I did
Helped re-architect the backend into GraphQL Federation: an Apollo Gateway composing 12+ NestJS subgraphs in an Nx monorepo, each owning its database, with JWT verification at the gateway.
Served the hottest catalog endpoints as pre-rendered static JSON, bypassing the framework and database so the platform stayed stable under spikes.
Designed a sharded, denormalized entitlement cache so subscription checks on every play skip the main database; added per-country geo-gating via Cloudflare edge headers.
Integrated ~10 MENA payment providers (cards, cash codes, carrier billing, Google/Apple/Huawei IAP) with IP allowlisting, SHA-512 HMAC webhooks and reconciliation jobs.
Built secure video delivery with per-request signed, expiring CDN URLs and user-traceable tokens.
The result
50% faster load times
Contributed to a 10% rise in subscription revenue
~10 payment providers on one platform
Technology
NestJS
GraphQL Federation
Apollo Gateway
Nx
PostgreSQL / Prisma
MongoDB
Google Pub/Sub
Cloudflare
svc/io · listening
Looking for a senior engineer who ships reliable, AI-native systems?
Open to full-time, part-time or contract, in Dubai or remote. The terminal below is live: type a command.
visitor@mk.core: ~/contact
❯ whoami
Mohammad Kabalan · Senior Software Engineer · Dubai, UAE