brackt/app/routes
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
..
api feat: implement real-time queue updates via socket events in queue actions (#63) 2026-03-04 21:39:54 -08:00
leagues feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
teams feat: add random team name generation and improve league exit flow 2025-10-14 22:45:24 -07:00
admin._index.tsx feat: implement daily standings snapshot system with admin management interface 2025-11-14 09:15:58 -08:00
admin.data-sync.tsx Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
admin.participants.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
admin.sports-seasons.$id.events.$eventId.bracket.server.ts feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
admin.sports-seasons.$id.events.$eventId.bracket.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.events.$eventId.server.ts feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.events.$eventId.tsx refactor: fix event edit page code review issues (#87) 2026-03-07 23:43:24 -08:00
admin.sports-seasons.$id.events.server.ts feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.events.tsx feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.expected-values.server.ts Refactor expected values form to batch save all participants (#4) 2026-02-19 15:57:05 -08:00
admin.sports-seasons.$id.expected-values.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.$id.futures-odds.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.$id.participants.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.simulate.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.$id.standings.tsx feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.new.tsx feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.tsx feat: add bulk participant creation and expected value field 2025-10-15 21:21:33 -07:00
admin.sports.$id.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports.new.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.sports.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.standings-snapshots.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.$id.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.new.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
admin.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
api.admin.export-sports-data.ts feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
home.tsx Include commissioner leagues in user's active leagues (#8) 2026-02-20 10:28:37 -08:00
how-to-play.tsx Add rules page, rewrite how-to-play, and fix scoring display (#20) 2026-02-21 21:58:51 -08:00
i.$inviteCode.tsx feat: add invite code system for league seasons with member access control 2025-10-14 12:20:36 -07:00
rules.tsx Add rules page, rewrite how-to-play, and fix scoring display (#20) 2026-02-21 21:58:51 -08:00
test-socket.tsx fix: eliminate socket ghost connection and stale state on reconnect (#38) 2026-02-24 12:24:04 -08:00
user-profile.tsx feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00