(Case study)

Shop Hub.

Django e-commerce platform - developed by Derek Muriuki using Python and Django.

May 2025Python · Django · Bootstrap · JavaScriptPersonal project
ShopHub shop page with category and brand filters and product grid

The
idea

ShopHub is a full online store built with Django: a product catalogue customers can browse and filter, accounts, a cart and wishlist, checkout and order history - and an admin side for managing products, stock, promotions and orders.

I built it to work through everything a real shop needs beyond a product grid - product variants, stock alerts, reviews, flash sales and payments that work for Kenyan customers through M-Pesa.

View on GitHub

What it
does

Authentication

Registration, login and profile management with django-allauth.

Product Management

Categories, brands, image galleries, attributes and variants, inventory tracking and back-in-stock notifications.

Browse & Compare

Search, filtering and sorting, side-by-side product comparison and recently viewed products.

Cart & Wishlist

Session-backed cart with live price updates, and a wishlist for saving products.

Orders & Payments

Checkout, order history and status tracking, M-Pesa STK Push payments, and an experimental cryptocurrency checkout.

Reviews & Promotions

Star-rated reviews with photos and helpfulness votes, plus flash sales with countdown timers.

How it's
made

Backend

  • Python with Django 5.2
  • Separate apps for the store, cart, wishlist, orders, accounts and M-Pesa
  • django-allauth authentication and django-crispy-forms
  • Customised Django admin for products, stock, flash sales and order processing

Payments

  • Safaricom Daraja M-Pesa STK Push, with status queries and payment callbacks stored per transaction
  • Experimental Bitcoin / Monero checkout using live exchange rates

Frontend & data

  • Django templates with Bootstrap 5 and JavaScript
  • AJAX for the cart, comparison, variants and review votes
  • SQLite in development, PostgreSQL-ready; Dockerfile included

Try it
locally

  • Clone github.com/dee-mee/Shophub
  • Install the dependencies from pyproject.toml
  • Run python run.py - it applies migrations, collects static files and starts the server on port 5000
  • Create an admin with python manage.py createsuperuser and add products at /admin/

Let's buildsomething.

Start a project →