Ma-bei: compare grocery prices across Kenya
Collect supermarket prices into a consistent history, then make comparisons useful to shoppers.

The challenge
Supermarket product listings use different names, formats and price conventions. Comparing a basket across stores requires collecting those listings regularly and keeping products, prices and sale information organised.
What we built
- Separate scrapers for Naivas, Carrefour and Greenspoon, with CSV import for manually collected prices.
- Small scheduled collection batches designed to fit serverless runtime limits.
- A PostgreSQL data model that records product, store, price, sale flag, source and last-checked time.
- A public interface for comparing products and basket costs, including mixed-store baskets.
Design choices
Store-specific collection logic keeps source quirks isolated. A shared product and price structure supports comparisons, while timestamps and source fields make freshness visible and help investigate unexpected values.
What this demonstrates
A complete path from source collection to a user-facing product, including the practical need to handle changing pages and incomplete source coverage. This is a live public product; availability and collected prices can change.

