All projects
FoneXpress logo
Full-Stack · Multi-Panel E-Commerce

FoneXpress

An electronics e-commerce platform for the Kenyan market.

A production e-commerce platform for smartphones and electronics in Kenya — one Node/Express + MongoDB backend powering a customer storefront plus admin, store-operations and franchise dashboards, with real-time M-Pesa payments, multi-courier delivery and multi-warehouse inventory.

Year
2025 – 2026
Role
Full-stack — storefront, multi-panel dashboards, API & third-party integrations
ReactViteNode.jsExpressMongoDBSocket.ioM-PesaStripeTailwind CSSBootstrapLeafletJWT

Overview

FoneXpress is a live e-commerce platform selling smartphones, tablets and feature phones across Kenya, with 0% EMI financing through KCB Bank. It's a single Node/Express + MongoDB backend that serves four separate React front-ends — the customer storefront, an admin dashboard, a store-operations panel and a franchise portal — each with its own auth scope and feature set. Behind it sits a full retail engine: real-time M-Pesa payments, automated courier dispatch, and inventory tracked across warehouses and physical stores.

4

panels: store, admin, store-ops & franchise

4

payment methods incl. M-Pesa & Stripe

61

MongoDB data models

Real-time

M-Pesa status over WebSockets

The challenge

Selling electronics in Kenya means meeting customers where they actually pay and receive goods: M-Pesa is the dominant rail, deliveries split between same-day city couriers and upcountry logistics, and stock lives across a central warehouse and franchise stores rather than one tidy inventory. On top of that, the business needed not just a storefront but the back-office to run it — catalog, orders, inventory, refunds and support — across head office, individual stores and franchise partners, all from one system.

What I built

  • A React 19 + Vite storefront with product discovery, variants, cart, wishlist, loyalty points, coupons and free-accessory rules — plus i18next internationalization and Leaflet-based delivery-zone and store maps.
  • Real-time M-Pesa (Daraja) STK Push checkout that streams payment status to the customer over Socket.io instead of polling, with automatic B2C refunds on cancellation and a built-in Daraja callback simulator for safe local testing.
  • Three Bootstrap/SASS back-office panels — admin, store and franchise — for catalog, orders, analytics (Recharts), inventory and CMS, built on Formik + Yup forms, data tables and a Jodit rich-text editor.
  • Automated multi-courier delivery: LittleCab for same-day local drops and Fargo for upcountry shipping, created fire-and-forget so an order never blocks on a third-party API, with webhook-driven tracking syncing order status.
  • Multi-location inventory across warehouses and stores with Goods-Received Notes, inter-location stock transfers and customer/store pullbacks — backed by 61 Mongoose models spanning the full retail domain.
  • A hardened Express API: JWT for staff and sessions for customers, Helmet, CORS, Mongo-sanitize, HPP and rate limiting, Sharp-processed secure uploads, PDFKit invoices, Nodemailer transactional email and Swagger-documented routes.

Architecture

One backend, four front-ends

A single Node/Express + MongoDB API serves the customer storefront and the admin, store and franchise dashboards as independent React SPAs. Each panel gets its own session cookie and auth scope, so the same API exposes different feature sets by role without four separate services.

Real-time M-Pesa payments

Checkout fires an M-Pesa Daraja STK Push and pushes the result to the browser over Socket.io the moment Safaricom's webhook lands — no polling. Cancellations trigger automatic B2C refunds, and a local callback simulator reproduces success/timeout/failure flows without a Kenyan SIM.

Resilient multi-courier delivery

Orders auto-create deliveries with LittleCab (same-day, local) or Fargo (upcountry) as fire-and-forget jobs, so a slow or failing courier API never blocks checkout. Partner webhooks then drive order-status updates, and every failure is logged for admin review.

Multi-location inventory

Stock is tracked per warehouse and per store rather than as one pool, with Goods-Received Notes for intake, approval-gated transfers between locations, and pullback flows for returns — giving head office, stores and franchises an accurate, real-time view.

Outcome

A live, full-scale retail platform at fonexpress.co.ke — not a demo storefront but the operational backbone for a Kenyan electronics business, handling real payments, deliveries and multi-location stock across customer, admin, store and franchise teams from one codebase.

More work