chore: archive 42 completed/scrapped beans
All checks were successful
CI / backend-tests (push) Successful in 28s
CI / frontend-tests (push) Successful in 28s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-20 21:30:41 +01:00
parent 27c89ccf2b
commit a6cb309b8b
45 changed files with 1063 additions and 161 deletions

View File

@@ -0,0 +1,92 @@
---
# nuzlocke-tracker-d98o
title: User Account integration
status: completed
type: epic
priority: normal
created_at: 2026-02-04T16:17:01Z
updated_at: 2026-03-20T20:16:30Z
blocking:
- nuzlocke-tracker-0jec
---
Enable user accounts so players can track multiple Nuzlocke runs, access them from any device, and view detailed statistics across all their playthroughs.
## Goals
- Users can create accounts and log in securely
- Support social login providers for frictionless onboarding
- Each user can have multiple runs (no longer single-user assumption)
- Provide an overview dashboard of all runs
- Provide detailed statistics aggregated across all runs
## Features
### Authentication
- [ ] Email/password registration and login
- [ ] Social login with Google
- [ ] Social login with Apple
- [ ] Password reset flow via email
- [ ] Session management (remember me, logout)
- [ ] Secure token handling (JWT or session-based)
### User Profile
- [ ] Basic profile info (display name, avatar)
- [ ] Account settings page
- [ ] Delete account option (with data export)
### Multi-Run Support
- [x] Associate runs with user accounts
- [ ] Users can have unlimited runs
- [ ] Migrate any existing local/anonymous runs to account
- [x] Run visibility settings (public by default, can be set to private)
### Runs Overview Page
- [ ] Dashboard showing all user's runs
- [ ] Display per run: game, start date, status (active/completed/abandoned), team snapshot
- [ ] Filter/sort runs by game, status, date
- [ ] Quick actions: continue run, view details, archive
- [ ] Visual indicator for currently active run(s)
- [ ] Create new run button
### Detailed Stats Page
- [ ] Aggregate statistics across all runs:
- [ ] Total runs started / completed / abandoned
- [ ] Total Pokémon caught / lost
- [ ] Favorite games (most runs)
- [ ] Average run completion rate
- [ ] Longest surviving Pokémon across runs
- [ ] Most common cause of death
- [ ] Per-game statistics breakdown
- [ ] Historical timeline of runs
- [ ] Achievements/milestones (e.g., "Completed 5 runs", "No deaths in a run")
## Technical Considerations
- Backend: Add user model, auth middleware, update all run endpoints
- Frontend: Auth context/provider, protected routes, login/register forms
- Database: Users table, user_id foreign key on runs
- Consider OAuth libraries (e.g., Authlib for Python, or Auth0/Firebase Auth)
- GDPR considerations for EU users (data export, deletion)
## Dependencies
- Requires MVP core features to be functional first
- API endpoints need user-scoping
- Database schema needs user table and migrations
## Out of Scope (for now)
- Social features (sharing runs, leaderboards)
- Team collaboration
- Public run profiles
## Decisions (resolved 2026-03-20)
- **Auth provider:** Supabase Auth (third-party, self-hostable, AWS-compatible)
- **Social login:** Google + Discord
- **Run migration:** Existing runs stay unowned, admin assigns manually post-signup
- **Auth scope:** Write operations require auth; per-run public/private visibility toggle
- **Editor for journal (related):** Plain markdown
## Execution Order
1. `nuzlocke-tracker-2561` — Supabase project setup (unblocked)
2. `nuzlocke-tracker-b311` + `nuzlocke-tracker-bnhh` + `nuzlocke-tracker-l9xh` — Backend auth, user model, frontend auth (parallel, after setup)
3. `nuzlocke-tracker-k1l1` — Run ownership + visibility (after all above)