How pierrebdl/ma_collection_jeux_videos works
Ma Collection is a React/TypeScript game-collection app backed by a FastAPI API and PostgreSQL. Users browse and filter the catalog, open game details, register or log in, then manage favorites and their status, ratings, and comments; collection statistics summarize that data. The graph preserves the documented theme and navigation features as well. Backend route-to-service links and frontend page composition are supported by the source index; database operations are visible in sampled service code. Some frontend/API request wiring and unsampled feature implementations are represented only where documented.
Main entry points: App.tsx Page routes · database.py DB session · RequestsDb.tsx API requests · LoginPage.tsx Account pages
Components 24
Web application
- Page routes
web/src/App.tsx - Shared layout
web/src/pages/CommonPage.tsx - Catalog search
web/src/components/SearchBar.tsx - Game pages
web/src/pages/DetailsPage.tsx - Library view
web/src/components/Library.tsx - Collection stats
web/src/pages/StatsPage.tsx - Account pages
web/src/pages/LoginPage.tsx - API requests
web/src/hooks/RequestsDb.tsx - Auth state
web/src/hooks/Auth.tsx - Local storage
web/src/hooks/LocalStorage.tsx - Theme state
web/src/hooks/Theme.tsx
API workflows
- Game routes
api/routers/game_router.py - Account routes
api/routers/account_router.py - Collection routes
api/routers/me_router.py
Domain and persistence
- Catalog logic
api/services/games_services.py - Account logic
api/services/account_services.py - Favorites and stats
api/services/me_services.py - Token security
api/security/token_services.py - Seed catalog
api/data/game_data.py - ORM tables
api/schemas/users_favorites_table.py - DB session
api/database.py
Other components
- Visitor
- Browser
- PostgreSQL
Connections 35
- Visitor → Browser: uses
README.md - Browser → Page routes: opens
README.md - Page routes → Shared layout: wraps pages
web/src/App.tsx - Page routes → Game pages: routes to
web/src/App.tsx - Page routes → Library view: routes to
web/src/App.tsx - Page routes → Collection stats: routes to
web/src/App.tsx - Page routes → Account pages: routes to
web/src/App.tsx - Shared layout → Catalog search: renders
web/src/pages/CommonPage.tsx - Shared layout → Theme state: uses
web/src/pages/CommonPage.tsx - Catalog search → Theme state: uses
web/src/components/SearchBar.tsx - Game pages → API requests: requests data
web/src/pages/DetailsPage.tsx - Library view → API requests: requests data
- Collection stats → API requests: requests data
web/src/pages/StatsPage.tsx - Account pages → API requests: requests data
web/src/pages/LoginPage.tsx - Account pages → Auth state: sets session
web/src/pages/LoginPage.tsx - Account pages → Local storage: persists data
web/src/pages/LoginPage.tsx - API requests → Browser: sends API calls
- Browser → Game routes: calls API
README.md - Browser → Account routes: calls API
README.md - Browser → Collection routes: calls API
README.md - Game routes → Catalog logic: delegates
api/routers/game_router.py - Account routes → Account logic: delegates
api/routers/account_router.py - Collection routes → Favorites and stats: delegates
api/routers/me_router.py - Account routes → Token security: checks tokens
api/routers/account_router.py - Collection routes → Token security: checks tokens
api/routers/me_router.py - Account logic → Token security: creates tokens
api/services/account_services.py - Game routes → DB session: gets session
api/routers/game_router.py - Collection routes → DB session: gets session
api/routers/me_router.py - Account routes → DB session: gets session
api/routers/account_router.py - Catalog logic → PostgreSQL: queries catalog
- Account logic → PostgreSQL: reads and writes
api/services/account_services.py - Favorites and stats → PostgreSQL: reads and writes
api/services/me_services.py - DB session → PostgreSQL: connects
api/database.py - DB session → Seed catalog: imports seed data
api/database.py - DB session → ORM tables: creates tables
api/database.py