builtbykev
|
3b47b783dc
|
Session 49: Complete onboarding flow + name micro-fixes (2185 tests)
Name micro-fixes (close the normalization arc):
- collapseInitials merges "J C Escarra" -> "JC Escarra" (display + key); both
playerName.js copies. Added mickey:michael nickname.
Onboarding flow (end-to-end, complete):
- Storage: Supabase user_metadata.preferences (no migration).
- API: src/routes/preferences.js GET/POST (requireAuth, admin getUserById/
updateUserById, partial merge + sanitize) + Next /api/preferences proxy.
- Page: web onboarding/page.tsx — 3 steps (sports >=1 / books skip / bankroll
presets+custom+skip) -> SIGNAL ACTIVE -> POST onboarding_complete:true -> 2s
-> /dashboard. Redirects to login when unauthenticated.
- Redirect: dashboard fetches /api/preferences fresh; new+incomplete users
(created_at >= cutoff) -> /onboarding; never while auth loading; existing
users exempt.
- Personalization: Slate default tab = prefs.sports[0]; preferred books glow in
the card lines grid (lib/books isPreferredBook, threaded dash->Slate->GameCard).
- Settings: PREFERENCES section loads + edits + saves sports/books/limit.
Backend 2156 -> 2185 tests (+29), 184 suites. Web build clean (exit 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 10:20:55 -04:00 |
|
builtbykev
|
8bc79f3c38
|
Session 42: Player Intelligence System — archetypes, stat strips, player profile, enhanced cards (2011 tests)
Built from the Claude Design "VYNDR Player Intelligence" bundle (10 sections).
- Archetypes: src/services/archetypeService.js — 41 archetypes (15 NBA / 5
WNBA-unique / 15 MLB / 6 soccer), classify -> primary+secondary+blend.
Frontend visual map web/src/lib/archetypes.js (colors verified == backend).
ArchetypeBadge (full/ghost/tint + glyphs) + ArchetypeBlend (DNA bar).
- StatStrip (compact/expanded): player name once, horizontal mono stats,
inline GradeBadge props, onPlayerClick -> profile.
- Stats API: extended src/routes/stats.js with /player/:name, /leaders,
/game/:id (rate-limited). Aggregation in playerIntelService.js (sanitizes
name param; grades cache; graceful on cold cache). Next proxies added.
- Player Profile /player/[name]: all 9 design sections, graceful empty states.
- Enhanced GameCard (MLB pitchers + player-grouped StatStrips) + GradeResultCard
(archetype strip + stat context + VYNDR intelligence, optional/self-hiding via
gradeAdapter.buildIntelFields). Player-name links wired everywhere.
- Settings page replaces the S41 redirect (account/subscription/notifications/
display/responsible-play/danger-zone with DELETE-gated delete). LINKS to the
real /settings/security MFA page — does not replace it. + BookChip.
- Bonus: Stats Explorer /explore (real /api/stats/leaders leaderboard); added
Explore + Settings to Nav MORE.
Deferred (need data pipelines, Session 43): Team Hub, Offseason Intel, Slate
redesign, Stats Explorer sub-panels.
Backend 1940 -> 2011 tests (+71), 157 suites. Web build clean (exit 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-18 11:12:24 -04:00 |
|