Complete architecture simplification: 54+ files → 37 files
- Removed 11 duplicate router files (auth.py, users.py, decks.py, card_router.py, interactions.py, user_data.py, rooms.py, games/router.py, refresh.py, card_import.py, ws.py) - Removed duplicate core files (logging_config.py, settings.py) - Removed unused services (card_mirror_service.py, mtgjson_loader.py, mtgjson_uploader.py) - Removed unused schemas (proto_messages.py, protocol_constants.py) - Created run.py startup script for simple execution - Created app/core/config.py for unified configuration management - Created app/core/logging.py for logging configuration - Consolidated routers into 6 focused files (auth_router.py, users_router.py, decks_router.py, cards_router.py, user_data_router.py, games_router.py) - Updated all imports to use consolidated model paths - Added backward compatibility aliases in database.py - Created SIMPLIFICATION_SUMMARY.md documentation Architecture improvements: - Single unified database engine with auto-detection (SQLite/PostgreSQL) - Consolidated models into 2 files (models.py, mtg_models.py) - Clean router structure with one file per domain - Simplified configuration with sensible defaults - SQLite by default for development, PostgreSQL for production Testing: - All imports verified working - App loads successfully - Ready for development and testing
This commit is contained in:
@@ -3,29 +3,27 @@ Router package exports.
|
||||
|
||||
All routers are mounted in app/main.py.
|
||||
This package provides centralized access to all router modules.
|
||||
|
||||
## Consolidated Routers (Phase 3 Simplification)
|
||||
- auth_router.py - Authentication endpoints
|
||||
- users_router.py - User management + admin operations
|
||||
- decks_router.py - Deck building and management
|
||||
- cards_router.py - Card data search and interactions
|
||||
- user_data_router.py - User data, sessions, and card imports
|
||||
- games_router.py - Room management, games, and MTGJSON refresh
|
||||
"""
|
||||
from app.routers import auth
|
||||
from app.routers import users
|
||||
from app.routers import decks
|
||||
from app.routers import rooms
|
||||
from app.routers import games
|
||||
from app.routers import admin
|
||||
from app.routers import card_router
|
||||
from app.routers import interactions
|
||||
from app.routers import refresh
|
||||
from app.routers import card_import
|
||||
from app.routers import user_data
|
||||
from app.routers import auth_router
|
||||
from app.routers import users_router
|
||||
from app.routers import decks_router
|
||||
from app.routers import cards_router
|
||||
from app.routers import user_data_router
|
||||
from app.routers import games_router
|
||||
|
||||
__all__ = [
|
||||
"auth",
|
||||
"users",
|
||||
"decks",
|
||||
"rooms",
|
||||
"games",
|
||||
"admin",
|
||||
"card_router",
|
||||
"interactions",
|
||||
"refresh",
|
||||
"card_import",
|
||||
"user_data",
|
||||
"auth_router",
|
||||
"users_router",
|
||||
"decks_router",
|
||||
"cards_router",
|
||||
"user_data_router",
|
||||
"games_router",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user