Brand alignment + registration tokens (Phase 3a) #19
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#19
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 3aRepo
forgejo_admin/basketball-apiUser Story
As a parent who paid via Stripe,
I want to click a personalized link and see a branded Westside registration form pre-filled with my child's info,
So that I can complete their tryout profile without guessing emails or seeing a generic-looking page.
Context
The registration form, coach onboarding, and roster pages are live at
https://basketball-api.tail5b443a.ts.netbut use a blue/gold color scheme (#0a1628background,#f5b731accents) that doesn't match the Westside marketing site (~/west-side-basketball/), which uses red & black (#d42026,#0a0a0a). Parents coming from the marketing site would think they're on a different website.Additionally, 34 families have paid $30 via Stripe but we can't send them profile-completion emails yet because the form has no token-based pre-fill. The current flow requires parents to remember which email they used for Stripe — if they don't, dedup breaks and they might get asked to pay again.
Registration tokens solve this: each family gets a unique link (
/register?token=abc123) that maps directly to their Stripe payment record. Same pattern as the existing coachinvite_token.File Targets
Files to modify:
src/basketball_api/routes/register.py— replace inline blue/gold CSS with red/black Westside brand tokens; add?token=query param support; pre-fill form from Parent/Player record when token is validsrc/basketball_api/routes/coach.py— replace inline CSS with Westside brandsrc/basketball_api/routes/roster.py— replace inline CSS with Westside brandsrc/basketball_api/models.py— addregistration_tokencolumn to Parent model (String(100), unique, nullable)alembic/versions/— new migration 004 for registration_token columnsrc/basketball_api/routes/admin.py— new file, admin endpoint to generate tokensCSS source of truth:
~/west-side-basketball/css/style.css— design tokens to extract (lines 7-50: colors, typography, spacing, border radius)Files NOT to touch:
src/basketball_api/routes/webhooks.py— Stripe webhook handler is correct as-issrc/basketball_api/services/registration.py— registration service logic unchangedsrc/basketball_api/routes/health.py— no UIAcceptance Criteria
--color-red: #d42026,--color-black: #0a0a0a,--color-dark: #141414, system font stack. No blue/gold remnants./registertitle reads "Westside Kings & Queens — Player Registration"/coach/onboarduses same red/black brandParent.registration_tokencolumn exists (String(100), unique, nullable)GET /register?token=abc123with valid token → form pre-fills parent name, player name, height, graduating class from existing Stripe data. Shows "Already paid" indicator.GET /register?token=abc123with invalid token → clear error message with instructions to contact adminGET /register?token=abc123with no matching parent → clear errorGET /register(no token) still works — blank form for walk-upsGET /register(no token) + submit with email matching existing paid parent → pre-fills on re-render, shows "Already paid", no Stripe redirectPOST /admin/generate-tokens— generatesregistration_tokenfor all paid parents who don't have one. Returns count of tokens generated. Auth-protected (admin role).Test Expectations
pytest tests/ -vConstraints
~/west-side-basketball/css/style.css— do NOT invent new colors. Use the exact values from the marketing site.secrets.token_urlsafe(32)— same approach as coach invite_token/registerform must handle all three entry paths in a single route: (1) token pre-fill, (2) email dedup for QR walk-ups, (3) blank form for new walk-upsChecklist
Related
project-westside-basketballplan-2026-03-08-tryout-prep→ Phase 3a