Completed Web Application

ThreeBie Order Engine — Multi-Retailer Grocery Basket Optimiser (MVP)

One basket, priced across every shop that delivers to your postcode — including the split that's cheaper than any single store.

ThreeBie Order Engine — Multi-Retailer Grocery Basket Optimiser (MVP)
01 — THE PROBLEM

Grocery shopping online means the same basket costs different amounts at different retailers, and the cheapest total isn't the cheapest shop. Delivery fees change the answer — a store that's £4 cheaper on goods but charges £6 to deliver is a worse deal — and splitting a basket across two shops can beat either one alone, but only if the second delivery fee doesn't eat the saving. Nobody works that out by hand across a dozen retailers. The comparison is also harder than it looks: the same product has a different name at every shop, so before you can compare prices you have to decide which items are actually the same item, and postcode determines which retailers are even available.

02 — OUR SOLUTION

A Django platform built around a combinatorial basket optimiser. The catalogue merges products across retailers per postcode, with fuzzy string matching identifying equivalent items across differing product names. When a shopper checks out, the engine generates shop combinations — single shops and pairs — and prices the whole basket against each, adding delivery cost per shop involved, then returns three answers rather than one: Your Choice, honouring the exact products the shopper picked; Our Choice, substituting closest-match equivalents where they're cheaper; and Super Saver, the lowest total achievable across any combination. The engine will not recommend a split that costs more than the shopper's own selection, and each option carries its substitutions so the trade-off is visible rather than silently applied. Behind it sits an analytics layer built specifically to learn from the decisions shoppers make: every cart addition, tracked user action, and — most usefully — every product swap is recorded with both the original and substituted item and which option the shopper chose. That's the data that tells the business which substitutions people actually accept.

Outcome

A working comparison and checkout platform that answers a question shoppers can't answer themselves — the genuinely cheapest way to buy a specific basket, including cross-shop splits and delivery costs. Postcode-scoped catalogues, similar-product matching, three ranked options with visible substitutions, Stripe checkout, and an instrumentation layer that captures which recommendations get taken. Containerised with Docker Compose behind Nginx, with catalogue combination results cached so the optimiser stays responsive as the shop list grows.

Key features

  • Combinatorial basket optimisation across single shops and shop pairs
  • Delivery cost factored into every comparison, not added afterwards
  • Three ranked results — exact selection, cheaper substitutions, and lowest achievable total
  • Guaranteed never to recommend a split that costs more than the shopper's own picks
  • Fuzzy product matching to identify equivalent items across differing retailer names
  • Postcode-scoped catalogues, so only retailers that actually deliver are compared
  • Similar-product suggestions per item
  • Swap tracking recording original item, substitute, and the shopper's choice
  • Cart and user action analytics with Mixpanel integration
  • Anonymous carts keyed by IP, carried through to registered accounts
  • Stripe payment integration
  • Average-basket and delivery-threshold calculations
  • Memcached-backed caching of shop combinations
  • Dockerised deployment with Nginx

Tech stack

Django 4.1 MySQL pandas NumPy SQLAlchemy FuzzyWuzzy Stripe SendGrid Mixpanel django-analytical Memcached Docker Compose Nginx WhiteNoise

Build something similar?

Tell us about your project. We'll share how we'd approach it.

Start a project