The Press
Field NotesIssue 001 · The Launch Issue

The African Developer's Production Stack: Building for Load Shedding, 3G, and PayFast

Every architecture decision I make gets tested against one question: will this work at 3am during Stage 6 load shedding on a R99/month data bundle? Here's the stack that passes.

Nandawula Regine19 March 20267 min read

# The African Developer's Production Stack

There is a version of this article where I list Next.js, Vercel, Supabase, and TypeScript and tell you to use what the Silicon Valley ecosystem recommends. That would be helpful and also incomplete.

Building for Africa requires every decision to pass an additional filter: will this work at 3am during Stage 6 load shedding, on a consumer-grade UPS, accessed by a customer on a Vodacom R99 data bundle?

Here is the stack that passes.

Frontend: Next.js 14 App Router + PWA

Next.js App Router gives me Server Components, which means the heavy work happens on the server. The client gets HTML. Less JavaScript bundle. Faster first paint on 3G.

Progressive Web Apps: VarsityOS is fully installable. It works offline. When a student at 2am loses connectivity, their last-synced study plan is still accessible. PWA isn't a nice-to-have in markets where connectivity is unreliable. It's a product feature.

TypeScript strict mode: every repo. Not negotiable. When you're building multi-tenant architecture where a bug in one tenant's data could affect another's, type safety is infrastructure.

Backend: Supabase with Multi-Tenant RLS

Supabase gives me PostgreSQL with Row Level Security. For multi-tenant applications (AdminOS, JarvisOS, VarsityOS) RLS means I write tenant isolation as database policy rather than application code. The policy enforces at the database level:

CREATE POLICY "tenant_isolation" ON messages
  FOR ALL USING (tenant_id = auth.jwt() -> 'tenant_id');

Every query, by every user, is automatically scoped to their tenant. You cannot accidentally return another tenant's data. This is the security model that belongs in production.

Supabase Realtime for live dashboards without polling. AdminOS's inbox updates in real-time as WhatsApp messages arrive. No websocket server to manage. No polling interval to tune.

Payments: PayFast for ZAR

Every cent my applications handle is ZAR. PayFast is South Africa's payment infrastructure: it's what my users have credit cards set up with, what their banks recognize, what their NSFAS-adjacent allowances can reach.

The integration is custom. I built a universal PayFast hub at creativelynanda.co.za/api/payfast/universal-notify that routes ITN webhooks to 6 different applications from a single PayFast merchant account. One merchant account. Six live apps. Clean payment flows across all of them.

AI: Claude API with Model Routing

Claude Sonnet for reasoning-heavy tasks: strategic decisions, complex analysis, long-form generation. Claude Haiku for fast tasks: classification, short responses, notifications.

Prompt caching on all static system blocks. 85% cost reduction. Non-negotiable.

Inngest for async AI jobs. When an AI task might take 30 seconds, you don't block the request: you queue it and notify. Vercel's function timeout is not your friend for AI workloads. Inngest is.

Resilience: Upstash Redis

Message deduplication: WhatsApp sends duplicate webhooks. Redis prevents processing the same message twice.

Rate limiting: Arcjet middleware protects all API routes. No unbounded API calls.

Job retries: Failed AI calls retry with exponential backoff via Inngest + Redis state.

Signal protocol: In JarvisOS, wings communicate via Redis pub/sub. State that needs to cross service boundaries stays in Redis, not in request contexts.

Deployment: Vercel

Vercel cron jobs for scheduled tasks (AdminOS debt recovery, daily briefs). Edge middleware for rate limiting, auth checks. Instant deployments. Automatic preview URLs.

The Vercel free tier gets you surprisingly far. The paid tier is worth it when you have cron jobs and multiple projects.

What I Tell Every Developer Building for Africa

Assume intermittent connectivity. Design for offline-first. Cache aggressively.

Don't over-engineer. Three similar lines of code is better than a premature abstraction.

Test on a budget Android device. Not just in Chrome DevTools responsive mode. A real R2000 Android on 3G.

Build payment flows that fail gracefully. PayFast ITN webhooks arrive asynchronously. Your UI should update from webhooks, not from optimistic state.

The continent's developers are building the continent's infrastructure. Build it to last.

What part of your stack breaks when the power goes out?

Colophon

Imprint
Field Notes
Issue
Issue 001, April 2026
Published
19 March 2026
Length
645 words
Drafts on file
None yet
Set in
Cormorant Garamond & DM Sans

Published by The House of Roses Press, KuGompo City.

2 views

Reader Insights

0 responses

No insights yet. Be the first!