brackt/docs/agents/domain-models.md
Chris Parsons 7e8c5afde5 Complete BetterAuth migration: auth flows, rename, and cleanup
- Add /forgot-password and /reset-password pages (full password reset flow)
- Add 'Forgot password?' link on login page
- Fix register.tsx: add explicit window.location fallback after signUp
- Rename commissionerAuditLog.actorClerkId → actorUserId (migration 0084)
  and update all references in model, routes, components, and tests
- Rewrite docs/agents/auth.md to document BetterAuth (removes all Clerk refs)
- Update test fixtures and schema comments to remove Clerk ID references;
  use UUID-format IDs throughout test data
- Update docs/agents/domain-models.md ownerId description

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 08:56:20 -07:00

1.5 KiB

Domain Models

Fantasy Draft System

Model Description
League Top-level container; has one or more commissioners
Season One iteration of a league. Status: pre_draftdraftactivecompleted
Team Belongs to a season; owned by a user (ownerId = UUID → users.id)
Draft Slot Defines draft order for teams in a season
Draft Pick Record of each pick made
Draft Queue A team's pre-ordered wish list of participants
Draft Timer Active countdown for the team currently on the clock
Autodraft Settings Per-team config for automatic picking

Season status drives UI visibility: draft order shown in pre_draft, draft controls active in draft, etc.

Snake Draft Logic

  • Draft slots define base order (1, 2, 3…)
  • Odd rounds go 1→N; even rounds go N→1
  • currentPickNumber on the season tracks position
  • server/timer.ts handles autopicks when timer expires

Sports Data System

Model Description
Sport Base sport definition (e.g. NFL, NBA); type is team or individual
Sports Season A specific season of a sport (e.g. "2024 NFL Season")
Participant An athlete or team that can be drafted
Season Template Reusable configuration for creating league seasons
Season Sport Junction: links a fantasy season to the sports it covers
Participant Result Final standings/scores for participants at season end