How juliohor/ft_transcendence works
ft_transcendence is a web application combining accounts and profiles, friends and real-time chat, and multiplayer Pong. The main user journey enters through the routed frontend, authenticates, and then uses protected profile, social, or game features backed by Flask HTTP and Socket.IO handlers. The graph groups those product areas and shows selected internal layers. Edges follow shown imports, calls, or documented relationships; some frontend-to-backend wiring and unsampled implementation details are not established by the excerpts, so they are not inferred.
Main entry points: App.tsx Routes and providers · app.py Flask and Socket.IO app · AuthProvider.tsx Auth provider · routes.py Profile and friend routes
Components 29
Web application
- Routes and providers
frontend/src/app/App.tsx - Login page
frontend/src/pages/LoginPage.tsx - Profile page
frontend/src/pages/ProfilePage.tsx - Friends page
frontend/src/pages/FriendsPage.tsx - Chat page
frontend/src/pages/ChatPage.tsx
Identity and profiles
- Auth provider
frontend/src/app/AuthProvider.tsx - Auth API client
frontend/src/api/auth.ts - Profile API client
frontend/src/api/profile.ts - Auth routes
backend/app/auth/routes.py
Friends and chat
- Profile and friend routes
backend/app/social/routes.py - Social event handlers
backend/app/social/handlers.py - Social data store
backend/app/social/store.py - Chat session state
frontend/src/app/chat-session.ts - Chat API client
frontend/src/api/chat.ts - Friends API client
frontend/src/api/friends.ts - Chat session hook
frontend/src/chat/useChatSession.ts - Private chat rules
frontend/src/chat/privateChat.ts
Pong game
- Pong page
frontend/src/pages/PongPage.tsx - Game factory
frontend/src/games/pong/createPongGame.tsx - Game interface
frontend/src/games/pong/view/PongApp.tsx - Paddle input
frontend/src/games/pong/view/usePaddleInput.ts - WebSocket transport
frontend/src/transports/pong/WebSocketTransport.ts - Matchmaking queue
backend/app/ws_core/matchmaker.py - Game event handlers
backend/app/games/pong/handlers.py - Match simulation
backend/app/games/pong/match.py - Match state
backend/app/games/pong/state.py
Backend platform
- Flask and Socket.IO app
backend/app/app.py - Database access
backend/app/db.py
Other components
- User
Connections 33
- User → Routes and providers: uses
- Routes and providers → Login page: routes to
frontend/src/app/App.tsx - Routes and providers → Profile page: routes to
frontend/src/app/App.tsx - Routes and providers → Friends page: routes to
frontend/src/app/App.tsx - Routes and providers → Chat page: routes to
frontend/src/app/App.tsx - Routes and providers → Pong page: routes to
frontend/src/app/App.tsx - Routes and providers → Auth provider: provides auth
frontend/src/app/App.tsx - Auth provider → Auth API client: calls
frontend/src/app/AuthProvider.tsx - Auth provider → Profile API client: calls
frontend/src/app/AuthProvider.tsx - Profile page → Profile API client: calls
frontend/src/pages/ProfilePage.tsx - Flask and Socket.IO app → Auth routes: registers
backend/app/app.py - Auth routes → Database access: queries
backend/app/auth/routes.py - Flask and Socket.IO app → Profile and friend routes: registers
backend/app/app.py - Flask and Socket.IO app → Social event handlers: registers
backend/app/app.py - Profile and friend routes → Social data store: reads and writes
backend/app/social/routes.py - Profile and friend routes → Social event handlers: broadcasts updates
backend/app/social/routes.py - Social event handlers → Social data store: reads and writes
backend/app/social/handlers.py - Chat page → Chat session hook: uses
frontend/src/pages/ChatPage.tsx - Chat session hook → Chat session state: uses
frontend/src/chat/useChatSession.ts - Chat session hook → Private chat rules: uses
frontend/src/chat/useChatSession.ts - Chat session state → Chat API client: calls
frontend/src/app/chat-session.ts - Private chat rules → Chat API client: calls
frontend/src/chat/privateChat.ts - Private chat rules → Friends API client: checks friendships
frontend/src/chat/privateChat.ts - Pong page → Game factory: creates game
- Game factory → Game interface: renders
frontend/src/games/pong/createPongGame.tsx - Game interface → Paddle input: uses
frontend/src/games/pong/view/PongApp.tsx - Paddle input → WebSocket transport: sends input
- Flask and Socket.IO app → Game event handlers: registers
backend/app/app.py - Flask and Socket.IO app → Matchmaking queue: configures
backend/app/app.py - Flask and Socket.IO app → Match simulation: creates
backend/app/app.py - Game event handlers → Matchmaking queue: dispatches queue
backend/app/games/pong/handlers.py - Matchmaking queue → Match simulation: creates matches
backend/app/app.py - Match simulation → Match state: uses state
backend/app/games/pong/match.py