Phase 12: Unified Registration Flow
Goal: Single registration form: player info + photo upload + payment + disclaimer → auto-creates Keycloak account. Replaces fragmented 4-step flow.
Owner: Dev agent
Repo:
forgejo_admin/basketball-api, forgejo_admin/westside-appDepends on: phase-wkq-2-keycloak-auth, phase-wkq-7-player-profiles
Scope
Current flow (fragmented):
- Pay via Stripe checkout link
- Webhook creates DB record + sends email with token
- Parent clicks email → fills registration form (basketball-api server-rendered)
- Manual batch script creates Keycloak account separately
Target flow (unified):
- Parent clicks "Sign up" from landing page or tryouts page
- Single form: player info + photo upload + waiver/disclaimer checkbox + Stripe payment
- On submit: DB record created, Keycloak account auto-created, confirmation email sent
- Parent can immediately log in and see their player profile
Bug fixes:
- Email-mismatch bug: match by token, not email (prevents duplicate parent records)
- Account creation: include firstName/lastName in Keycloak user payload
- Photo upload: camera/gallery picker as required field during registration
Deliverables
- Unified registration endpoint in basketball-api
- Registration page in westside-app (or basketball-api SSR)
- Keycloak account auto-creation on registration
- Email-mismatch bug fixed
- Photo upload integrated into registration
Related
- Plan: Westside Kings & Queens
- Product Design — full tryout flow spec
- Data Flow — current flow + known bug
- TODO: Fix account creation script