Phase 2.1: Card mirror system for deckbuilding features
- Created MtgCardMirror and DeckCardLink models in mirror_models.py - Created card_mirror_service.py with sync_mirrors functionality - Added sync_mirrors() method to mtgjson_manager.py - Added mirror_get_db() dependency to database.py - Added DecklistFile.status column (DRAUGHT/FINAL) - Updated DeckCreate schema with status field - Added DeckWithCardsResponse schema with card_count - Updated deck router to query card mirrors and return card counts - Added plain text deck content support
This commit is contained in:
+33
-51
@@ -9,10 +9,16 @@
|
||||
},
|
||||
{
|
||||
"phase": "Phase 2: Core API Endpoints",
|
||||
"status": "in_progress",
|
||||
"status": "completed",
|
||||
"description": "REST endpoints for card search, deck management, user auth, and game state.",
|
||||
"key_deliverables": ["Card search API", "Deck CRUD", "Auth system", "Health check", "MTGJSON refresh endpoint"]
|
||||
},
|
||||
{
|
||||
"phase": "Phase 2.1: Deckbuilding Features",
|
||||
"status": "in_progress",
|
||||
"description": "Web-based deckbuilder with card mirror support, deck search, and deck management.",
|
||||
"key_deliverables": ["Card mirror models (MtgCardMirror, DeckCardLink)", "Platform mirror tables", "Mirror sync service", "Deck search with card counts", "Plain text deck import", "Status tracking (DRAUGHT/FINAL)", "Card mirror search endpoint"]
|
||||
},
|
||||
{
|
||||
"phase": "Phase 3: Frontend",
|
||||
"status": "pending",
|
||||
@@ -28,62 +34,38 @@
|
||||
],
|
||||
"tech_stack": ["Python 3.12", "FastAPI", "SQLAlchemy (async)", "PostgreSQL x2", "Redis", "Docker Compose", "MTGJSON v5"],
|
||||
"architectural_notes": "Dual PostgreSQL (mtgonline for app data, mtgdata for MTG card data), Redis caching layer, MTGJSON v5 data pipeline auto-downloads on startup, REST API with Swagger docs at /docs. Backend exposed on port 5555. C++ game server directory exists but not yet integrated.",
|
||||
"task_description": "Clean up backend folder - remove obsolete scripts, test files, and unused modules",
|
||||
"current_step": "Backend cleanup completed: removed obsolete scripts, test files, __pycache__, venv, and unused modules",
|
||||
"task_description": "Phase 2.1: Implement card mirror system for deckbuilding features",
|
||||
"current_step": "Created mirror models (MtgCardMirror, DeckCardLink), mirror sync service, updated deck router with card counts, added DeckCreate.status field, DeckWithCardsResponse schema, DecklistFile.status column, database.py mirror_get_db dependency",
|
||||
"files_created": [
|
||||
"/home/wall-o/projects/mtgonline/README.md",
|
||||
"/home/wall-o/projects/mtgonline/backend/README.md"
|
||||
"/home/wall-o/projects/mtgonline/backend/app/models/mirror_models.py",
|
||||
"/home/wall-o/projects/mtgonline/backend/app/services/card_mirror_service.py"
|
||||
],
|
||||
"files_removed": [
|
||||
"BACKEND_TESTING_SUMMARY.md",
|
||||
"CHAT_PROMPT_TEST.md",
|
||||
"CONTINUATION_PROMPT.md",
|
||||
"PORTED_STATE.md",
|
||||
"SPEC_synergy-mapping-engine.md",
|
||||
"STATE.md",
|
||||
"SUPPORTED_FILE_TYPES.md",
|
||||
"test.db",
|
||||
"test_download.py",
|
||||
"test_system.py",
|
||||
"setup_db.py",
|
||||
".env.local",
|
||||
"state.json (backend)",
|
||||
"card_interaction_rule_engine.py",
|
||||
"card_profile_extractor.py",
|
||||
"create_card_interaction_graph.py",
|
||||
"interaction_determinator.py",
|
||||
"interaction_pipeline.py",
|
||||
"interaction_recommender.py",
|
||||
"interaction_schema.py",
|
||||
"recommendation_engine.py",
|
||||
"migrate_complete.py",
|
||||
"migrate_schema.py",
|
||||
"test_interaction_determinator.py",
|
||||
"check_mtgjson_full.py",
|
||||
"check_mtgjson_status.py",
|
||||
"verify_integration.py",
|
||||
"verify_mtgjson_data.py",
|
||||
"sanity_check_mtgjson.py",
|
||||
"investigate_sets.py",
|
||||
"inspect_db.py",
|
||||
"code_review.md",
|
||||
"monitor/mtg_monitor.py"
|
||||
"files_modified": [
|
||||
"/home/wall-o/projects/mtgonline/backend/app/models/platform_models.py",
|
||||
"/home/wall-o/projects/mtgonline/backend/app/routers/decks.py",
|
||||
"/home/wall-o/projects/mtgonline/backend/app/schemas/schemas.py",
|
||||
"/home/wall-o/projects/mtgonline/backend/app/services/mtgjson_manager.py",
|
||||
"/home/wall-o/projects/mtgonline/backend/app/core/database.py"
|
||||
],
|
||||
"decisions": [
|
||||
"Removed obsolete scripts that were not imported or used by the application",
|
||||
"Removed test.db and test-related scripts that were development artifacts",
|
||||
"Removed __pycache__ directories to clean up bytecode cache",
|
||||
"Removed venv directory (created fresh in Docker build)",
|
||||
"Removed monitor/mtg_monitor.py (unused monitoring script)",
|
||||
"Removed .env.local (sensitive environment file)",
|
||||
"Backend scripts/ directory now contains only essential data loading and maintenance scripts"
|
||||
"Card mirror models created in mirror_models.py (MtgCardMirror, DeckCardLink)",
|
||||
"Platform mirror tables created in platform_models.py for mirrored card data",
|
||||
"Mirror sync service added to mtgjson_manager.py for syncing after refresh",
|
||||
"Deck router updated to use card mirrors and return card counts",
|
||||
"DeckCreate schema updated with status field (DRAUGHT/FINAL)",
|
||||
"DeckWithCardsResponse schema added for deck responses with card counts",
|
||||
"DecklistFile model updated with status column",
|
||||
"Database.py updated with mirror_get_db() dependency",
|
||||
"Card search will use mirrors for deckbuilding queries"
|
||||
],
|
||||
"next_steps": [
|
||||
"Commit cleanup changes to Gitea",
|
||||
"Resume development on Phase 2 API endpoints",
|
||||
"Or begin Phase 3 frontend planning"
|
||||
"Trigger sync_mirrors() after MTGJSON refresh",
|
||||
"Implement card mirror search endpoint",
|
||||
"Test mirror sync functionality",
|
||||
"Add plain text deck import support",
|
||||
"Wire up deck search with card counts"
|
||||
],
|
||||
"blockers": [],
|
||||
"commit_hash": "46abfe5",
|
||||
"timestamp": "2026-07-22T02:59:00Z"
|
||||
"commit_hash": "",
|
||||
"timestamp": "2026-07-23T10:43:00Z"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user