Schedule API endpoints (practices + events CRUD) #233
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#233
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?
Type
Feature
Lineage
Child of
forgejo_admin/basketball-api#230(decomposed parent). Depends on #232 (data model).Repo
forgejo_admin/basketball-apiUser Story
story:WS-S13As an admin, I want API endpoints to create, read, update, and delete schedule entries so that the admin frontend can manage practices and events.Context
This ticket adds the API layer for schedule management. The data model and tables are created in sibling ticket #232 — this ticket depends on that landing first.
Key design decisions (from review of #230):
routes/schedule.pyfile —admin.pyis 1048 lines, and the codebase has precedent for dedicated route files (jersey.py, checkout.py, coaches_api.py).Division(boys/girls)enum.File Targets
Files to create or modify:
src/basketball_api/routes/schedule.py— NEW file. Admin CRUD endpoints with inline Pydantic schemas.src/basketball_api/main.py— register the schedule routertests/test_schedule.py— NEW file. Endpoint tests.Pattern reference (do NOT modify):
src/basketball_api/routes/admin.py— tenant scoping pattern, auth dependency injectionsrc/basketball_api/routes/jersey.py— dedicated route file pattern, inline schemassrc/basketball_api/routes/checkout.py— another dedicated route file exampleFiles NOT to touch:
src/basketball_api/models.py— already handled by #232alembic/— already handled by #232Acceptance Criteria
GET /admin/schedulereturns combined{ practices: [...], events: [...] }GET /admin/schedule/practiceslists practice schedules (filter: division, is_active)POST /admin/schedule/practicescreates a practice schedulePUT /admin/schedule/practices/{id}updates a practice scheduleDELETE /admin/schedule/practices/{id}deletes a practice scheduleGET /admin/schedule/eventslists events (filter: division, event_type)POST /admin/schedule/eventscreates an eventPUT /admin/schedule/events/{id}updates an eventDELETE /admin/schedule/events/{id}deletes an eventTest Expectations
pytest tests/test_schedule.py -vConstraints
routes/jersey.pypattern for file structure (APIRouter, inline Pydantic models, dependency injection)routes/admin.pyprogramfield (boys→"Kings", girls→"Queens") for frontend convenienceChecklist
Related
forgejo_admin/basketball-api#230forgejo_admin/basketball-api#232(data model — BLOCKER)project-westside-basketballScope Review: READY
Review note:
review-630-2026-03-28All template sections present and complete. Traceability triangle verified (story:WS-S13, arch:basketball-api, Forgejo #233). All file targets confirmed against codebase -- pattern references (jersey.py structure, admin.py auth, checkout.py) validated. Blocker #232 documented in labels and body. No blast radius concerns -- clean greenfield, no existing schedule route code. 10 AC is on the upper boundary but mechanical CRUD with strong pattern precedent. No decomposition needed.