How joeydd032995-pixel/v0-mlb-betting-analytics works
This is an MLB NRFI/YRFI prediction product: it assembles game and matchup inputs, estimates first-inning probabilities with a calibrated statistical ensemble, and presents picks and betting context to users. The principal workflow also records predictions for result tracking and performance analysis. Separate branches support historical data reconstruction, model diagnostics, and account betting tools. The README documents the model stages; source-index references and excerpts establish the cited application, storage, and sync connections. Unshown integrations and routes are omitted rather than inferred.
Main entry points: nrfi-engine.ts Prediction engine · route.ts Historical sync · page.tsx Daily slate · prisma.ts Application database
Components 20
Prediction experience
- Daily slate
app/page.tsx - Pick cards
components/game-prediction-card.tsx - Model diagnostics
app/ensemble/page.tsx
Game data
- Live game data
lib/api/live-data.ts - MLB statistics
lib/api/mlb-stats.ts - Weather inputs
lib/weather.ts - Odds analysis
lib/api/odds.ts
Prediction engine
- Prediction engine
lib/nrfi-engine.ts - Statistical models
lib/nrfi-models.ts - Feature construction
lib/features/feature-vector.ts - Deep NRFI model
lib/deepnrfi-model.ts - Probability calibration
lib/calibration.ts - Monte Carlo
lib/monte-carlo.ts
Tracking and analysis
- Prediction tracking
lib/prediction-store.ts - Account actions
app/actions.ts - Application database
lib/prisma.ts - Performance metrics
app/api/performance/route.ts
Historical reconstruction
- Historical sync
app/api/historical-sync/route.ts - Point-in-time slate
lib/server/asof-slate.ts
Other components
- Bettor
Connections 25
- Bettor → Daily slate: views slate
app/page.tsx - Daily slate → Live game data: loads predictions
app/page.tsx - Live game data → Prediction engine: supplies games
- Prediction engine → Statistical models: computes ensemble
lib/nrfi-engine.ts - Prediction engine → Feature construction: builds features
lib/nrfi-engine.ts - Prediction engine → Deep NRFI model: predicts optionally
lib/nrfi-engine.ts - Prediction engine → Probability calibration: calibrates probabilities
lib/nrfi-engine.ts - Prediction engine → Monte Carlo: uses simulation
lib/nrfi-engine.ts - Prediction engine → Weather inputs: uses weather
lib/nrfi-engine.ts - Daily slate → Pick cards: renders picks
app/page.tsx - Daily slate → Prediction tracking: tracks predictions
app/page.tsx - Bettor → Model diagnostics: opens diagnostics
app/ensemble/page.tsx - Model diagnostics → Live game data: loads game data
app/ensemble/page.tsx - Model diagnostics → Prediction engine: computes predictions
app/ensemble/page.tsx - Prediction tracking → Application database: persists predictions
- Account actions → Application database: reads and writes
app/actions.ts - Performance metrics → Application database: reads outcomes
app/api/performance/route.ts - Performance metrics → Prediction tracking: uses prediction records
- Historical sync → MLB statistics: fetches game results
app/api/historical-sync/route.ts - Historical sync → Weather inputs: fetches historical weather
app/api/historical-sync/route.ts - Historical sync → Point-in-time slate: builds historical slate
app/api/historical-sync/route.ts - Historical sync → Prediction engine: recomputes predictions
app/api/historical-sync/route.ts - Historical sync → Application database: stores results
app/api/historical-sync/route.ts - Prediction engine → Odds analysis: prices betting value
README.md - MLB statistics → Prediction engine: provides matchup statistics