Home / Blog / Case Study

Case Study · E-commerce

Building a 5-Branch Supermarket E-commerce Platform in Tanzania: M-Pesa, Map Delivery & WhatsApp Dispatch

By Shiraz Goraya · Published July 3, 2026 · 9 min read · Platform: jambosupermarket.online (live)

In short: I built a complete e-commerce platform for Jambo Supermarket, a 5-branch chain in Dar es Salaam — with a live M-Pesa payment flow, map-pin delivery that calculates charges by distance, a loyalty card program with automated emails, and one-tap WhatsApp dispatch to delivery riders. It runs on React + Supabase + Cloudflare for about $25/month in infrastructure. This case study covers what was built, why each decision was made, and what it costs to build something similar.

Most e-commerce case studies are written by agencies who handed over a website and left. This one is different: I'm the branch manager of the supermarket chain this platform was built for. I process its orders, answer its customers, and dispatch its riders. When something doesn't work, I'm the first person it hurts.

That changes how you build. Here's the full story.

Why does a Tanzanian supermarket chain need its own e-commerce platform?

Jambo Supermarket operates five branches across Dar es Salaam: Mikocheni, Bahari Beach, Masaki, Bunju, and SalaSala. Our customers were already ordering online — just badly. They'd WhatsApp a photo of a shopping list, a staff member would walk the aisles collecting items, then a long back-and-forth about totals, delivery charges, and payment would follow. Every order consumed 20–30 minutes of staff time before a single item left the store.

Marketplace platforms weren't the answer either: commissions eat grocery margins, they control the customer relationship, and none of them handle a multi-branch operation where each store has its own catalog and delivery zone.

So the requirements were clear from day one — written by someone who would personally live with the consequences:

How does the platform handle payments in East Africa?

Card payment gateways are the default answer everywhere else. In Tanzania, they're the wrong answer: card penetration is low, but nearly every adult carries mobile money. The platform runs a live M-Pesa payment flow, with cash on delivery as the fallback — matching how customers actually behave rather than how a Western e-commerce template assumes they behave.

This single decision matters more than any design choice on the site. An online store in East Africa that only accepts cards is a store with a locked front door.

How do you price delivery without arguments?

Delivery charges were the biggest source of friction in the old WhatsApp-ordering days. Too high and the customer cancels; too low and the store eats the cost; negotiate and you burn staff time on every single order.

The platform's answer: at checkout, the customer drops a pin on a map. The system measures the distance from the selected branch and applies a distance-based delivery charge automatically. The customer sees the exact total before confirming. No calls, no negotiation, no surprises — and no staff time spent.

What happens after an order is placed?

This is where most e-commerce builds stop and real operations begin. An order that sits unseen in an admin panel is a cancelled order. The flow we run:

  1. The order lands in the branch's admin panel with its map pin, items, and payment status.
  2. Staff pick and pack the order.
  3. The dispatcher presses one button — WhatsApp rider dispatch — and the rider instantly receives the order details and delivery location on WhatsApp, the app already open on every rider's phone.

No rider app to install, no rider training, no printed slips. We built the system around the tool riders already use, instead of forcing a new tool on them.

How does a 3-tier admin panel keep 5 branches under control?

Multi-branch retail has a permissions problem: the owner must see everything, but a branch manager should only touch their own branch. The platform uses three role tiers:

One detail I'm particularly proud of: the owner account is protected at the database level. A database trigger makes it impossible to delete or demote the owner — even by someone with admin panel access, even by a mistake in the database console. In a business, software security that depends on everyone clicking carefully is not security.

What about customer loyalty?

The platform includes a loyalty card program with automated email delivery — a customer signs up, and the system generates and emails their card automatically (built on Resend with a serverless function). Retail margins are thin; repeat customers are the business. Making loyalty enrollment zero-effort for staff was the requirement, and automation was the answer.

What's the technology stack — and what does it cost to run?

The platform is built on React (Vite) + Supabase (Postgres) + Cloudflare Pages. The reasoning:

Platform facts — jambosupermarket.online

Branches served5
Admin role tiers3 (owner / assistant / branch manager)
PaymentsM-Pesa (live) + cash on delivery
Delivery pricingAutomatic, map-pin distance-based
Rider dispatchOne-tap WhatsApp
Infrastructure cost~$25 / month
StatusLive in production

One war story worth sharing: mid-project, the site became unreachable for many local customers — Tanzanian ISPs were silently blocking the hosting provider's default subdomains. Diagnosing an invisible, ISP-level block and solving it (custom domain with a corrected DNS setup) is exactly the kind of problem you only learn deploying in Africa, not deploying for Africa from somewhere else. If your developer has never dealt with this, their first production incident will be on your project.

What did we learn building it?

Frequently asked questions

How much does a supermarket e-commerce website cost in Tanzania?

A production-grade platform like this one — storefront, admin panel, M-Pesa payments, delivery logic — starts from around $2,500 USD as a one-time build, with infrastructure around $25/month. Cheap site builders cost less upfront but can't handle multi-branch catalogs, mobile-money flows, or delivery pricing. See full pricing here.

Can an e-commerce website accept M-Pesa payments?

Yes — this platform runs an M-Pesa flow in production, alongside cash on delivery. In East Africa, mobile money support isn't optional; it's the difference between a store customers can use and one they can't.

How long does a build like this take?

A standard scope takes 4–6 weeks: storefront and catalog first, then payments and delivery logic, then admin roles and dispatch. You get a working preview link early and test the real system as it's built.

Does this only work for supermarkets?

No — the same architecture fits pharmacies, hardware stores, butcheries, electronics shops, and any retail business with physical branches and local delivery. The branch scoping, payments, and dispatch patterns are identical.

Who built this platform?

I did — Shiraz Goraya. I'm the branch manager of this supermarket chain and I build retail software professionally. My other production platform, RetailOps Suite, delivered roughly 80% stock-loss reduction at the same business.

Want a platform like this for your retail business?

Storefront, payments, delivery, admin — deployed on your own domain, owned 100% by you. Fixed quote within 48 hours, from $2,500.

Discuss Your Project on WhatsApp →