mantimon-tcg/backend/app/repositories/postgres/__init__.py
Cal Corum 58349c126a Phase 3: Collections + Decks - Services and DI architecture
Implemented with Repository Protocol pattern for offline fork support:
- CollectionService with PostgresCollectionRepository
- DeckService with PostgresDeckRepository
- DeckValidator with DeckConfig + CardService injection
- Starter deck definitions (5 types: grass, fire, water, psychic, lightning)
- Pydantic schemas for collection and deck APIs
- Unit tests for DeckValidator (32 tests passing)

Architecture follows pure dependency injection - no service locator patterns.
Added CLAUDE.md documenting DI requirements and patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:27:14 -06:00

28 lines
817 B
Python

"""PostgreSQL repository implementations for Mantimon TCG.
This package contains PostgreSQL-specific implementations of the repository
protocols. These implementations use SQLAlchemy async sessions for database
access.
Usage:
from app.repositories.postgres import (
PostgresCollectionRepository,
PostgresDeckRepository,
)
# Create repository with database session
collection_repo = PostgresCollectionRepository(db_session)
deck_repo = PostgresDeckRepository(db_session)
# Use via service layer
service = CollectionService(collection_repo)
"""
from app.repositories.postgres.collection import PostgresCollectionRepository
from app.repositories.postgres.deck import PostgresDeckRepository
__all__ = [
"PostgresCollectionRepository",
"PostgresDeckRepository",
]