mantimon-tcg/CLAUDE.md
Cal Corum 1c30d3fe56 Optimize CLAUDE.md from 408 to 54 lines
Remove full code style guide with examples, architecture code blocks, game engine
patterns, and testing examples. Keep commands, critical rules, and architecture summary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 08:31:08 -06:00

2.2 KiB

Mantimon TCG

Pokemon TCG-inspired web app with single-player RPG campaign mode. Home-rule-modified rules.

Project Skills

Command Description
/backend-phase Manage phased backend development
/frontend-phase Manage phased frontend development
/code-audit Audit backend Python code
/frontend-code-audit Audit frontend Vue/TypeScript/Phaser code
/dev-server Start/stop/status the dev environment

Skills in .claude/skills/ — read the SKILL.md before executing.

Commands

# Frontend
cd frontend && npm run dev          # Dev server
cd frontend && npm run test         # Vitest
cd frontend && npm run lint         # ESLint
cd frontend && npm run typecheck    # TypeScript

# Backend (all via uv)
cd backend && uv run uvicorn app.main:app --reload  # Dev server
cd backend && uv run pytest         # Tests
cd backend && uv run pytest -x      # Stop on first failure
cd backend && uv run black app tests && uv run ruff check .  # Format + lint
cd backend && uv run mypy app       # Type check

Code Style

  • Line length: 100 chars
  • Indentation: 2 spaces (frontend), 4 spaces (backend)
  • Use import type for type-only TS imports, @/ alias for local imports
  • Python: type hints required on all function signatures

Architecture

  • Frontend: Vue 3 + Phaser 3 (game canvas). Communication via event bridge (phaserGame.events.emit/on)
  • Backend: FastAPI + PostgreSQL + Redis + Socket.io. Service layer pattern — never bypass services for DB access
  • Game Engine (app/core/): Must stay decoupled from DB/network (forkable for offline mode). No imports from app.services, app.api, or SQLAlchemy in core.

Critical Rules

  1. Never commit without user approval. Never commit directly to main.
  2. Hidden info: Never send deck contents, opponent hand, or unrevealed prizes to client
  3. All game logic server-side. Client sends intentions, server validates.
  4. Test docstrings required explaining "what" and "why"
  5. Phaser scenes handle rendering only — game logic lives in backend
  6. app/core/ imports only from app.core.* — see docs/ARCHITECTURE.md#offline-standalone-fork