Phase 19: Coach Playbooks
Goal: Coaches upload playbooks for their team to study. Team-scoped access — players only see their team's playbooks.
Owner: Dev agent
Repo:
forgejo_admin/basketball-api, forgejo_admin/westside-appDepends on: phase-wkq-5-team-placement, phase-wkq-15-production-port
Scope
Backend:
- Playbook model: title, file_url, team_id FK, uploaded_by (coach_id), created_at
- File storage: PVC or MinIO bucket (same pattern as photo uploads)
- Endpoints: upload (coach-only, scoped to their team), list (team-scoped), download, delete
- Auth: coaches can upload/delete for their team only. Players can view their team's playbooks only. Admin can manage all.
Frontend:
- Team detail page (
/teams/[id]): playbooks section — list with download links - Coach dashboard: upload form (PDF, images, or any file type)
- Player view: read-only playbook list on team page
User stories:
- As a coach, I want to upload playbooks so my team can study game plans and drills
- As a player/parent, I want to view my team's playbooks so I can prepare for practice
- As an admin, I want to see all playbooks across teams for oversight
Deliverables
- Playbook upload/download endpoints in basketball-api
- Playbook section on team detail page
- Coach upload UI
- Team-scoped access control
Related
- Plan: Westside Kings & Queens
- Phase 5: Team Placement — team model this builds on
- Phase 15: Production Port — team page ported from playground