Case study
PoupeX: where does a whole basket cost less?
PoupeX reads Portuguese supermarket prices every day, matches the same product across stores, and shows where your shopping costs less. I built it and I run it.
- My role
- Owner: product, architecture, code, infrastructure and operations
- Built with
- Go, Nuxt, TypeScript, PostgreSQL, Redis, Terraform
- Runs on
- Railway, managed with Terraform
- Started
- May 2026, through Kickoff Works

- products with a current price
- 127,337
- supermarket chains read every day
- 12
- before an unconfirmed price leaves the comparison
- 48 h
From the PoupeX about page, 15 November 2026. The catalogue changes daily.
The problem
Portuguese supermarkets each publish prices on their own sites, with their own pack sizes, promotions and loyalty-card prices. Checking one product is easy.
Working out where a whole weekly shop costs less, or whether it's worth splitting it between two stores, means comparing dozens of products across a dozen sites. That's the question PoupeX answers.
Constraints
Every store is different
Some prices can only be read through a real browser. Names differ too, so the same item is matched by barcode, or by brand, pack size and quantity.
Old prices mislead
A price that isn't seen again within 48 hours leaves the comparison and stays in the history.
Heavy writes, mostly reads
Ingestion writes a lot for part of the day. The rest of the time the site only reads, so it shouldn't need an always-on catalogue database.
Things restart
Workers crash and deploys roll. A half-finished run must never leave half-published prices.
Architecture
Three paths that share data but run on their own schedules: collecting prices, publishing them, and serving them to visitors.
Collect
Every dayScheduler Go
Queues a run for each store.
Job queue Postgres
Decision 1Versioned jobs with leases and heartbeats.
Workers Go
Read stores, clean data, match products.
Decision 4Browser service
Only reaches allowed sites.
Catalogue database Postgres
Decision 2Prices, products and matches. Can sleep when idle.
Publish
After each successful runCatalogue database Postgres
The source of truth.
Snapshot build Go
Decision 3Compressed product batches and search indexes.
Read model Redis
Decision 3A manifest switches to the new generation once it's complete.
Serve
Every requestSite and apps Nuxt
Pages plus a backend-for-frontend. ChatGPT connects through its own service.
Private API Go
Decision 3Serves public catalogue reads from Redis only.
App database Postgres
Decision 2Accounts, lists and alerts. Small and always on.
Decisions
A job queue in Postgres, not calls between services
Every ingestion stage, from reading a store to matching products, is a versioned job in one Postgres table. Go workers claim a job with a lease and a heartbeat, and their writes are fenced by that claim, so a worker that stalls can't overwrite newer work. This replaced HTTP calls from the ingestion runtime into the web app.
Why: Retries and crash recovery come from one place, and every run leaves a record of what happened.
Two databases, split by lifecycle
Catalogue data (prices, products, matches) lives in a Postgres database that can sleep between runs. Accounts, lists and alerts live in a small one that stays on. Nothing joins across them: a saved list keeps a product's ID and a snapshot of what it needs to show.
Why: User data stays relational and safe, and the large database only runs when there's work for it.
Publish the catalogue whole, serve it from Redis
After a successful run, the pipeline writes compressed product batches and search indexes to Redis, then switches a manifest to the new generation. Public catalogue reads come from Redis only.
Why: Visitors see the old catalogue or the new one, never a mix, and browsing doesn't wake the catalogue database.
Treat the edges as untrusted
The browser service only reaches allowed destinations on public addresses. Output from the AI shopping assistant is treated as untrusted input, and anything it saves needs authorisation and review.
Why: Scraping and AI are where outside input enters the system, so that's where the checks sit.
What's live
- Product search and whole-basket comparison, in one store or split between two
- A monthly basket of 20 everyday products, compared store by store
- Price history and price alerts
- Fuel prices station by station, from DGEG, and trip costs
- Rents, house prices and utility tariffs, from INE, ERSE and ERSAR
- Bill splitting at dividir.poupex.pt, with receipt reading
- Mobile apps, a browser extension for Chrome, Edge and Safari, and a ChatGPT app
As listed on poupex.pt, 15 November 2026.


Need something like this built, or untangled?
I take on a few projects at a time through Kickoff Works: cloud platforms, .NET and web products, and technical leadership.