Promote playground dashboard to westside-app (Phases 1-3) #5
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-landing#5
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 6a (SvelteKit scaffold) → Promotion from playgroundRepo
forgejo_admin/westside-appUser Story
As a coach or admin
I want the proven tryout-day dashboard running as its own SSR app
So that it loads instantly with real data, persists check-ins, and doesn't depend on a shared nginx playground
Context
The SvelteKit dashboard was prototyped in
~/html-playground/3-westside-dashboard/and used live at tryouts on 2026-03-13. It works — 45 players, admin triage (ready/needs-waiver/needs-everything), coach card view, search, check-in, assign-number.westside-appexists on Forgejo with a basic scaffold (3 commits): Dockerfile, k8s manifests, CI pipeline. But it connects to Postgres directly viapgand has placeholder pages. The architecture decision: use basketball-api as the data layer — the frontend calls API endpoints, not Postgres directly.Key decisions:
adapter-node(SSR) — the app has its own container, not shared nginx+page.server.jsto fetch from basketball-api server-side (no loading spinner)BASKETBALL_API_URLenv var for internal service URLwestside-kings-queens(single-tenant app)File Targets
Files to create:
src/lib/server/api.js— basketball-api client helper (fetch roster, check-in, assign-number)src/routes/admin/+page.server.js— SSR load + form actions for admin mutationssrc/routes/coach/+page.server.js— SSR load for coach viewFiles to rewrite:
src/routes/+page.server.js— fetch stats from basketball-api instead of direct Postgressrc/routes/+page.svelte— landing page with stats + nav links to /admin and /coachsrc/routes/admin/+page.svelte— port admin triage view from playground (ready/needs-waiver/needs-everything, check-in toggle, assign-number, walk-up, copy reg link)src/routes/coach/+page.svelte— port coach card view from playground (player cards, search, position filter, checked-in/not sections)src/routes/+layout.svelte— update global styles to match playground dark themepackage.json— removepgdependencyFiles to delete:
src/lib/server/db.js— remove direct Postgres connectionFiles NOT to touch:
Dockerfile— works as-is with adapter-nodek8s/— deployment changes are Phase 4 (separate issue).woodpecker.yml— CI changes not needed for code promotionReference design:
~/html-playground/3-westside-dashboard/src/routes/+page.svelte(698 lines, both admin + coach views)Acceptance Criteria
/) shows player count stats from API (SSR, no spinner)/adminshows triage view with ready/needs-waiver/needs-everything sections/coachshows player cards with photos, search, position filterpgremoved from package.json)BASKETBALL_API_URLenv var configures API base URL (default:http://localhost:8000)graduating_classfield displays correctly (Phase 3)Test Expectations
npm run devwithBASKETBALL_API_URLpointing at running basketball-api/,/admin,/coachall render with real dataConstraints
$state,$derived,$props) — match playground patternsGET /api/roster/{tenant},POST /api/roster/{tenant}/check-in/{id},POST /api/roster/{tenant}/assign-number/{id}Checklist
pgdependency removedRelated
westside-basketball— project this affectsplan-2026-03-08-tryout-prep— parent plan