Commit Graph

138 Commits

Author SHA1 Message Date
Cal Corum
c45fae8c57 Add CardBack tests - TEST-015 complete (25 tests)
Quick win #1: Test coverage for CardBack game object

Tests cover:
- Constructor with sprite (texture exists)
- Constructor with fallback graphics (texture missing)
- Initial positioning and sizing
- setCardSize() for all sizes (small, medium, large)
- setSize() alias for method chaining
- getDimensions() returns correct values
- Fallback graphics rendering (background, border, pattern, emblem)
- destroy() cleanup for both sprite and graphics paths
- Integration tests for full lifecycle

Results:
- 25 new tests, all passing
- CardBack coverage: 0% → ~95%
- Game engine coverage starting point established
- Phaser mocking pattern validated

All tests pass (1025/1025)
2026-02-02 15:37:21 -06:00
Cal Corum
0d416028c0
Fix prize zone rendering in Mantimon TCG mode (#2)
* Fix hand card rotation direction

Cards now fan outward correctly instead of curling inward

* Update StateRenderer to require MatchScene type for type safety

- Change constructor parameter from Phaser.Scene to MatchScene
- Update scene property type to MatchScene
- Add import for MatchScene type
- Update JSDoc example to reflect type-safe constructor

* Defer Board creation to StateRenderer for correct rules config

- Make board property nullable (Board | null instead of Board?)
- Remove Board and createBoard imports (now handled by StateRenderer)
- Update setupBoard() to skip Board creation
- Add setBoard() method for StateRenderer to call
- Update clearBoard() to use null instead of undefined
- Add JSDoc explaining why Board creation is deferred

* Create Board in StateRenderer with correct layout options

- Add Board and createBoard imports
- Add board property to StateRenderer
- Create Board in render() on first call with correct rules_config
- Add debug logging for Board creation and zone creation
- Update clear() to destroy Board when clearing
- Board now created after we have rules_config from first state

* Add fatal error handling with toast notification and auto-redirect

- Add 'fatal-error' event to GameBridgeEvents type
- Import and initialize useToast in GamePage
- Listen for 'fatal-error' event from Phaser
- Show error toast that persists until redirect
- Show full-screen fatal error overlay with countdown
- Auto-redirect to /play after 3 seconds
- Update StateRenderer to emit 'fatal-error' when Board creation fails

* Gate debug logging with DEV flag

- Add DEBUG_RENDERER constant gated by import.meta.env.DEV
- Update all console.log statements in StateRenderer to only log in development
- Keep console.error and console.warn as they are (always show errors)
- Debug logs now only appear during development, not in production

* Fix code audit issues - add missing imports and improve error UX

Critical fixes:
- Add missing gameBridge import to StateRenderer (fixes runtime error in fatal error handler)
- Add missing Board type import to MatchScene (fixes TypeScript compilation error)

UX improvements:
- Replace fatal error auto-redirect with manual 'Return to Menu' button
- Add toast notification when resignation fails
- Give users unlimited time to read fatal errors before returning

Addresses issues found in frontend code audit:
- errors.missing-import (StateRenderer.ts:166)
- errors.missing-type-import (MatchScene.ts:84)
- errors.catch-only-console (GamePage.vue:145)
- architecture.missing-fatal-error-handling (GamePage.vue:261)

* Add CONTRIBUTING policy and fix pre-existing lint/test errors

- Add CONTRIBUTING.md with strict policy: never use --no-verify without approval
- Add comprehensive testing documentation (TESTING.md, VISUAL-TEST-GUIDE.md)
- Add test-prize-fix.md quick test checklist and verify-fix.sh script

Lint fixes (enables pre-commit hooks):
- Remove unused imports in 9 files
- Fix unused variables (underscore convention)
- Replace 'as any' type assertions with proper VisibleGameState types
- Add missing CARD_WIDTH_MEDIUM import in layout.spec.ts
- All ESLint errors now resolved (only acceptable warnings remain)

Test fixes (all 1000 tests now passing):
- Fix layout.spec.ts: Add missing CARD_WIDTH_MEDIUM import
- Fix PlayPage.spec.ts: Update test to use actual hardcoded UUIDs
- Fix useAuth.spec.ts: Mock API profile fetch in initialization tests
- Fix PhaserGame.spec.ts: Add scenes export to mock and update createGame call expectations

This ensures pre-commit hooks work properly going forward and prevents
bypassing TypeScript/lint checks that catch errors early.

* Add comprehensive test coverage improvement plan

- Create PROJECT_PLAN_TEST_COVERAGE.json with 25 structured tasks
- Create TEST_COVERAGE_PLAN.md with executive summary and roadmap
- Plan addresses critical gaps: game engine (0%), WebSocket (27%)
- 6-week roadmap to reach 85% coverage from current 63%
- Target: Phase 1 (weeks 1-3) - critical game engine and network tests
- Includes quick wins, production blockers, and success metrics

Based on coverage analysis showing:
- Strong: Composables (84%), Components (90%), Stores (88%)
- Critical gaps: Phaser game engine (~5,500 untested lines)
- High priority: WebSocket/multiplayer reliability

See TEST_COVERAGE_PLAN.md for overview and week-by-week breakdown.

* Add coverage tooling and ignore coverage directory

- Add @vitest/coverage-v8 package for coverage analysis
- Add coverage/ directory to .gitignore
- Used during test coverage analysis for PROJECT_PLAN_TEST_COVERAGE.json
2026-02-02 15:30:27 -06:00
Cal Corum
b47da20b7f Fix stale hasStarterDeck causing redirect to /starter
- Always fetch user profile during app init to get fresh hasStarterDeck status
- Verify with API when local state shows no starter (handles stale localStorage data)
- Clear starter status cache when user data is set
2026-02-02 11:23:40 -06:00
Cal Corum
8a416c8ace
Merge pull request #1 from calcorum/claude/honor-rules-config-3ZRDG
Honor RulesConfig for prize cards vs points in frontend game board
2026-02-02 10:53:10 -06:00
Claude
42e0116aec
Add conditional energy deck zone based on RulesConfig
Extends RulesConfig support in the frontend game board to conditionally
render energy deck zones based on deck.energy_deck_enabled setting.
When disabled (classic mode), energy zones are null and omitted from
the layout, saving screen space.

Changes:
- Add energyDeckEnabled option to LayoutOptions interface
- Update landscape/portrait layouts to conditionally generate energy zones
- Make myEnergyZone/oppEnergyZone nullable in BoardLayout type
- Update StateRenderer to conditionally create and update energy zones
- Add energyDeckEnabled computed property to game store
- Add 7 tests for conditional energy deck rendering

https://claude.ai/code/session_01AAxKmpq2AGde327eX1nzUC
2026-02-02 09:41:25 +00:00
Claude
c430a43e19
Add configurable bench size based on RulesConfig
Extends the RulesConfig support in the frontend game board to also
honor the bench.max_size setting:

- Add benchSize option to LayoutOptions interface
- Update calculateLandscapeLayout to use configurable bench count
- Update calculatePortraitLayout to use configurable bench count
- Update StateRenderer to pass benchSize from rules_config.bench.max_size
- Add benchSize computed property to game store
- Add 7 tests for configurable bench size behavior

The layout now generates the correct number of bench slots based on
the rules config (defaults to 5 for backwards compatibility). Bench
slots remain horizontally centered regardless of count.

https://claude.ai/code/session_01AAxKmpq2AGde327eX1nzUC
2026-02-02 09:28:17 +00:00
Claude
7885b272a4
Honor RulesConfig for prize cards vs points in frontend game board
The game board now conditionally renders prize card zones based on
the RulesConfig sent from the backend:

- Add rules_config field to VisibleGameState in backend (visibility.py)
- Add rules_config to frontend game types and game store
- Update layout.ts to accept LayoutOptions with usePrizeCards and prizeCount
- Update StateRenderer to conditionally create PrizeZone objects
- Update Board to handle empty prize position arrays gracefully
- Add game store computed properties: rulesConfig, usePrizeCards, prizeCount
- Add tests for conditional prize zone rendering

When use_prize_cards is false (Mantimon TCG points system), the prize
zones are not rendered, saving screen space. When true (classic Pokemon
TCG mode), the correct number of prize slots is rendered based on
the rules config's prize count.

https://claude.ai/code/session_01AAxKmpq2AGde327eX1nzUC
2026-02-02 09:22:44 +00:00
Cal Corum
1a21d3d2d4 Add Phase F4 live gameplay project plan
- Document Phase F4 implementation tasks
- Track progress on live gameplay features
- Define component structure and requirements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:52:20 -06:00
Cal Corum
f1b2647306 Add energy type color utilities
- Map energy types to Tailwind color classes
- Support UI styling based on energy type

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:52:13 -06:00
Cal Corum
926dd3732b Add WebSocket message types and related tests
- Add complete WebSocket message type definitions
- Add game action types (PlayCard, Attack, EndTurn, etc.)
- Add client/server message schemas
- Add tests for types and store
- Add PlayPage tests

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:52:07 -06:00
Cal Corum
413caa86d0 Add game-related Vue composables
- Add useGameSocket for WebSocket connection management
- Add useGameActions for dispatching game actions
- Add useGames for fetching active games list
- Include comprehensive tests
- Type-safe action dispatch with precondition checks

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:58 -06:00
Cal Corum
97ddc44336 Add Phase F4 game UI overlay components
- Add TurnIndicator to show current turn and phase
- Add AttackMenu for selecting Pokemon attacks
- Add GameOverlay container for positioning UI over Phaser
- Add GameOverModal for end-game display
- Add ForcedActionModal for required player actions
- Add PhaseActions for phase-specific buttons
- Include component tests

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:51 -06:00
Cal Corum
8ad7552ecc Add HandManager for card interaction handling
- Implement drag-and-drop for cards in hand
- Add click handlers for card actions
- Validate drop zones based on game state
- Enable/disable interactions based on turn

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:43 -06:00
Cal Corum
a963eb70d3 Add Phaser game asset placeholders
- Add board background placeholder
- Add type icons (fire, water, grass, lightning, psychic, etc.)
- Add UI elements (damage counter, zone highlight)
- Prevent missing asset errors in Phaser

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:35 -06:00
Cal Corum
76e15187d0 Add energy type placeholder images
- Add fire, water, grass, lightning, psychic energy icons
- Add card_back directory with placeholder
- Support UI display of energy types

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:29 -06:00
Cal Corum
9f2ac7146b Update frontend project plan progress
- Mark completed tasks in Phase F4
- Track live gameplay implementation progress

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:19 -06:00
Cal Corum
c274ff6d3a Update Vite config for test environment
- Add environment-specific configuration
- Support test mode setup

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:12 -06:00
Cal Corum
594aa2d8ad Add card back placeholder image
- Add card_back.webp for Phaser to load
- Prevents missing asset errors in game rendering

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:51:05 -06:00
Cal Corum
0af5d32cfe Update GamePage tests for new WebSocket composable
- Replace direct socket client usage with useGameSocket
- Update test expectations for composable-based architecture
- Fix mocking for new component structure

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:50:57 -06:00
Cal Corum
40a2cd34d9 Hardcode Bob's user and deck IDs for game creation testing
- Replace placeholder UUIDs with Bob's actual IDs
- Enables testing game creation flow
- Temporary fix until matchmaking endpoint is implemented

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:50:50 -06:00
Cal Corum
c0194b77eb Add WebSocket client and game store infrastructure
- Extend socket client with heartbeat handling
- Add game store computed properties and state management
- Add ConnectionStatus and game-related types
- Support turn phase, game over, and connection tracking

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:50:43 -06:00
Cal Corum
a20e97a0a0 Add card click event handling in GamePage
- Listen for card:clicked events from Phaser
- Log card clicks to console for debugging
- Add TODO for implementing game action logic based on phase

Cards now respond to clicks and emit events to Vue layer.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:50:35 -06:00
Cal Corum
fdb5225356 Improve API error handling for validation errors
- Parse FastAPI 422 validation error arrays into readable messages
- Update ErrorResponse type to handle both string and array detail
- Use inline type for validation error objects (no any)
- Display field-level validation errors instead of [object Object]

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 20:50:03 -06:00
Cal Corum
52c8edcf93 Fix WebSocket game:join to emit game:state event
Backend was returning the state but not emitting the game:state
event that the frontend listens for. Added explicit emit call
to send game:state to the client after successful join.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 12:27:01 -06:00
Cal Corum
c594f0c8f8 Add lessons learned README for frontend POC 2026-01-31 22:06:10 -06:00
Cal Corum
dc06a93e2e Move older frontend-poc to .claude/f0-frontend-poc/
This is an earlier POC version (pre-F3 demo) preserved for reference.
2026-01-31 22:02:22 -06:00
Cal Corum
8685e3e16e Archive frontend POC to .claude/frontend-poc/
Preserves the working F3 Phaser demo implementation before resetting
the main frontend/ directory for a fresh start. The POC demonstrates:
- Vue 3 + Phaser 3 integration
- Real card rendering with images
- Vue-Phaser state sync via gameBridge
- Card interactions and damage counters

To restore: copy .claude/frontend-poc/ back to frontend/ and run npm install
2026-01-31 22:00:51 -06:00
Cal Corum
2986eed142 Add F3 demo page with real card data and fix Phaser initialization
- Add /demo route with full game board demo using real card images
- Fix PhaserGame.vue to pass scenes array to createGame()
- Fix timing issue: listen for gameBridge ready event instead of Phaser core ready
- Add card images for Lightning and Fire starter decks (24 Pokemon + 5 energy)
- Add mockGameState.ts with realistic Lightning vs Fire matchup
- Add demoCards.json/ts with card definitions from backend
- Update Card.ts to use image_path from card definitions
- Add loadCardImageFromPath() to asset loader for new image format
- Update CardDefinition type with image_path and rarity fields

Demo verifies: Vue-Phaser state sync, card rendering, damage counters,
card click events, and debug controls. Layout issues noted for Phase F4.
2026-01-31 21:58:26 -06:00
Cal Corum
f759d56d4d Add .opencode/ to gitignore 2026-01-31 15:56:27 -06:00
Cal Corum
059536a42b Implement frontend phases F1-F3: auth, deck management, Phaser integration
Phase F1 - Authentication:
- OAuth callback handling with token management
- Auth guards for protected routes
- Account linking composable
- Profile page updates

Phase F2 - Deck Management:
- Collection page with card filtering and display
- Decks page with CRUD operations
- Deck builder with drag-drop support
- Collection and deck Pinia stores

Phase F3 - Phaser Integration:
- Game bridge composable for Vue-Phaser communication
- Game page with Phaser canvas mounting
- Socket.io event types for real-time gameplay
- Game store with match state management
- Phaser scene scaffolding and type definitions

Also includes:
- New UI components (ConfirmDialog, EmptyState, FilterBar, etc.)
- Toast notification system
- Game config composable for dynamic rule loading
- Comprehensive test coverage for new features
2026-01-31 15:43:56 -06:00
Cal Corum
50bd3f1591 Add config API endpoint for frontend game settings
Expose game configuration (energy types, card types, rule constants) via
/api/config endpoint so frontend can dynamically load game rules without
hardcoding values.
2026-01-31 15:43:41 -06:00
Cal Corum
aee7ad64b4 Add card images for sets a1 and a1a
Add ~90 card artwork webp files and a MISSING_IMAGES.json tracking file
for cards still needing artwork.
2026-01-31 15:43:29 -06:00
Cal Corum
d1862295e6 Update card JSON data with rarity_tier field
Add rarity_tier to all card definitions in sets a1 and a1a to support
the new pull rate calculation system for booster packs.
2026-01-31 15:43:19 -06:00
Cal Corum
1123d61067 Extend core card models with rarity tiers and card subtypes
Add CardRarityTier enum for pull rate calculations (common through
crown_rare). Add CardSubtype enum for Pokemon classifications (basic,
stage1, stage2, ex, etc.). Update CardDefinition model with new fields
for subtypes and rarity display.
2026-01-31 15:43:07 -06:00
Cal Corum
7b79f02124 Add project-specific skills reference to CLAUDE.md
Document local skill files in .claude/skills/ so they are discoverable
when invoking /backend-phase, /frontend-phase, /code-audit,
/frontend-code-audit, and /dev-server commands.
2026-01-31 15:40:37 -06:00
Cal Corum
6bfc928169 Refactor user store to use apiClient instead of direct fetch
- Replace manual fetch calls with apiClient.get() and apiClient.patch()
- Remove manual token handling (apiClient handles this automatically)
- Add typed UserProfileResponse interface for API response
- Improve error handling with ApiError type checking
- Gains automatic token refresh on 401 with retry logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 00:36:42 -06:00
Cal Corum
ca3aca2b38 Add has_starter_deck to user profile API response
The frontend routing guard checks has_starter_deck to decide whether to
redirect users to starter selection. The field was missing from the API
response, causing authenticated users with a starter deck to be
incorrectly redirected to /starter on page refresh.

- Add has_starter_deck computed property to User model
- Add has_starter_deck field to UserResponse schema
- Add unit tests for User model properties
- Add API tests for has_starter_deck in profile response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 23:14:04 -06:00
Cal Corum
cd3efcb528 Implement ProfilePage and profanity filter for display names (F1-006)
ProfilePage implementation:
- Full profile page with avatar, editable display name, session count
- LinkedAccountCard and DisplayNameEditor components
- useProfile composable wrapping user store operations
- Support for linking/unlinking OAuth providers
- Logout and logout-all-devices functionality

Profanity service with bypass detection:
- Uses better-profanity library for base detection
- Enhanced to catch common bypass attempts:
  - Number suffixes/prefixes (shit123, 69fuck)
  - Leet-speak substitutions (sh1t, f@ck, $hit)
  - Separator characters (s.h.i.t, f-u-c-k)
- Integrated into PATCH /api/users/me endpoint
- 17 unit tests covering all normalization strategies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:06:42 -06:00
Cal Corum
3cc8d6645e Implement auth composables and starter selection (F1-003, F1-004, F1-005)
Features:
- Add useAuth composable with OAuth flow and token management
- Add useStarter composable with API integration and dev mock fallback
- Implement app auth initialization blocking navigation until ready
- Complete StarterSelectionPage with 5 themed deck options

Bug fixes:
- Fix CORS by adding localhost:3001 to allowed origins
- Fix OAuth URL to include redirect_uri parameter
- Fix emoji rendering in nav components (use actual chars, not escapes)
- Fix requireStarter guard timing by allowing navigation from /starter
- Fix starter "already selected" detection for 400 status code

Documentation:
- Update dev-server skill to use `docker compose` (newer CLI syntax)
- Update .env.example with port 3001 in CORS comment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:36:14 -06:00
Cal Corum
f687909f91 Implement OAuth callback with token handling and profile fetch (F1-002)
Complete the AuthCallbackPage to handle OAuth redirects by parsing tokens
from URL fragment, fetching user profile, and redirecting based on starter
deck status. Includes open-redirect protection and comprehensive tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:39:18 -06:00
Cal Corum
09844cbf3f Add dev-server skill and update development ports
- Add /dev-server skill with preflight checks for environment, deps,
  ports, and services before starting frontend/backend
- Add /frontend-phase skill for tracking implementation phases
- Register skills in .claude/settings.json
- Update .env.development ports (8001 for API, 3001 for frontend)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:56:25 -06:00
Cal Corum
913b1e7eae Fix audit issues: OAuth login, remove dead code, add error boundary
Code audit fixes:
- Update LoginPage for OAuth (Google/Discord buttons, no password)
- Delete RegisterPage.vue (OAuth-only app)
- Delete AppHeader.vue (superseded by NavSidebar, had bugs)
- Add ErrorBoundary component for graceful error handling

Also adds Phase F1 (Authentication Flow) plan with 10 tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:42:26 -06:00
Cal Corum
0dc52f74bc Add app shell with layouts and navigation (F0-007)
Create responsive layout system based on route meta:
- DefaultLayout: sidebar (desktop) / bottom tabs (mobile)
- MinimalLayout: centered content for auth pages
- GameLayout: full viewport for Phaser game

Navigation components:
- NavSidebar: desktop sidebar with main nav + user menu
- NavBottomTabs: mobile bottom tab bar

UI components (tied to UI store):
- LoadingOverlay: full-screen overlay with spinner
- ToastContainer: stacked notification toasts

Also adds Vue Router meta type declarations.

Phase F0 is now complete (8/8 tasks).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:26:15 -06:00
Cal Corum
3a566ffd5a Add Socket.IO client with typed game events (F0-006)
- Create typed event interfaces for game namespace
- Add full game state types (GameState, Card, CardInPlay, etc.)
- Implement connection manager singleton with auth
- Add auto-reconnection with exponential backoff
- Provide helper methods for game actions (joinGame, sendAction, etc.)
- Add typed event subscription helpers with unsubscribe

Phase F0 progress: 7/8 tasks complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:15:17 -06:00
Cal Corum
0720084cb1 Add typed API client with auth and error handling (F0-005)
- Create ApiError class with status helpers (isNotFound, etc.)
- Create typed fetch wrapper with get/post/put/patch/delete methods
- Auto-inject Authorization header from auth store
- Handle 401 with automatic token refresh and retry
- Add query parameter support and proper URL building
- Add comprehensive tests (11 tests)

Phase F0 progress: 6/8 tasks complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:11:11 -06:00
Cal Corum
f63e8be600 Add Pinia stores for auth, user, and UI (F0-004)
- Refactor auth store for OAuth flow (access/refresh tokens)
- Add token refresh logic and expiry tracking
- Create user store for profile data and linked accounts
- Create UI store for loading overlay, toasts, and modals
- Update router guard tests for new auth store structure
- Add comprehensive tests (45 total passing)

Phase F0 progress: 5/8 tasks complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:07:25 -06:00
Cal Corum
5424bf9086 Add environment config and Vue Router with guards (F0-003, F0-008)
- Add environment configuration with type-safe config.ts
- Implement navigation guards (requireAuth, requireGuest, requireStarter)
- Update router to match sitePlan routes and layouts
- Create placeholder pages for all sitePlan routes
- Update auth store User interface for OAuth flow
- Add phase plan tracking for F0

Phase F0 progress: 4/8 tasks complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:59:04 -06:00
Cal Corum
25cb22eb84 Rename AGENTS.md to CLAUDE.md, add root .gitignore
- Rename project instructions file to Claude Code standard name
- Add .gitignore to exclude IDE files and frontend-poc/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:24:48 -06:00
Cal Corum
b9b803da66 Scaffold Vue 3 + TypeScript frontend (Phase F0)
Vue 3 with Composition API, Pinia, Vue Router, Tailwind v4:
- Vite build with @/ path aliases and backend proxy
- TypeScript strict mode with proper type imports
- Pinia stores (auth, game) with setup syntax and persistence
- Vue Router with auth guards and lazy-loaded routes
- Tailwind v4 with custom theme (Pokemon types, dark UI)
- Vitest configured for component testing
- ESLint v9 flat config with Vue/TypeScript support

Pages: Home, Login, Register, Campaign, Collection, DeckBuilder, Match
Components: AppHeader with auth-aware navigation
Types: Card, GameState, Player, Deck, Campaign types

Also adds frontend-code-audit skill with patterns for:
- Error handling (unhandled promises, empty catches)
- Security (XSS, token storage, input validation)
- Architecture (Composition API, Pinia patterns, Phaser rules)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:23:53 -06:00
Cal Corum
5b12df0cb1 Add backend API reference to frontend CLAUDE.md
- REST endpoints for auth, users, collections, decks, games
- WebSocket events (client→server and server→client)
- Key backend files to reference
- Type definitions to mirror from backend schemas

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:24:34 -06:00