SPA API compatibility — prefix fix + missing endpoints #95
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#95
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-wkq→ Phase 15 (Production Port — SPA Rebuild)Repo
forgejo_admin/basketball-apiUser Story
As an authenticated user (admin, coach, or parent)
I want the SPA pages to load real data from the basketball-api
So that the app is functional, not just a UI shell with error messages
Context
The SPA rebuild (westside-app PR #37) ported all 13 playground pages to SvelteKit with
apiFetch()calls. But the basketball-api routes don't match what the SPA expects:/api/players,/api/teams, but SPA calls/players,/teamsdirectlyGap Analysis
/account/players/players/{id}/api/players/{id}/players/{id}PUT/players/{id}/billing/admin/dashboard/admin/players/admin/players/{id}/mark-paid/admin/players/{id}/cancel-subscription/admin/teams/api/teams/admin/teams/save/teams/{id}/api/teams/{id}/coaches/me/coaches/{id}/registerPOST/registerPOSTFile Targets
Files to modify:
src/basketball_api/main.py— add SPA-compatible route prefixes or aliasessrc/basketball_api/routes/players.py— add/account/players, player edit PUT, billingsrc/basketball_api/routes/admin.py— add dashboard, player CRM, mark-paid, cancel-subsrc/basketball_api/routes/coach.py— add/coaches/me,/coaches/{id}JSON endpointssrc/basketball_api/routes/teams.py— ensure team detail returns coach + player dataFiles NOT to touch:
src/basketball_api/routes/register.py— registration works, don't break itsrc/basketball_api/routes/webhooks.py— Stripe webhooks, don't touchAcceptance Criteria
/admin— dashboard loads with real stats (player count, team count, pending registrations)/admin/players— sees all players with status, team, payment info/admin/teams— sees teams with rosters/my-players— sees their registered players with status badges/coach— sees their team roster/apiprefixTest Expectations
pytest tests/)pytest tests/ -vConstraints
player.name,player.status,player.team_name)Checklist
/account/playersendpoint/admin/dashboardendpoint/admin/playersendpoint/coaches/meand/coaches/{id}endpointsRelated
phase-wkq-15-production-port— parent phase/players/{id}/contractendpoint)