Product Trend Intelligence
Collects Amazon Best Sellers and Google Trends signals on a schedule and ranks products with an explainable score from 0 to 100, from a language model or a transparent fallback formula.
- Type
- Technical assignment
- Year
- 2026
- Status
- Completed
- Source
- Public on GitHub
How data moves through it
- Every 6 hours
- Amazon via Playwright
- Google Trends
- Sales boost
- Score
- Dashboard
The problem
An e-commerce team wanted to spot products that are starting to trend before competitors do, and to understand why each product got its score.
What I built
- FastAPI with JWT login. Heavy work returns 202 and a task ID instead of blocking the request.
- Celery workers and Beat on Redis run collection and scoring every six hours.
- Playwright collectors with a separately tested parser and idempotent updates by ASIN.
- Careful rate-limit handling: the first HTTP 429 ends the run and starts a cooldown instead of opening more browsers.
- OpenAI or Gemini scores validated against a JSON schema, with a deterministic fallback that explains every point.
- A React dashboard with task polling, manual entries and CSV import. The whole stack starts with one Docker command.
Architecture
A modular monolith. FastAPI owns authentication and the HTTP contract and never scrapes inside a request; Celery runs collection, boosts and scoring in the background, with PostgreSQL as the store and Redis as the broker.
Result
Technical assignment delivered as a four-day MVP, with known limitations documented honestly in the repository. The source is public.