Skip to content

Live, tnt.canadeal.ca

T&T Supermarket Price Tracker

Daily price history for about 12,500 T&T Supermarket products across 2 stores and 3 languages, so you can see whether a price is actually good.

products tracked daily
~12,500products tracked daily
fewer requests with a two-phase crawl
~95%fewer requests with a two-phase crawl
fewer database writes
~80%fewer database writes
per full crawl combination
< 5 minper full crawl combination
tnt.canadeal.ca
T&T price tracker showing today's biggest price drops
Biggest price drops today, computed from the accumulated price history.

The problem

Grocery pricing has almost no transparency. ~12,500 T&T products across 2 stores and 3 languages with no way to track how prices actually move over time.

What I built

A Node.js crawler on a daily crontab + Docker Compose schedule. Two-phase crawl pipeline (bulk category listing, then detail fetch only for items with options) reduces unnecessary requests by ~95%. Polite rate-limiting with p-limit, random jitter, and exponential back-off keeps full runs under 5 minutes per combination. MongoDB price-history sub-documents append only on price change, cutting write volume by ~80%. Replaced Elasticsearch with Meilisearch to eliminate hardcoded-credential risk while keeping multi-language full-text search.

Manual work it replaces

Manual price-checking and the guesswork of "is this actually a good price?" — replaced with a history that accumulates on its own, every day.

What I learned

A race condition was serving empty API responses because of a delete-then-insert pattern; fixed with idempotent bulk upserts. Even a fairly simple system becomes powerful once data accumulates continuously — the value isn't in any single reading, it's in the history.

Built with

  • Next.js
  • Node.js
  • MongoDB
  • Meilisearch
  • Docker
  • Nginx

Live at tnt.canadeal.ca.