Transmission 001 · 2025-09-01

Fikalo — logistics and real estate for East Africa

A monorepo running logistics in Kampala and real estate in Mogadishu. One Supabase project, PostGIS geofencing, PesaPal payments.

What it does

Fikalo runs logistics and real estate across Kampala and Mogadishu from one codebase. A user in Kampala sees delivery and ride-hailing. A user in Mogadishu sees property listings. The app switches context based on GPS coordinates.

Stack

  • Monorepo: Turborepo
  • Web + Admin: Next.js 15 (App Router), two separate apps
  • Mobile: Expo (React Native), iOS and Android
  • Backend: Supabase — PostgreSQL with PostGIS, Auth, Storage, Realtime
  • Payments: PesaPal v3 for mobile money (M-Pesa, Airtel Money)

How geofencing works

The entire platform routes through one PostGIS query:

ST_Contains(region.polygon_boundary, ST_Point(user.lng, user.lat))

Kampala returns ['logistics']. Mogadishu returns ['real-estate']. The frontend loads the matching module set. No feature flags. No manual config. GPS determines everything.

What shipped

PhaseScopeStatus
Consumer funnelVendor menus, cart, checkout, property detail screensDone
Post-purchaseOrder tracking, real-time driver location via Supabase RealtimeDone
OperationalVendor dashboard, driver dashboard, walletDone

Every screen subscribes to postgres_changes channels. When a driver accepts an order, the customer screen updates within ~200ms over the Realtime websocket.

Where things broke

PesaPal payments. The PesaPal Python SDK does not have a TypeScript equivalent. I rewrote the token caching logic as Next.js Server Actions, replacing Python’s in-memory dicts with Upstash Redis for multi-instance deployments.

JavaScript floats break money math. 0.1 + 0.2 = 0.30000000000000004. Every currency calculation uses decimal.js.

Mobile payment routing. Mobile apps cannot embed API secret keys. The Expo app sends its Supabase Bearer token to /api/payments/checkout on the Next.js web server. The server validates the JWT, creates the order row with RLS, calls PesaPal, and returns the redirect URL. An extra network hop, but the keys stay on the server.

What remains

  • PesaPal production wiring (currently sandbox only)
  • M-Pesa and Airtel withdrawal API integration
  • Reverse geocoding for delivery address input
  • Push notifications via Expo Push for order alerts
  • Driver onboarding flow (document upload, vehicle verification)

Fikalo is the foundation. Nasez and Hubal share its Supabase project.

← Back to Transmissions