Ahmed Hany / Work / Mehrab Alquran
Mehrab Alquran
CTO · Cutting realtime infra cost by going self-hosted
- Users
- 10,000+
- Realtime
- ~500k min/mo
- Infra cost
- −70–90%
- Uptime
- 99.5–99.9%
[ Context ]
Mehrab Alquran is a realtime Quran tutoring product — live one-on-one sessions between students and teachers. Flutter clients ship to the App Store, Google Play, the Microsoft Store, and the web from a single codebase, alongside a Next.js marketing site at mehrab-alquran.com.
I started as a contributor in 2025 and took over as CTO in January 2026, building the engineering side up from near-zero. Today the app serves 10,000+ active users and roughly half a million realtime minutes a month.
[ The problem ]
By late 2025 the product had proven itself, but the economics hadn't. Agora billed per minute used, and at ~500k realtime minutes a month the bill was climbing faster than revenue. Continuing on managed meant pricing the product out of reach for its core audience, or raising capital purely to pay a vendor.
So I led the move to a self-hosted LiveKit cluster — and rebuilt the orchestration layer around it.
[ Architecture ]
- Clients: Flutter (iOS, Android, Windows, Web) from a single codebase.
- Marketing site: Next.js at mehrab-alquran.com.
- API: Node.js services for auth, session orchestration, persistence, and token minting.
- Realtime: self-hosted LiveKit cluster handling WebRTC media.
- Recovery: the Node.js layer brokers room creation and handles reconnection when a client or edge node drops, so sessions survive flaky mobile networks without user intervention.
[ What I owned ]
- Architected and rolled out the self-hosted LiveKit infrastructure end-to-end.
- Built the Node.js session orchestration layer on top of it.
- Shipped and maintained the Flutter clients across the App Store, Google Play, the Microsoft Store, and the web.
- Owned production reliability, observability, and on-call response.
- Set the engineering direction as the product scaled past 10,000 users.
[ Results ]
- ~70–90% reduction in realtime infra cost versus managed Agora — turning a runaway bill into a sustainable line item.
- ~500,000 realtime minutes / month served on the self-hosted cluster, and growing.
- 10,000+ active users across iOS, Android, Windows, and the web.
- 99.5–99.9% uptime on the self-hosted stack since cutover.