brackt/app/models
Chris Parsons c6ba59b0e6
User/chris/ev f1 framework (#93)
* feat: EV simulation framework with F1 Monte Carlo simulator

- Add EV snapshot tables (participant_ev_snapshots, team_ev_snapshots) and simulation_status column on sports seasons
- Add ev-snapshot model with upsert and history query functions
- Add simulator framework: types, bracket/F1/golf simulators, registry
- F1 simulator: vig-removed ICM weighted draw (pre-season) + race-by-race Monte Carlo from current standings (in-season); per-position column normalization to prevent floating-point EV drift
- Add admin simulate route and Run Simulation button on sports season page
- Rework futures-odds admin page to save odds then run simulation in one action
- Remove recalculate-probabilities route (superseded by simulate route)
- Remove EV trend chart panel and associated DB queries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: map simulators to sports via simulatorType field

Adds a `simulator_type` enum column to the `sports` table so each sport
can be assigned a specific simulation algorithm rather than deriving it
from the sports season's scoring pattern.

- Add `simulatorTypeEnum` (f1_standings, indycar_standings,
  golf_qualifying_points, playoff_bracket) + `simulatorType` nullable
  column on `sports` table; migration 0037
- Rewrite simulator registry to key off `SimulatorType` instead of
  `ScoringPattern`; indycar_standings shares F1Simulator for now
- `findSportsSeasonById` now returns `SportsSeasonWithSport` so callers
  have typed access to `sport.simulatorType`
- Simulate and futures-odds actions read `sport.simulatorType`; guard
  fires before setting `simulationStatus: running`
- Admin sport edit page gains a Simulator Type dropdown

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 15:34:31 -07:00
..
__tests__ feat: proactively prune ineligible queue items after each pick (#59) 2026-03-02 22:07:22 -08:00
commissioner.ts Add implementation plan for commissioner-without-team feature (#6) 2026-02-20 08:45:09 -08:00
draft-pick.ts fix: Pass database instance to isParticipantDrafted in timer context 2025-10-28 23:40:29 -07:00
draft-queue.ts feat: proactively prune ineligible queue items after each pick (#59) 2026-03-02 22:07:22 -08:00
draft-slot.ts feat: add draft order management with UI for manual and random ordering 2025-10-15 08:58:35 -07:00
draft-timer.ts Fix draft timer creation for teams without existing timers (#26) 2026-02-22 17:27:16 -08:00
draft-utils.ts feat: proactively prune ineligible queue items after each pick (#59) 2026-03-02 22:07:22 -08:00
ev-snapshot.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
event-result.ts feat: Add scoring event and results management with comprehensive scoring rules and standings tracking 2025-10-28 23:50:50 -07:00
index.ts feat: add draft pick, queue, and timer models with database schema updates 2025-10-16 00:32:48 -07:00
league.ts Include commissioner leagues in user's active leagues (#8) 2026-02-20 10:28:37 -08:00
participant-expected-value.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
participant-result.ts feat: Implement bracket expansion plan to support various tournament structures 2025-11-03 09:36:16 -08:00
participant-season-result.ts feat: Implement season standings processing and participant result management for final standings events 2025-11-08 22:35:07 -08:00
participant.ts Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
playoff-match.ts feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
qualifying-points.ts feat: Implement Qualifying Points Standings component and related logic 2025-11-11 10:08:25 -08:00
scoring-calculator.ts feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
scoring-event.ts feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
scoring-rules.ts feat: Add scoring rules editor to league settings and creation pages 2025-10-29 00:04:27 -07:00
season-sport.ts feat: Refactor database connection handling in draft-related functions for improved flexibility 2025-10-26 20:35:55 -07:00
season-template-sport.ts refactor: remove isRequired field from season sports and templates 2025-10-13 15:00:59 -07:00
season-template.ts feat: add sports and participant models with admin user functionality 2025-10-12 21:16:00 -07:00
season.ts feat: add recharts library and implement PointProgressionChart component for historical views 2025-11-14 21:18:34 -08:00
sport.ts feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
sports-season.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
standings.ts feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
team.ts feat: add fantasy league schema and new league routes 2025-10-11 00:07:39 -07:00
tournament-group.ts feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
user.ts feat: add team ownership management UI with admin controls 2025-10-21 22:15:15 -07:00