Back to Projects
Commerce · Payments · Multi-tenant

Mybizna — Commerce Platform for Small Businesses in Kenya

Mybizna — Commerce Platform for Small Businesses in Kenya

Overview

A multi-tenant commerce platform for small businesses. A seller gets a website on their own domain, takes orders and bookings, and in Kenya is paid to M-Pesa or a bank. Sellers in any open country take orders over WhatsApp; online payments abroad are not built yet. I am the only engineer. Live at mybizna.com and on both app stores.

Problem

One deployment serves every seller, so a query that forgets its shop leaks another business's data. The same code moves real money, and a wrong ledger row is a seller not paid. Both had to be safe to ship daily, by one person.

Solution

Tenancy is enforced by the runtime, not remembered by the author: the verified shop enters a request context, a Mongoose guard refuses any query naming another shop, and a CI ratchet blocks new unscoped queries. Money is append-only, then reconciled: settlements polled and matched to sales, payouts verified against Paystack. Every rule has a check in CI whose count can only fall.

Impact

3,043 commits and 554 reviewed pull requests shipped in 65 days. About 10,000 automated tests. 130+ deploys, each logged with how to verify it. A 135-finding security review with every finding tracked to a status. The seller app live on the App Store and Google Play.

What was built

  • Tenant guard plus CI ratchet: 193 unscoped query sites across 37 models in September, falling since
  • Eleven architecture checks in CI. A pull request can lower a count, never raise it
  • Append-only ledger, reconciled against Paystack settlements and payouts
  • Request ids end to end, health checks, graceful shutdown, Prometheus metrics
  • Sellers' own domains through Cloudflare for SaaS; delivery priced by road distance from a self-hosted router
  • One gateway for every model call: Claude first, OpenAI fallback, a budget per prompt
  • A country seam: currency, clock, phone rule and tax labels come from the shop's country through one helper per client, and a CI check fails when Kenya is written anywhere else

Technologies Used

TypeScript Express · Mongoose Next.js 16 Flutter MongoDB Paystack · M-Pesa Cloudflare Railway Claude · OpenAI

Let's Talk Engineering.

Always happy to trade notes on AI, ML, and distributed systems, or to talk through any of the work shown here. Reach out anytime.

enockmecheo@nyu.edu