Public
Pokemon TCG restock monitor for UK retailers -> Discord
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

Pokemon TCG Stock Monitor

Checks UK retailers for Pokemon TCG restocks and posts alerts to Discord. Currently scaffolded, not yet functional -- Smyths (Luton) is the first retailer being wired up.

How it's structured

  • main.ts -- interval job (runs every 15 min, the free-tier minimum), loops through retailer checkers, diffs against known state, alerts on new stock.
  • db.ts -- SQLite table tracking last-known stock per retailer/store/product.
  • discord.ts -- posts a formatted alert to a Discord webhook.
  • kernel.ts -- headless-browser session harvesting (Kernel/Playwright), for getting past Imperva/Akamai-style bot protection. Not implemented yet.
  • types.ts -- shared RetailerChecker interface every retailer module follows.
  • retailers/smyths.ts -- first retailer, in progress.

Why the Kernel step exists

Smyths, GAME, and Very all block plain server-side requests with bot protection (Imperva / Akamai). Confirmed by direct testing on 2026-07-20. John Lewis and Hamleys are assumed to be similar but untested. The plan is to use a real headless browser (via Kernel) to solve the challenge once, harvest the resulting session cookies, then reuse those cookies for cheap polling until they expire.

Required env vars

Status

  • Project scaffold (db, discord alerting, interval loop)
  • Kernel session harvesting implemented
  • Smyths Luton store-stock endpoint captured (needs a DevTools trace of the real "check store stock" request from smythstoys.com -- select Luton, hit a product page, copy the request Chrome's Network tab shows)
  • Smyths checker working end-to-end
  • GAME / Sports Direct
  • Very / John Lewis / Hamleys