How dardo95/ft_transcendence works
This is a browser-based multiplayer Bomberman game with account, social, lobby, matchmaking, real-time play, and match-history features. The main workflow is browser authentication, lobby matchmaking, server session creation and simulation, then socket-delivered snapshots rendered by the client. The diagram also includes chat, friends, profiles, and statistics as separate product capabilities. Edges are limited to relationships supported by excerpts, SOURCE INDEX references, or the README; unsampled feature wiring is not inferred.
Main entry points: App.tsx App routing · matchmaking.service.ts Matchmaking · game-manager.service.ts Game manager · users.controller.ts User endpoints
Components 29
Web client
- App routing
frontend/src/App.tsx - Auth state
frontend/src/features/auth/store/useAuthStore.ts - Auth API service
frontend/src/features/auth/service/authService.ts - HTTP client
frontend/src/api/api.ts - Lobby UI
frontend/src/pages/LobbyPage.tsx - Game UI
frontend/src/pages/GamePage.tsx - Client game engine
frontend/src/features/game/engine/GameEngine.ts - Game connection
frontend/src/features/game/net/gameConnection.ts - Pixi game scene
frontend/src/features/game/pixi/GameScene.ts - Profile and history
frontend/src/pages/StatsPage.tsx
Identity and social
- Auth endpoints
backend/src/auth/auth.controller.ts - Auth service
backend/src/auth/auth.service.ts - User endpoints
backend/src/users/users.controller.ts - User services
backend/src/users/users.service.ts - Friendships
backend/src/users/friendships.service.ts - Match statistics
backend/src/stats/stats.service.ts
Match lifecycle
- Lobby service
backend/src/lobby/lobby.service.ts - Matchmaking
backend/src/game/matchmaking/matchmaking.service.ts - Game manager
backend/src/game/sessions/game-manager.service.ts - Session factory
backend/src/game/engine/game-session.factory.ts - Map registry
backend/src/game/maps/map-registry.service.ts - Game state
backend/src/game/engine/game-state.ts - Server simulation
backend/src/game/engine/game-engine.ts
Realtime services
- Global chat
backend/src/chat/chat.gateway.ts - Game gateway
backend/src/game/game.gateway.ts - Socket authentication
backend/src/auth/ws-jwt-auth.service.ts - Socket registry
backend/src/realtime/socket-registry.service.ts
Persistence
- Relational database
backend/src/database/prisma.service.ts
Other components
- Player
Connections 30
- Player → App routing: uses
frontend/src/App.tsx - App routing → Auth state: checks session
frontend/src/App.tsx - Auth state → Auth API service: requests auth
frontend/src/features/auth/store/useAuthStore.ts - Auth API service → HTTP client: sends HTTP
frontend/src/features/auth/service/authService.ts - HTTP client → Auth endpoints: calls endpoints
- Auth endpoints → Auth service: delegates auth
backend/src/auth/auth.controller.ts - Auth service → Relational database: reads and writes
backend/src/auth/auth.service.ts - App routing → Lobby UI: routes to
frontend/src/App.tsx - Lobby UI → Matchmaking: requests match
- Matchmaking → Lobby service: uses lobby
backend/src/game/matchmaking/matchmaking.service.ts - Matchmaking → Game manager: creates sessions
backend/src/game/matchmaking/matchmaking.service.ts - Game manager → Session factory: builds sessions
backend/src/game/sessions/game-manager.service.ts - Session factory → Map registry: loads maps
backend/src/game/engine/game-session.factory.ts - Session factory → Game state: initializes state
backend/src/game/engine/game-session.factory.ts - Game manager → Server simulation: ticks sessions
backend/src/game/sessions/game-manager.service.ts - App routing → Game UI: routes to
frontend/src/App.tsx - Game UI → Client game engine: starts rendering
- Client game engine → Game connection: handles protocol
frontend/src/features/game/engine/GameEngine.ts - Client game engine → Pixi game scene: renders scene
frontend/src/features/game/engine/GameEngine.ts - Game gateway → Socket authentication: authenticates sockets
- Global chat → Socket authentication: authenticates sockets
backend/src/chat/chat.gateway.ts - User endpoints → User services: delegates user work
backend/src/users/users.controller.ts - User endpoints → Friendships: delegates friend work
backend/src/users/users.controller.ts - User endpoints → Global chat: emits user events
backend/src/users/users.controller.ts - User services → Relational database: reads and writes
backend/src/users/users.service.ts - Match statistics → Relational database: queries history
backend/src/stats/stats.service.ts - Profile and history → HTTP client: requests history
- Game manager → Map registry: uses map registry
backend/src/game/sessions/game-manager.service.ts - Matchmaking → Socket authentication: authenticates players
backend/src/game/matchmaking/matchmaking.service.ts - User services → Socket registry: updates connections
backend/src/users/users.service.ts