Board: Data-Driven Contracts (#34)

board-34-data-driven-contracts Board

active

Board: Data-Driven Contracts (#34)

Parent

westside-contracts #34 — data-driven contract rendering system. Decomposed because it spans 2 repos, 4 waves, 12 components, 2 migrations, and a data audit of 40+ player records.

Goal

Kiana Sikander and Kelsie Stevens each receive a contract email. When they tap the link, the contract page reflects their actual deal — correct fee, correct tournaments, correct practices. No generic template with a disclaimer. Marcus approves both before send.

User Stories

Key Story Served
WS-S20 As a parent, I want to sign contracts digitally so that paperwork is handled online Yes — contract page renders correctly for custom deals
WS-S23 As an admin, I want to configure custom contract terms per player so that custom deals render correctly without code changes Yes — JSONB overrides on players table

Architecture

Acceptance Criteria

  • Kiana's contract page shows: $100/month, Mesa AZ + Nike Vegas only, 1 practice/week, custom note
  • Kelsie's contract page shows: $200/month, local variant (no travel tournaments), practice schedule, local-only note
  • All 34 offered + 19 signed contracts render identically to current (no regression)
  • Contract signing flow works end-to-end
  • Queens practice schedule shows Wednesday Granger, not Friday BWill
  • Marcus approves both emails before send
  • Both parents receive contract email and can sign

Tickets

All on board-westside-basketball with arch:contracts label.
Wave # Ticket Repo Depends
1 T1 contract_config JSONB on teams (bball-api #319) basketball-api
1 T2 contract_overrides JSONB on players (bball-api #321) basketball-api
1 T4 Extract Svelte components (wc #35) westside-contracts
1 T9 Fix Queens practice schedule (wc #40) westside-contracts
2 T3 Seed team configs + audit player overrides (bball-api #322) basketball-api T1, T2
2 T5 Data-driven page.server.ts + merge (wc #36) westside-contracts T1, T2
3 T6 Wire components to data (wc #37) westside-contracts T4, T5
3 T8 Update contract_version in sign endpoint (wc #38) westside-contracts T5
4 T7 Send Kiana + Kelsie contract emails (wc #39) both T6

Kanban

Sub-tickets live on board-westside-basketball. Filter by arch:contracts label.