Docs
API & data surface
Internal map of what each page loads. Turso holds NFLverse team/player/schedule data. The Rundown is only used for odds.
Live site: www.buildparlays.com · Endpoint reference
Season model
CURRENT_NFL_SEASONinlib/season.tsis the single source for anything displayed as current (schedule, records, defaults).- Current-season W-L only counts games with
game_date < today (ET)so last year finals or future/projected scores never show as live records. - History stays in Turso. Pass
?season=YYYYon schedule / teams / stats APIs to read older years on purpose. - Player week-stat endpoints request the current season first, then fall back to the latest year that actually has rows until Klon's 2026 calcs are loaded.
Global (every page)
Navbar search fires when someone types a query.
- GET /api/search?q={query}Navbar search on every page (Turso players + teams)
Homepage
League leaders, consistency, schedule rails, featured teams
GET /api/database/teamsGET /api/database/league-rankingsGET /api/players/consistency?position=&stat=&limit=&minGames=GET /api/players/flag-magnets?filter=Empty until player penalty data exists
GET /api/schedule/nextCurrent-season next game + W-L as of today ET
GET /api/schedule/todayCurrent-season records as of today ET
GET /api/schedule/date?date=YYYY-MM-DDUpcomingGames look-ahead; records as of that date
- CURRENT_NFL_SEASON (lib/season.ts) drives anything shown as current.
- Historical seasons remain available via ?season=YYYY on schedule/teams/stats APIs.
- Player stat endpoints fall back to latest season that has Turso rows when current-year stats are not loaded yet.
NFL Odds
Live / near-live NFL event odds board
GET /api/rundown/nfl/events?date=YYYY-MM-DDOnly page that spends Rundown quota (server-cached)
Schedule
Week-by-week NFL slate
GET /api/schedule/week?week=&season=
Teams index
All NFL teams grid
GET /api/database/teams
Team page
Roster, depth chart, schedule, leaders, game logs
GET /api/database/teams?season=GET /api/database/players?team=GET /api/database/team-seasons?team=GET /api/database/team-schedule?team=&season=GET /api/database/depth-chart?team=GET /api/database/team-leaders?team=&season=GET /api/database/team-stats?team=&season=
Players index
Browse player list
No browser `/api/*` calls.
- Server component reads Turso via playerRepository (no public /api/* hop).
Player profile
Bio, season totals, game log
No browser `/api/*` calls.
- Server component reads Turso via playerRepository. No Rundown calls.
Search
Player + team search results
GET /api/search?q=
Rankings
Stat leaderboards across the league
GET /api/database/league-rankingsGET /api/database/teamsLogos / context
Gameday Companion
Full slate + depth context per team
GET /api/database/teamsGET /api/database/all-schedule?season=GET /api/database/depth-chart?team=Called once per team (heavier page)
Matchup
Single-game matchup detail
GET /api/matchup/[gameId]Still queries legacy games table; may 404/500 until rewritten to schedules
About
Static product copy
No browser `/api/*` calls.
Guides
Static content
No browser `/api/*` calls.
Guide category
Static content
No browser `/api/*` calls.
Contact
Contact form (currently disabled in UI)
No browser `/api/*` calls.
- Form does not POST. /api/contact exists but is unused.
Implemented but not on a page UI
GET /api/players/weekly-topImplemented, not wired to a page UI yet
GET /api/teammatesImplemented, not wired to a page UI yet
POST /api/contactRoute exists; form disabled
GET /api/rundown/sportsInternal / admin-style
GET /api/rundown/usageInternal / admin-style