Data Sources
Connect live sports, odds, injury, weather, and AI providers. API keys are stored as server secrets and never sent to the browser.
Data Mode & Sync
Sample data ships out of the box. Manual entries drive the Scenario Analyzer today. Live API replaces both once at least one provider reports Connected.
Live Data Check · SportsDataIO
Runs a small read-only sample: ping · leagues · MLB teams · today's MLB games · one player stat row · one team stat row. Empty results are expected out of season; errors trigger a graceful fallback to Sample Data elsewhere.
How live keys stay secure
- Keys live only as server secrets (Lovable Cloud secrets or workspace env). The browser never sees them.
- Placeholder client modules (
sportsStatsApi,oddsApi,injuryApi,weatherApi,openAiInsightsApi) delegate to TanStack server functions. - Each provider gets a matching env var:
SPORTS_STATS_API_KEY,ODDS_API_KEY,INJURY_API_KEY,WEATHER_API_KEY,OPENAI_API_KEY. - No automated wagering, no sportsbook logins, no account connections — providers are for research context only.
Planned Database Schema
- sports4 cols
Catalog of supported sports (NFL, NBA, ...)
- leagues5 cols
Leagues/competitions within a sport
- teams7 cols
Teams that compete in a league
- players7 cols
Roster of players across teams
- games10 cols
Scheduled and completed games
- player_stats5 cols
Per-game stat lines for individual players
- team_stats5 cols
Per-game and season stat rollups for teams
- injuries5 cols
Latest injury reports per player
- analyses7 cols
User-generated matchup analyses and saved research
- results5 cols
Actual outcomes recorded for prior analyses (for accuracy tracking)