Mantimon TCG - Monster collecting trading card game
Phase 1 Database Implementation (DB-001 through DB-012): Models: - User: OAuth support (Google/Discord), premium subscriptions - Collection: Card ownership with CardSource enum - Deck: JSONB cards/energy_cards, validation state - CampaignProgress: One-to-one with User, medals/NPCs as JSONB - ActiveGame: In-progress games with GameType enum - GameHistory: Completed games with EndReason enum, replay data Infrastructure: - Alembic migrations with sync psycopg2 (avoids async issues) - Docker Compose for Postgres (5433) and Redis (6380) - App config with Pydantic settings - Redis client helper Test Infrastructure: - 68 database tests (47 model + 21 relationship) - Async factory pattern for test data creation - Sync TRUNCATE cleanup (solves pytest-asyncio event loop mismatch) - Uses dev containers instead of testcontainers for reliability Key technical decisions: - passive_deletes=True for ON DELETE SET NULL relationships - NullPool for test sessions (no connection reuse) - expire_on_commit=False with manual expire() for relationship tests |
||
|---|---|---|
| backend | ||
| docs | ||
| AGENTS.md | ||
| PROJECT_PLAN.md | ||
Mantimon TCG Documentation
Active Documentation
| File | Description |
|---|---|
ARCHITECTURE.md |
Technical architecture overview covering frontend (Vue+Phaser), backend (FastAPI), database schema, real-time communication, game engine design, and offline fork considerations. |
GAME_RULES.md |
Game rules document defining campaign structure, base ruleset, energy system, deck building, win conditions, turn structure, card types, and status conditions. |
Legacy Documentation
Historical documents from completed development phases, preserved for reference.
| File | Description |
|---|---|
legacy/SYSTEM_REVIEW.md |
Comprehensive code review of the core game engine (Jan 2026). Identified 15 issues across models, effects, and engine - all resolved. 826 tests passing. |
legacy/PROJECT_PLAN_ENERGY_EVOLUTION.md |
Implementation plan for energy/tool attachment refactor and evolution stack system. Changed attached_energy/attached_tools from list[str] to list[CardInstance]. Completed Jan 2026. |