
02 · Marketplace ecosystem
MaliGo
A Tanzanian marketplace for new and used products.
- Category
- Marketplace ecosystem
- Role
- Product design & full-stack engineering
- Built by
- Empire Pro Dev
- Links
- Live product


Screens
MaliGo interface
Overview
A marketplace ecosystem for Tanzania that connects buyers and sellers of new and used products, with administration, commerce workflows, analytics, and infrastructure designed to scale.
Product areas
- Buyers
- Sellers
- New & used listings
- Commerce workflows
- Administration
- Analytics
- Authentication
Technologies
- Next.js
- TypeScript
- Tailwind CSS
- Prisma
- Supabase
- PostgreSQL
- Upstash Redis
- Cloudflare R2
Case study
From problem to product
The complete engineering lifecycle behind MaliGo.
- 01
Problem
Buyers and sellers of new and used products need an organised, trustworthy place to meet, with clear listings, simple workflows, and administration that keeps the marketplace healthy.
- Buyers struggle to tell new stock from used goods, or to trust sellers they don't know
- Sellers need a simple way to list, price and get paid
- A marketplace without moderation fills up with bad listings
- 02
Idea
MaliGo: one marketplace ecosystem for Tanzania that brings buyers, sellers and administrators onto a single connected platform.
- Separate New and Used marketplaces under one account
- A commission added on top of the seller's price, so sellers keep exactly what they ask
- Verified sellers, moderated listings and buyer protection
- 03
Approach
I built MaliGo as a modular monolith: one deployable application with strict layers, so business rules never live inside a page or a route handler.
- Route handler, then application service, then repository, then database
- Every subsystem degrades on its own; without a database it runs on a bundled demo catalogue
- Money rules written and tested before the screens that use them
- 04
Architecture
Separate experiences for buyers, sellers and administrators sit on top of shared services for listings, commerce workflows, authentication and analytics.
- One wrapper on every API route for rate limiting, sessions, role checks and input validation
- PostgreSQL as the source of truth, Redis as a cache and cloud storage for media
- Server-side role checks in both workspaces and every API route
System architecture
3 layers · 10 modules
L01Experiences
3 modules- Buyer marketplace
- Seller workspace
- Admin console
L02Services
4 modules- Listings & catalogue
- Commerce workflows
- Authentication & roles
- Analytics
L03Data & edge
3 modules- PostgreSQL · Supabase
- Redis cache
- Cloudflare R2 media
Conceptual architecture: layers and their responsibilities. - 05
Design
MaliGo follows the layout shoppers already know from large marketplaces, rebuilt mobile-first on design tokens with light and dark themes.
- Product cards in four variants from one data shape: grid, rail, list and mini
- Sign-in as a modal, so a buyer never loses their place mid-cart
- Filters, sorting and pagination kept in the URL, so every results page can be shared
- 06
Development
The code is strict TypeScript throughout, built around one pricing rule: commission is added to the seller's price, never taken from it.
- Money stored as whole numbers in the smallest currency unit, never as floating point
- Checkout re-prices every item on the server and reserves stock in a single transaction
- Order lines keep snapshots of price and commission, so later rule changes never rewrite history
- Seller and admin workspaces with dashboards, moderation, settlements and an audit log
- 07
Data
Analytics are part of the product scope from the start. Marketplace activity is treated as a source of insight, not an afterthought.
- Commission rules resolved from seller, to category, to marketplace type
- Seller analytics and admin dashboards built on real order data
- Product structured data that marks each listing as new or used for search engines
- 08
Testing
Automated tests cover the rules where a mistake would cost money or trust.
- Commission maths and rule resolution
- Webhook signature verification and password hashing
- The Redis-outage fallback, and rate limits that fail closed
- Input validation and search query parsing
- 09
Deployment
MaliGo is deployed on Vercel, with PostgreSQL on Supabase, Upstash Redis and Cloudflare storage, each switched on independently through environment configuration.
- Live at maligo-market.vercel.app
- Type-checking, linting, tests and a production build run before every release
- Caching falls back to the database if Redis is unreachable, so the marketplace stays up
- 10
Result & current state
The buyer marketplace, checkout, notifications and both workspaces are built and live. Messaging, disputes, delivery tracking and email and SMS notifications come next.
- Built: marketplace, search and filters, cart, checkout, orders, favourites, and the seller and admin workspaces
- Next: buyer-to-seller messaging, reviews written from the buyer side, and delivery tracking
What building it taught.
Challenges
- Keeping prices honest when commission rules can change at any time
- Two buyers racing for the last unit of stock
- A payment provider calling back more than once for the same payment
Solutions
- Immutable price and commission snapshots on every order line
- A conditional stock reservation inside one transaction, so only one buyer can succeed
- Each webhook event stored under a unique key before anything else runs, so a replay changes nothing
Lessons
- Never let the browser send a price; derive it on the server every time
- Decide deliberately which failures should fail open and which must fail closed
- Snapshots are cheaper than explaining why an old order changed





