Live, canadeal.ca
Canadeal — AI-Powered Deal Platform
An AI-powered deal platform that finds, verifies, translates and publishes deals for Canada's Chinese-speaking community, with no one in the loop.
- products processed
- 20,000+products processed
- new deals, fully automated
- ~110 / daynew deals, fully automated
- pipeline success, last 30 days
- 98.4%pipeline success, last 30 days
- pipeline stages, from scraping to auto-posting
- 6pipeline stages, from scraping to auto-posting

The problem
Finding good deals for Canada's Chinese-speaking community meant manually searching many scattered online sources, rewriting product descriptions in Chinese, deciding which deals were worth sharing and posting them across platforms by hand, every day. The real problem wasn't volume; it was that every step needed a human judgement call. The goal was to turn each of those judgement calls into a system: rules where rules are enough, AI where it adds something rules can't.
Watch the pipeline
A deal's journey, from a source post to the site, in under ten minutes.
An LLM turns each deal into strict, validated bilingual JSON; a batched LLM call scores what is worth posting; and same-brand, same-type deals from the same hour fold into one collection. Watch the deals change colour here, and some of them cluster into one.
Drag to rotate. Grey dots are raw deals; blue dots have been through the AI layer.
What I built
Designed and built the whole platform, from architecture to deployment, and run it in production. More than 20,000 live products move through a multi-stage pipeline that runs every ten minutes across two machines, with AI built into five live stages and a sixth in development.
- 1
LLM enrichment
Every deal is sent to an LLM with its product data and source listing, and comes back as strict JSON: category and subcategory, a natural Traditional Chinese title and summary, an English title, tags and feature bullets in both languages. The prompt carries explicit translation and tone rules ("natural, not AI-sounding"), and the output is parsed and validated before anything touches the database. A pluggable provider layer (OpenAI, Claude, DeepSeek, or any local OpenAI-compatible server) switches with one setting, so cost and quality can be traded per task.
- 2
AI curation
Choosing what to post is a two-stage design: a cheap deterministic score (discount, Bayesian-adjusted rating, popularity, price, freshness) pre-ranks candidates, then one batched LLM call scores the shortlist 0-100 with a confidence value and a duplicate flag. Scores go to an append-only history, never onto the product record, so every decision can be audited later.
- 3
AI-written social posts
Platform-specific copy for Facebook, Instagram Stories and Threads, with a hard rule: if the LLM fails, the post is skipped. There is no fallback to template copy, because a bad automated post costs more than a missing one.
- 4
AI articles with fact-checking
An article pipeline picks products worth writing about (same scoring engine, article-specific rubric), generates each section separately with retries, then a validator checks that every claim traces back to grounding data. A validator failure flags the article instead of letting it pass silently.
- 5
Deal grouping with a local model
When one batch from a single source floods the feed with dozens of near-identical products, same-brand, same-type deals that arrive within the same hour are folded into one collection card. Clustering is rule-based because it is fast and predictable. A self-hosted Qwen model (LM Studio on my own hardware) only writes the Traditional Chinese collection titles, and every title is cached so it is generated once. I chose that split after measuring the local 27B model: too slow to cluster hundreds of batches per run, cheap enough to name a few dozen groups.
- 6
Grocery flyers with a local vision model (in development, not public yet)
A weekly-flyer module collects grocery flyers from major Canadian chains. For stores that only publish their flyers as images, a self-hosted Qwen vision model reads them. The page is first cut into cells from the detected printed prices, so the box is decided by pixels and the model only reads the product name and price inside one cell; a price can never be paired with its neighbour's product. On a measured test page, every price that had been checked by hand was read correctly (about 18 seconds per cell). English product names are translated to Traditional Chinese in batches of 20 and cached on the normalised name, because the same products return week after week, so only genuinely new products cost a model call.
Search, data pipeline, infrastructure and how I build itHide the stack details
Search: Meilisearch with hybrid keyword + semantic (embedding) search and Chinese tokenisation, replacing Elasticsearch to cut server load.
Data pipeline: distributed Python + Playwright crawlers (Chrome DevTools Protocol) across two machines with Mongo-backed task leases so no job ever runs twice. Raw source data is always preserved before processing, so any bad record can be traced back and reprocessed. Deduplication reconciles the same deal arriving from different sources with different titles and prices, and a separate Amazon crawler re-verifies live prices before deals are published.
Infrastructure: FastAPI + Next.js 14, MongoDB, Redis read store, Docker Compose on a self-managed Ubuntu server, frontend on Vercel. English, Traditional and Simplified Chinese sites on their own subdomains (Simplified is converted in the browser with OpenCC rather than stored twice).
How I build it: with AI coding agents, as an engineer rather than a prompter. Every feature starts as a written spec and plan, is implemented against tests (the backend has around 800 automated tests), and goes through a branch, a preview deployment and my own review of the diff before anything reaches production.


System map
Every step, and which machine runs it.
Collect
Where deals come from
Clean & verify
Make the data trustworthy
AI layer
Judgement calls, automated
Store & serve
Fast reads at scale
Publish
Where people see it
LLM enrichment
Cloud LLMStrict JSON, bilingual, runs on Cloud
Every deal goes to an LLM with its product data and source listing and comes back as strict JSON: category, a natural Traditional Chinese title and summary, English title, tags and feature bullets in both languages. Output is validated before it reaches the database.
Tap any step to see what it does. Highlighted steps call a model: cloud LLMs where quality matters, a self-hosted model where cost and privacy matter.
Manual work it replaces
Manual deal hunting, manual description writing and translation, manual deduplication, manual judgement on what is worth posting, manual social posting and manual article writing. The whole content pipeline now runs on its own, and I review the system rather than the individual deals.
What I learned
Put the cheap deterministic step in front of the LLM. Pre-ranking with a plain score before one batched LLM call cuts cost and latency, and keeps the model focused on the judgement only it can make.
Give the model the narrowest job. In the flyer reader, deterministic code decides the layout and the model only reads one small cell at a time, which turned a page-level guessing problem into a reading problem.
Never trust model output by default. Strict JSON parsing, validation before database writes, fact-checking against source data, and skipping instead of falling back when the model fails: an AI system is only as reliable as the checks around it.
Measure before choosing a model. Local models are free per token but slow; I decide what runs locally, what runs in the cloud and what doesn't need an LLM at all from measured speed and quality, not from preference. Caching LLM output (titles, translations) is what makes a slow local model practical.
Distributed systems fail in ways single-machine systems don't; task leases and preserved raw data were necessary, not nice-to-have. And security is part of the job: I audited the system myself and fixed 3 critical issues, including hardcoded database credentials, an X-Forwarded-For rate-limit bypass and an XSS-readable admin key.
Built with
- Python
- FastAPI
- Next.js
- TypeScript
- MongoDB
- Redis
- Meilisearch
- Playwright
- Docker
- Linux
- Vercel
- OpenAI API
- Claude
- DeepSeek
- Qwen (local LLM)
- LM Studio
- Vision LLM
- Embeddings / hybrid search
- Prompt engineering
Live at canadeal.ca, with English, Traditional Chinese and Simplified Chinese sites.