Residential browser worker

Cloudflare blocks most datacenter scrapers. Run the Playwright worker on a home/residential machine so browser requests look like a normal user. Parsing stays on the server — the worker only fetches HTML and images.

1. Set secrets

# On the API host
WORKER_TOKEN=long-random-string
CRON_SECRET=long-random-string
ADMIN_TOKEN=long-random-string

# Local defaults when unset (development only):
# WORKER_TOKEN=dev-worker-token

2. Install & run worker

cd worker
npm install
npx playwright install chromium
API_BASE=https://your-api.example WORKER_TOKEN=... npm start

3. Trigger a refresh

curl -X POST "$API_BASE/api/internal/refresh" \
  -H "authorization: Bearer $CRON_SECRET" \
  -H "content-type: application/json" \
  -d '{"seedUrls":["https://www.minecraftmaps.com/53008-ultimate-rage-parkour"]}'

Daily cron already calls /api/cron/refresh at 06:00 UTC when hosted with Vercel Cron.