How rebbouh-mohamed/competitive-programming-front works
This is a React frontend for a contest coding game. Users authenticate, enter a lobby, view contests or matches, choose a problem, write and submit code, and view player/leaderboard information. The game-round page coordinates problem and contest state, editor UI, and cup-match updates. The README only describes a generic Vite setup; the graph’s product flow is grounded in the sampled routing and game-round source plus SOURCE INDEX references. Several feature modules are indexed but unsampled, so their internal behavior and connections are not inferred.
Main entry points: GRound.jsx Game Round · main.jsx Router and Providers · api.js HTTP Client · ProtectedRoute.jsx Route Guard
Components 28
Application Shell
- Router and Providers
src/main.jsx - App Shell
src/App.jsx - Admin Page
src/pages/AdminPage.jsx
Identity and State
- Login Page
src/pages/Login.jsx - Login Request
redux/login/action.js - Route Guard
src/ProtectedRoute.jsx - Token Session
src/context/constant.js - Token Refresh
redux/refresh/action.js - Redux Store
redux/store.js
Contest Experience
- Lobby Page
src/pages/Lobby.jsx - Lobby View
src/components/sections/LobbyMain.jsx - Contest Request
redux/contests/action.js - Game Round
src/pages/GRound.jsx - Match Info
src/components/sections/tournament/MatchInfo.jsx - Tournament Tree
src/components/sections/tournament/TournamentTree.jsx - Players View
src/components/sections/PlayersSection.jsx - Leaderboard Page
src/pages/LBoard.jsx
Coding and Results
- Problem Request
redux/problems/action.js - Problem View
src/components/sections/ProblemSection.jsx - Code Editor
src/components/sections/codeEditor/elemnts/Landing.jsx - Code Submission
redux/code/action.js - Submission Controls
src/components/sections/Push.jsx - Game HUD
src/components/sections/GameHUD.jsx
Service Access
- Backend API
- HTTP Client
src/context/api.js - WebSocket URL
src/utils/websocket.js - Match Updates
Other components
- Player
Connections 38
- Player → Router and Providers: opens app
src/main.jsx - Router and Providers → App Shell: renders routes
src/main.jsx - Router and Providers → Login Page: routes to
src/main.jsx - Router and Providers → Lobby Page: routes to
src/main.jsx - Router and Providers → Game Round: routes to
src/main.jsx - Router and Providers → Leaderboard Page: routes to
src/main.jsx - Router and Providers → Admin Page: routes to
src/main.jsx - Router and Providers → Redux Store: provides state
src/main.jsx - Lobby Page → Route Guard: requires access
src/main.jsx - Game Round → Route Guard: requires access
src/main.jsx - Leaderboard Page → Route Guard: requires access
src/main.jsx - Admin Page → Route Guard: requires access
src/main.jsx - Login Page → Login Request: dispatches
src/pages/Login.jsx - Login Request → HTTP Client: sends request
redux/login/action.js - Login Request → Token Session: stores tokens
redux/login/action.js - Route Guard → Token Session: checks tokens
src/ProtectedRoute.jsx - Token Refresh → HTTP Client: requests refresh
redux/refresh/action.js - Token Refresh → Token Session: updates token
redux/refresh/action.js - HTTP Client → Backend API: HTTP requests
- Lobby Page → Lobby View: renders
src/pages/Lobby.jsx - Lobby Page → Contest Request: dispatches
src/pages/Lobby.jsx - Contest Request → HTTP Client: fetches contest
redux/contests/action.js - Game Round → Contest Request: dispatches
src/pages/GRound.jsx - Game Round → Problem Request: dispatches
src/pages/GRound.jsx - Game Round → Problem View: renders
src/pages/GRound.jsx - Game Round → Code Editor: renders
src/pages/GRound.jsx - Game Round → Match Info: renders
src/pages/GRound.jsx - Game Round → Game HUD: renders
src/pages/GRound.jsx - Game Round → WebSocket URL: builds socket URL
src/pages/GRound.jsx - Game Round → Match Updates: opens connection
src/pages/GRound.jsx - Match Info → HTTP Client: uses HTTP client
src/components/sections/tournament/MatchInfo.jsx - Match Info → WebSocket URL: uses URL helper
src/components/sections/tournament/MatchInfo.jsx - Problem Request → HTTP Client: uses HTTP client
redux/problems/action.js - Code Editor → Code Submission: dispatches
src/components/sections/codeEditor/elemnts/Landing.jsx - Code Editor → Submission Controls: renders
src/components/sections/codeEditor/elemnts/Landing.jsx - Code Editor → Problem View: renders
src/components/sections/codeEditor/elemnts/Landing.jsx - Leaderboard Page → Players View: renders
src/pages/LBoard.jsx - Admin Page → HTTP Client: uses HTTP client
src/pages/AdminPage.jsx