01 / Social super-app platform
VillageSquare
An African social super-app — feed, short video, live streams, audio rooms, communities, classifieds, creator payouts and meetings — and the platform underneath it.
- Role
- Head of Engineering · platform lead
- Status
- In production
- Period
- 2024 — now
- Type
- Social super-app platform
- commits to the core API — top contributor
- 1,877
- deployables on EKS
- 10+
- realtime delivery at peak
- <90ms
- production incidents after the split
- −55%
A / Architecture
Modular-monolith core, polyglot services, on Kubernetes
A NestJS core with around forty domain modules — ledger, wallet, livestream, meetings, marketplace, search — surrounded by services that need to scale on their own terms: Elixir for realtime, Go for media and the AI agent, Python for recommendations and transcoding. Every piece is containerised, Helm-deployed to EKS and scales on load or queue depth.
00 Clients
- Android · Kotlin
- iOS
- Web · Next.js
- Admin · Next.js + passkeys
- Meetings · LiveKit
01 Edge
- CDN
- Edge worker · signed media
- Ingress · TLS
- Media SFU · RTMP
02 Services
- Core API · NestJS, modular
- Admin API · NestJS
- Realtime · Elixir/Phoenix
- Media server · Go
- AI meeting agent · Go
- Recommender · FastAPI
- Transcoder · Python + FFmpeg
03 Async
- Queues + DLQs
- BullMQ
- Pub/sub
- Media egress → HLS
- Managed transcoding
04 Data
- PostgreSQL
- Redis
- Elasticsearch
- Object storage
- Analytics exports
Before
A Laravel monolith on MySQL — one deploy, one failure domain, media processed in the request path.
After
A modular NestJS core on Aurora PostgreSQL plus independently scaled Elixir, Go and Python services, Helm-deployed on EKS with Karpenter and KEDA.
WHY · Teams needed to ship without waiting on each other and failures needed a smaller blast radius. Production incidents fell 55%, API response times improved 45%, realtime delivery went from 400ms to under 90ms.
Engineering notes
- 01
An AI that attends the meeting
A Go bot joins LiveKit rooms as a real participant: speech-to-text, Claude streaming, text-to-speech spoken sentence by sentence, with 700ms barge-in, timekeeping, latecomer check-ins and notes. Redis locks keep exactly one bot per meeting across pods. In production since October 2026.
- 02
Live media, end to end
A Go media server orchestrates LiveKit and SRS; egress lands as HLS on Cloudflare R2 behind CloudFront, with signed playback from a Cloudflare Worker. Audio-room replays are trimmed to the exact recorded timeline using EXT-X-PROGRAM-DATE-TIME.
- 03
Personalisation, end to end
Built the foundation that carries ranking all the way to users: request and impression logging, cursor-based feed sessions, per-environment queues with dead-letter handling, Parquet exports, no-repeat windows, erasure and retention.
- 04
Money inside a social app
In-app currency on a double-entry-style ledger across Apple, Google, Paystack and Flutterwave. I led the wallet’s design review before rollout, focused on idempotency, payout correctness and verified webhooks.
- 05
Fast under load
Monolith to services, MySQL to Postgres, Redis in the hot paths. Online index builds coordinated across pods, N+1 elimination module by module, and probabilistic counting for unique viewers.
- 06
Security as a routine
Recurring security reviews of the API and admin, worked through to production. Least-privilege identities per environment, presigned uploads, signed playback and layered prompt-injection defences on AI features.
- 07
Realtime on the BEAM
An Elixir/Phoenix service owns live rooms: Presence — a CRDT — tracks who is on stage, Redis sorted sets track the crowd, and the design holds 100k+ passive viewers in a single room.
- 08
Infrastructure that sizes itself
Karpenter adds nodes, the API scales on load and transcoders scale on queue depth. Images are promoted from dev to production by exact digest, with short-lived cloud credentials through GitHub OIDC.
B / Infrastructure & delivery
How it ships, scales and stays up.
- Cloud
- AWS — EKS, Aurora PostgreSQL Serverless, SQS, S3, MediaConvert, CloudFront and ECR — with Cloudflare at the edge for media delivery.
- Orchestration
- Helm charts with schema-validated values; Karpenter node provisioning; horizontal autoscaling on load and KEDA autoscaling on queue depth; disruption budgets, network policies, cert-manager and External Secrets.
- CI/CD
- GitHub Actions: build, push to ECR with immutable tags, Helm-deploy to dev, then promote the exact dev-verified digest to production. Helm lint, deployment-contract and restricted-runtime checks; GitHub OIDC for short-lived AWS credentials; Trivy and gitleaks as reusable security gates.
- Observability
- OpenTelemetry traces and logs over OTLP in every service, Prometheus ServiceMonitors, an eBPF auto-instrumentation DaemonSet, Jaeger, Sentry with profiling, JSON logs carrying trace ids, Bull Board for queues.
- Access
- Least-privilege workload identities per environment; HMAC between services; WebAuthn passkeys for admins; presigned uploads and signed media URLs.
- Data
- Serializable transactions and advisory locks around money; query and transaction timeouts; online index builds coordinated across pods; probabilistic counting for unique viewers; snapshots before releases.
- Testing
- Hundreds of API specs with Jest, ExUnit on realtime, property-based tests in Go, pytest with Hypothesis on the recommender.
- Operations
- Own incident response end to end — find the root cause, fix it, then add the guardrail that stops it recurring.