How jonnykeys/sports-psychic works
Sports Psychic is an NFL pick’em and forecasting platform with an offline-resilient PWA, live scoreboard ingestion, scoring and standings, league membership, and cloud persistence. The principal flow is forecasts and game state through temporal reconciliation and deterministic scoring into matchup and leaderboard views; authentication and league/pick-sheet persistence support the social workflow. The repository also contains the standalone OG League viewer. Connections among the newer client subsystems follow the README architecture; several implementation details and the top-level wiring are unsampled.
Main entry points: app.js Reactive State · scoring.js Scoring Engine · espn.js ESPN Scoreboard · teams.js Team Directory
Components 18
Client and Views
- PWA Client
apps/og-league/app.js - Reactive State
apps/og-league/app.js - Browser Cache
apps/og-league/app.js - Matchup Views
src/ui/matchups.js - Standings Views
src/ui/standings.js
Forecast Domain
- NFL Calendar
src/utils/dates.js - Team Directory
src/utils/teams.js - Temporal Auditor
src/engine/scoring.js - Scoring Engine
src/engine/scoring.js
External Integrations
- ESPN Scoreboard
src/api/espn.js - ESPN API
- Google Sheets
Cloud Persistence
- Authentication
src/services/supabase.js - League Service
src/services/supabase.js - Pick Sheets
src/services/supabase.js - Supabase
- PostgreSQL
database/supabase_schema.sql
Other components
- Player
Connections 20
- Player → PWA Client: views
apps/og-league/app.js - PWA Client → Google Sheets: syncs data
apps/og-league/app.js - ESPN API → Temporal Auditor: supplies telemetry
README.md - Temporal Auditor → Reactive State: audits weeks
README.md - Reactive State → Scoring Engine: provides predictions
README.md - Scoring Engine → Matchup Views: scores forecasts
README.md - Scoring Engine → Standings Views: ranks players
README.md - Reactive State → Browser Cache: syncs snapshots
README.md - Browser Cache → Reactive State: restores snapshots
README.md - ESPN Scoreboard → ESPN API: requests scores
- ESPN Scoreboard → Team Directory: normalizes codes
src/api/espn.js - Player → Authentication: authenticates
README.md - Player → League Service: manages leagues
README.md - Player → Pick Sheets: saves picks
README.md - Authentication → Supabase: uses auth
README.md - League Service → Supabase: queries memberships
README.md - Pick Sheets → Supabase: persists sheets
README.md - Supabase → PostgreSQL: stores records
README.md - NFL Calendar → PWA Client: provides week rules
- Team Directory → Matchup Views: provides team data