Roster + tryout number management — server-rendered HTML (Phase 4) #21
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-2026-03-08-tryout-prep→ Phase 4Repo
forgejo_admin/basketball-apiUser Story
As Marcus (admin),
I want to open the roster on my phone, see all registered players with photos and profile completeness, and assign tryout numbers,
So that I can manage tryout day without a laptop or front desk.
As a coach,
I want to see player cards with photos, names, schools, and positions,
So that I can learn names and faces before evaluations.
Context
The roster endpoint already exists at
GET /tenants/{tenant_slug}/roster(JSON) andGET /tenants/{tenant_slug}/roster/view(HTML). Currently it shows a basic table with player name, parent, and payment status. It needs to be enhanced into a proper player-card-based view with photos, profile completeness, tryout numbers, search/filter, and admin controls.Players self-serve — they scan a QR code or click their email link and fill out their own profile on their phone. There is NO front-desk check-in terminal. The roster is a monitoring + management view for Marcus and coaches.
Phase 3a adds Westside red/black branding to all pages. This phase must use the same brand CSS. Phase 3a also adds registration tokens, so by the time this phase ships, players will be completing profiles and the roster will have real data to display.
The Player model already has
tryout_number(Integer, nullable) andchecked_in(Boolean, nullable) fields from migration 002.File Targets
Files to modify:
src/basketball_api/routes/roster.py— enhanced HTML roster view with player cards, admin controls, coach view, search/filter, QR code generation. Westside red/black branded.src/basketball_api/models.py— no changes needed (tryout_number + checked_in already exist)Files to read for context:
src/basketball_api/routes/register.py— see brand CSS pattern after Phase 3a landssrc/basketball_api/models.py— Player fields: photo_url, name, height, position, graduating_class, current_school, tryout_number, checked_in, date_of_birth, team_preferencesrc/basketball_api/main.py— roster router already included at/tenants~/west-side-basketball/css/style.css— design tokensFiles NOT to touch:
src/basketball_api/routes/register.py— Phase 3a owns thissrc/basketball_api/services/email.py— Phase 3b owns thisAcceptance Criteria
Admin roster view (
/tenants/{slug}/roster/viewwith admin auth):Coach roster view (same URL with coach auth):
QR code:
GET /tenants/{slug}/roster/qr— generates a printable page with QR code linking tohttps://basketball-api.tail5b443a.ts.net/registerAPI endpoints:
POST /tenants/{slug}/roster/assign-number— body:{"player_id": N, "tryout_number": M}. Admin-only.POST /tenants/{slug}/roster/bulk-assign— auto-assigns sequential numbers to all players without one. Admin-only. Returns count assigned.Test Expectations
pytest tests/ -vConstraints
~/west-side-basketball/css/style.css)player.photo_urlif set, otherwise a generic placeholder silhouetteqrcodePython library (add to dependencies if not present) or inline SVGChecklist
Related
project-westside-basketballplan-2026-03-08-tryout-prep→ Phase 4