BudgetPlug KE
Quality Chinese imports delivered to your doorstep in Kenya.
2025
Overview
BudgetPlug KE was built to bridge the gap between Kenyan bulk importers and retail consumers. The platform lets shoppers browse Chinese wholesale goods, check out with M-Pesa in a single STK push, and track their order from placement to delivery. On the seller side, an admin dashboard provides real-time inventory control, order management, and payment reconciliation. The system is built for the realities of the Kenyan market — mobile-first, M-Pesa native, and capable of running in low-bandwidth conditions.
Our Role
Built the full platform end-to-end: database schema, Express.js REST API, M-Pesa Daraja integration, real-time Socket.io layer, Nuxt 4 storefront, admin dashboard, and PWA configuration.
Tech Stack
Key Features
M-Pesa STK Push Checkout
Customers pay using M-Pesa's STK push — they enter their phone number, receive a prompt on their phone, and confirm payment with their PIN. The system normalizes phone numbers (0700→254700), polls for payment confirmation, and updates order status automatically.
Real-time Inventory
Socket.io broadcasts stock changes to all connected admin users instantly. When a product sells out or stock is replenished, every open dashboard session updates without a page refresh — eliminating overselling.
Guest & Authenticated Checkout
Customers can complete purchases without creating an account using just their phone number. Registered users get order history, saved addresses, and a wishlist. Both flows share the same order management backend.
Admin Dashboard
A comprehensive back-office for managing products, orders, payments, and users. Includes sales analytics, payment status tracking, and stock alerts — built to let a small team run a high-volume catalogue.
Order Tracking
Every order has a lifecycle — placed, confirmed, packed, shipped, delivered. Customers receive real-time status updates via web push notifications. Admins move orders through stages from the dashboard.
Offline-Ready PWA
The storefront installs as a PWA with aggressive caching: API responses cached for one hour, product images cached for 30 days. Returning users see products immediately even before the network responds.
How It Was Built
The storefront is built with Nuxt 4 (Vue 3) using Nuxt UI for components and Pinia with persisted state for cart and session management. The backend is an Express.js API on Node.js connected to a MySQL database with structured tables for users, products, orders, and payments. M-Pesa payments flow through Safaricom's Daraja API: the backend initiates an STK push, receives a callback URL confirmation, and reconciles the payment against the pending order. Socket.io runs on the Express server and emits stock and order events to all connected clients. Product images are hosted and served from a static uploads directory with CORS headers. The PWA layer uses Vite PWA with NetworkFirst strategies for API calls and CacheFirst for images, ensuring fast repeat visits on slow Kenyan networks.
Highlights
- Native M-Pesa STK push — no card required, works on any Kenyan phone
- Real-time stock sync via Socket.io prevents overselling across concurrent sessions
- Guest checkout with phone number only — removes friction for new customers
- PWA with 30-day image cache and 1-hour API cache for low-bandwidth conditions
- Full order lifecycle from placement to delivery with push notification updates
- Rate-limited auth endpoints to protect against brute-force attacks