How rubenteles/ft_transcendence works
ft_transcendence is a Vue/NestJS multiplayer social game: users authenticate, explore a virtual city, socialize, customize profiles, and enter Pong matches whose results feed progression and leaderboards. The frontend combines SPA pages with browser game and menu components; NestJS provides REST and socket-based services backed by Prisma. The README documents 42-platform login and the RPG, shop, bot, and leaderboard capabilities. Some gateway and frontend wiring was not sampled, so uncertain internal links are omitted; documented client/server connections are shown at the system boundary.
Main entry points: prisma.service.ts PostgreSQL · game.service.ts Matchmaking · pages App pages · auth.service.ts Authentication
Components 21
Web client
- Vue SPA
frontend/src/App.vue - App pages
frontend/src/pages - Profiles and menus
frontend/src/game/Menu/YourProfile.ts - Chat interface
frontend/src/components/chat - City client
frontend/src/game/lobby - Pong client
frontend/src/game/ping_pong
Identity and social
- Authentication
backend/src/auth/auth.service.ts - 42 OAuth
backend/src/auth/strategy/42.strategy.ts - Profiles and economy
backend/src/user/user.service.ts - Friend relations
backend/src/friendship/friendship.service.ts - Channels and messages
backend/src/chat/chat.service.ts - Chat sockets
backend/src/chat/gateway/chat/chat.gateway.ts - Blocklist
backend/src/blocklist/blocklist.service.ts
City and gameplay
- City lobby
backend/src/lobby/lobby.service.ts - City map
backend/src/lobby/GameMap.ts - Live players
backend/src/player/Player.ts - Matchmaking
backend/src/game/game.service.ts - Pong engine
backend/src/game/ping_pong/GamePong.ts - Game sockets
backend/src/game/gateway/game.gateway.ts
Data layer
- PostgreSQL
backend/src/prisma/prisma.service.ts
Other components
- Player
Connections 27
- Player → Vue SPA: uses
- Vue SPA → App pages: renders
frontend/src/App.vue - Player → 42 OAuth: authenticates
- 42 OAuth → Authentication: delegates
- Authentication → PostgreSQL: reads and writes
backend/src/auth/auth.service.ts - Authentication → Channels and messages: joins global channel
backend/src/auth/auth.service.ts - App pages → Authentication: REST login
- App pages → Profiles and economy: REST profiles
- Profiles and menus → Profiles and economy: REST customization
- Profiles and economy → PostgreSQL: reads and writes
backend/src/user/user.service.ts - App pages → Friend relations: REST social
- Friend relations → PostgreSQL: reads and writes
backend/src/friendship/friendship.service.ts - Chat interface → Channels and messages: REST channels
- Chat interface → Chat sockets: socket messaging
- Channels and messages → PostgreSQL: reads and writes
backend/src/chat/chat.service.ts - Channels and messages → Blocklist: coordinates
- City client → City lobby: socket exploration
- City lobby → City map: uses
backend/src/lobby/lobby.service.ts - City lobby → Live players: manages
backend/src/lobby/lobby.service.ts - City client → Matchmaking: requests matches
- Matchmaking → Pong engine: creates games
backend/src/game/game.service.ts - Matchmaking → Live players: uses
backend/src/game/game.service.ts - Matchmaking → PostgreSQL: reads and writes
backend/src/game/game.service.ts - Pong client → Game sockets: socket play
- Pong client → Profiles and menus: selects skins
frontend/src/game/Menu/YourProfile.ts - Game sockets → Matchmaking: dispatches game events
- Pong engine → PostgreSQL: records results