How aarison560/ft_transcendence works
Tic-Tac-Toe Online is a browser-based multiplayer game and social platform. Players use the React SPA to authenticate, connect with friends, find or start matches, and play through a real-time game interface; profiles, statistics, leaderboards, and gamification surface progress. The Express backend also provides messaging, user administration, and a documented API with API-key support. The tree and README establish these product areas, while sampled controllers and services confirm selected call paths; wiring among unsampled modules is left implicit.
Main entry points: app.js Express application · realtimeHub.js Realtime hub · authService.js Authentication · oauthService.js OAuth sign-in
Components 21
Web client
- React application
srcs/requirements/frontend/tools/react/src/App.tsx - Game interface
srcs/requirements/frontend/tools/react/src/gameplay/GameView.tsx - Game socket client
srcs/requirements/frontend/tools/react/src/gameplay/gameSocket.ts - API client
srcs/requirements/frontend/tools/react/src/services/api.ts
Identity and users
- Authentication
srcs/requirements/backend/tools/express/src/modules/auth/authService.js - OAuth sign-in
srcs/requirements/backend/tools/express/src/modules/OAuth/oauthService.js - User profiles
srcs/requirements/backend/tools/express/src/modules/user - User administration
srcs/requirements/backend/tools/express/src/modules/admin
Play and social
- Friend requests
srcs/requirements/backend/tools/express/src/modules/friend - Direct messaging
srcs/requirements/backend/tools/express/src/modules/message - Game services
srcs/requirements/backend/tools/express/src/modules/games - Online presence
srcs/requirements/backend/tools/express/src/modules/userStatus
Progress and API
- Game statistics
srcs/requirements/backend/tools/express/src/modules/userStats - Leaderboards
srcs/requirements/backend/tools/express/src/modules/leaderboard - Gamification
srcs/requirements/backend/tools/express/src/modules/gamification - Public API keys
srcs/requirements/backend/tools/express/src/modules/apiKey
Backend platform
- Realtime hub
srcs/requirements/backend/tools/express/src/core/realtimeHub.js - Express application
srcs/requirements/backend/tools/express/src/app.js - Prisma database
srcs/requirements/backend/tools/express/src/infra/prisma.js - Redis services
srcs/requirements/backend/tools/express/src/infra/redisClientConfig.js
Other components
- Player
Connections 26
- Player → React application: uses
- React application → API client: calls
- API client → Express application: sends requests
- Express application → Authentication: dispatches
- Express application → OAuth sign-in: dispatches
- Express application → User profiles: dispatches
- Express application → Friend requests: dispatches
- Express application → Direct messaging: dispatches
- Express application → Game services: dispatches
- Express application → Game statistics: dispatches
- Express application → Leaderboards: dispatches
- Express application → Gamification: dispatches
- Express application → Public API keys: dispatches
- Express application → User administration: dispatches
- Game interface → Game socket client: uses
- Game socket client → Game services: exchanges events
- Game services → Realtime hub: dispatches events
- Friend requests → Realtime hub: emits events
- Online presence → Realtime hub: emits events
- Authentication → Prisma database: reads and writes
- OAuth sign-in → Prisma database: reads and writes
- Authentication → Leaderboards: requests snapshot
- OAuth sign-in → Leaderboards: requests snapshot
- OAuth sign-in → Realtime hub: broadcasts update
- Authentication → Realtime hub: broadcasts update
- Game services → Redis services: uses