FPL Scraper is a Next.js dashboard and data pipeline for Fantasy Premier League transfer decisions powered by YouTube sentiment signals.
- FPL transfer recommendations (
BUY/SELL/HOLD) - Dashboard with KPI cards, recommendation explorer, event timeline, and video diagnostics
- Settings and sync controls via API routes
- Supabase-backed data access
- shadcn-style UI primitives with Tailwind CSS
- Next.js 16
- React 19
- Supabase
- Tailwind CSS + shadcn-style components
npm installCreate .env with the required keys (Supabase, YouTube, and any app secrets used by your setup).
npm run devOpen http://localhost:3000.
npm run dev- start development servernpm run build- production buildnpm run start- run production servernpm run test- run all testsnpm run test:ui- run UI testsnpm run smoke:supabase- smoke test Supabase routes
/api/settings/api/sync/run/api/strategy/run/api/strategy/template/api/strategy/team/api/recommendations/api/runs/api/events/api/videos
src/app- Next.js app routes and layoutsrc/components- dashboard and reusable UI componentsapps/web/src- app service layer and APIspackages/pipeline/src- pipeline clients and scoring logictest- unit, contract, integration, UI, and e2e tests
- Keep
.envlocal and out of source control. - Deploy preview builds to Vercel for validation before production.
The app combines three data lanes into one decision dashboard:
Pipeline syncingests YouTube videos, attempts transcript extraction, summarizes sentiment, and writes recommendation rows.Strategy refreshbuilds elite-manager cohort snapshots, template ownership, momentum deltas, and team-fit insights for your entry.Dashboard APIserves the latest run-backed recommendations plus strategy panels and health diagnostics.
Use this sequence when operating or troubleshooting production data:
- Save settings (
entry_id, channel ids) in the dashboard Controls panel. - Run Strategy Refresh first (
/api/strategy/run) to populate template/team-fit tables. - Run Sync Now (
/api/sync/run) to generate a fresh recommendation batch tied to a newrun_id. - Validate in dashboard:
- Strategy cards are populated (Template Pulse, Team vs Elite, Transfer Radar, Momentum).
- Recommendation counts reflect the latest run.
- Pipeline Health shows the run completed (not stuck in running).
- Use Video Diagnostics for transcript failure reasons (
missing_transcript,ytdlp_not_installed, etc.).
When deploying code that changes DB contract:
- Apply
/scripts/supabase-schema.sqlin Supabase SQL Editor. - Verify setup:
npm run supabase:verify
- Smoke critical routes:
npm run smoke:supabase
- Deploy after verify + smoke pass.
This prevents runtime drift between app expectations and Supabase tables.