Commit Graph
17 Commits
Author SHA1 Message Date
akadmin c23f88cd41 feat: complete deckbuilding feature with local card mirror
- Add MtgonlineCard model (local card data mirror in mtgonline DB)
- Create user_deck.py models (UserDeck, UserDeckCard, DeckPrecedent, CardSuggestion)
- Create user_deck_schemas.py with Pydantic schemas
- Update decks.py router to use local MtgonlineCard instead of cross-DB MtgCard
- Add migration 002 (user deck building tables)
- Add migration 003 (mtgonline_cards table)
- All card lookups now use local mirror for fast queries
- No cross-DB joins in deckbuilding endpoints
2026-07-24 04:42:22 +00:00
akadmin 356c2121b2 chore: update state.json with latest commit hash 2026-07-23 03:30:16 +00:00
akadmin 6b38ef07ee chore: update state.json with latest commit hash 2026-07-23 03:30:06 +00:00
akadmin c9bb68c6bc docs: update HANDOFF.md and ROADMAP.md with user data schema progress
- Handoff.md: document 16-table user data schema, Alembic migrations,
  and all API endpoints (replays, cards, groups, networks, preferences, activity)
- Handoff.md: consolidate state.json reference to project root
- Roadmap.md: restructure phases to reflect completed work
  Phase 1: Backend Foundation (complete)
  Phase 2: User Data Schema & API (complete) - 16 tables, 7 routers
  Phase 3: Frontend Development (complete)
  Phase 4: Testing & Deployment (pending)
2026-07-23 03:30:00 +00:00
akadmin 2c74a107bc 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
2026-07-22 03:35:57 +00:00
akadmin a01e33eb5e Clean up backend folder - remove obsolete scripts and test files
Removed obsolete scripts that were not imported or used:
- 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

Removed test artifacts:
- test.db
- test_download.py
- test_system.py
- setup_db.py
- 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

Removed sensitive/environment files:
- .env.local
- state.json (backend)

Cleaned up:
- __pycache__ directories
- venv directory

Backend scripts/ directory now contains only essential data loading and maintenance scripts.
2026-07-22 03:00:04 +00:00
akadmin 2872c562ac Finalize state.json after project completion 2026-07-21 03:55:47 +00:00
akadmin 46abfe5fbc Add comprehensive documentation for MTG Online Backend
- Updated root README with current architecture (dual PostgreSQL, Redis, MTGJSON pipeline)
- Created backend/README.md with detailed architecture, database setup, and troubleshooting
- Updated state.json to reflect completed documentation phase
2026-07-21 03:50:44 +00:00
akadmin 90822d48c4 Fix MTGJSON download functionality
- Add refresh router with admin-only endpoints
- Fix _decompress_file to handle .psql files correctly
- Fix duplicate imports in mtgjson_manager.py
- Mount refresh router in main.py
- Add download_mtgjson.py standalone script
- Add SUPPORTED_FILE_TYPES.md documentation
2026-07-21 02:58:37 +00:00
akadmin 6a9d90c3b5 Update state.json for full deployment review 2026-07-20 21:48:44 +00:00
akadmin 3fae593a22 Fix MTGJSON download: use .json files, remove gzip unpacking
- Changed REQUIRED_FILES to REQUIRED_JSON_FILES and REQUIRED_ZIP_FILES
- AllSetFiles.zip kept as zip (only available compressed on MTGJSON)
- All other files downloaded as .json (no compression)
- Removed gzip import and unpacking logic for .gz files
- Updated EXPECTED_MIN_SIZES to reflect actual .json file sizes
- Removed validation for non-existent files
2026-07-20 13:59:45 +00:00
akadmin ad2742c1cf Fix MTGJSON download: use .gz URLs and handle pre-uncompressed files 2026-07-20 04:46:15 +00:00
akadmin 65a1f95b7f Save state and update project documentation 2026-07-20 04:39:46 +00:00
akadmin 20fb57258b Increase download timeout to 60 minutes for large MTGJSON files 2026-07-20 04:38:53 +00:00
akadmin d347e0e586 Double all timeout values to prevent download/upsert timeouts 2026-07-20 04:37:31 +00:00
akadmin 0643544327 Update state.json for sanity check implementation 2026-07-20 03:56:32 +00:00
akadmin f722d7ab62 chore: update state.json with deployment information 2026-07-20 03:20:24 +00:00