East Africa · Developer Infrastructure

The Nairobi
Stack

The engineering guide for building software products in East Africa — M-Pesa, USSD, Africa's Talking, regulatory landscape, mobile-first UX.

Read the guides GitHub →

Engineering guides

Everything you weren't
told at the workshop.

📱
M-Pesa Integration
Daraja v3 STK Push, C2B, B2C, webhooks. Sandbox to production. Common failure modes and how to handle them.
📟
USSD Patterns
Building for *384#. Session management, menu design, Africa's Talking USSD vs. aggregator USSD. Serving users without smartphones.
💬
SMS Infrastructure
Africa's Talking SMS at scale. Shortcodes, sender IDs, delivery receipts, bilingual templates, basic phone considerations.
⚖️
Regulatory Landscape
CBK, CA, CAK, ODPC. What you need to know before you deploy a fintech or communications product in Kenya.
🖐️
Mobile-First UX
Designing for Kenya's device reality. 44px tap targets, 16px body font, single-column, low-bandwidth. What "mobile-first" actually means here.
🤝
Chama Digitisation
The technical architecture of Kenya's rotating savings groups. M-Pesa integration, member management, loan tracking, trust models.

The ecosystem

Tools that use
the stack.

mpesa-mcp
MCP server for M-Pesa Daraja & Africa's Talking. STK Push, SMS, airtime for AI agents.
Python package
mpesa-python
Production Python SDK for Safaricom Daraja v3. Zero magic, full type coverage.
Python package
kenya-sms
Africa's Talking SMS wrapper. Bilingual EN/SW templates, delivery receipts.
Python package
daraja-mock
Local M-Pesa test server. No sandbox registration required.
Python package
WapiMaji
Water stress alerts to Kenyan farmers via SMS. Africa's Talking integration.
Live app
Hela
Chama manager with M-Pesa receipt tracking and Google Sheets persistence.
Live app
Jumuia
Parish platform with M-Pesa giving and USSD access for basic phones.
Live app
chama-api
FastAPI REST service for chama management. CRUD endpoints, in-memory + Supabase backends.
REST API
Jibu
Civic rights AI in English and Kiswahili. Grounded in Constitution 2010, Employment Act, Land Act 2012.
Live app
Mafuriko
Urban flood intelligence. Incident maps, policy enforcement gaps, action briefs for county governments.
Live app
Hesabu
County budget absorption tracker. Controller of Budget FY2022/23. Identifies unspent development funds.
Live app

Why this exists

The missing
documentation.

Safaricom has documentation. Africa's Talking has documentation. The CA has documentation. But nobody has the documentation for what happens when you try to use all of them together in a real product serving real Kenyans on real phones.

The Nairobi Stack is built from the gaps — the things you only learn after a production incident, a CA letter, or a support ticket that says "your USSD session expired after 30 seconds."

It is companion documentation to a portfolio of 12 deployed tools built by a Kenyan diaspora engineer who was tired of re-solving the same infrastructure problems.

gabrielmahia.github.io →

Jibu — Know Your Rights Kenya →

13 Deployed applications using this stack
47 Kenyan counties served by at least one tool
6 Engineering guides — M-Pesa, USSD, SMS, mobile UX, regulatory, chama
8 Open source developer packages on GitHub