How arooshdatta/escapethecompiler works
Escape the Compiler is a team-based coding escape-room tournament. Teams register or sign in, progress through five timed rooms by submitting code, earn hints and scores, then assemble the vault code and word to escape; standings and organizer tools expose tournament progress. The frontend presents play, team, leaderboard, login, and admin experiences through the API. Backend routes delegate game rules to services, which use room content, execution runners, scoring/timers, and repository persistence. README documents cloud runner fallback and legacy mode; their precise wiring is not fully shown in the excerpts.
Main entry points: routes.tsx App routes · main.py FastAPI app · api.ts API client · game.py Game rules
Components 34
Player and Organizer UI
- App routes
frontend/src/routes.tsx - Room play UI
frontend/src/pages/PlayPage.tsx - Game controls
frontend/src/components/game - Game state hooks
frontend/src/hooks/useGameState.ts - Team sign-in
frontend/src/pages/LoginPage.tsx - Auth context
frontend/src/lib/auth.tsx - Team directory
frontend/src/pages/TeamsPage.tsx - Team details
frontend/src/pages/TeamDetailPage.tsx - Leaderboard
frontend/src/pages/LeaderboardPage.tsx - Admin console
frontend/src/pages/AdminPage.tsx - Legacy game
frontend/src/pages/LegacyPage.tsx - API client
frontend/src/lib/api.ts
API and Identity
- Auth routes
backend/app/routers/auth.py - Game routes
backend/app/routers/game.py - Room catalog route
backend/app/routers/rooms.py - Team routes
backend/app/routers/teams.py - Leaderboard route
backend/app/routers/leaderboard.py - Admin routes
backend/app/routers/admin.py - FastAPI app
backend/app/main.py - Auth and tokens
backend/app/security.py
Escape Game
- Game rules
backend/app/services/game.py - Five room puzzles
backend/app/content/rooms.py - Score calculation
backend/app/services/scoring.py - Room timers
backend/app/services/timers.py - Standings builder
backend/app/services/standings.py
Code Execution
- Runner dispatch
backend/app/services/code_runner.py - JavaScript sandbox
backend/app/services/js_runner.py - C++ sandbox
backend/app/services/runners/cpp_runner.py - Java sandbox
backend/app/services/runners/java_runner.py - Python sandbox
backend/app/services/runners/python_runner.py
Other components
- Players
- Organizer
- Node.js runtime
- Cloud compiler
Connections 46
- Players → App routes: use
- Organizer → App routes: use
- App routes → Room play UI: routes to
frontend/src/routes.tsx - App routes → Team sign-in: routes to
frontend/src/routes.tsx - App routes → Team directory: routes to
frontend/src/routes.tsx - App routes → Team details: routes to
frontend/src/routes.tsx - App routes → Leaderboard: routes to
frontend/src/routes.tsx - App routes → Admin console: routes to
frontend/src/routes.tsx - App routes → Legacy game: routes to
- Team sign-in → Auth context: authenticates via
frontend/src/lib/auth.tsx - Room play UI → Game state hooks: reads state
frontend/src/hooks/useGameState.ts - Room play UI → Game controls: renders
- Game state hooks → API client: requests state
- Team sign-in → API client: submits credentials
- Team directory → API client: requests teams
- Team details → API client: requests detail
- Leaderboard → API client: requests standings
- Admin console → API client: admin requests
- API client → FastAPI app: HTTP API
- FastAPI app → Auth routes: registers
backend/app/main.py - FastAPI app → Game routes: registers
backend/app/main.py - FastAPI app → Room catalog route: registers
backend/app/main.py - FastAPI app → Team routes: registers
backend/app/main.py - FastAPI app → Leaderboard route: registers
backend/app/main.py - FastAPI app → Admin routes: registers
backend/app/main.py - Auth routes → Auth and tokens: checks and issues tokens
backend/app/routers/auth.py - Auth routes → Score calculation: calculates team score
backend/app/routers/auth.py - Game routes → Game rules: delegates game actions
backend/app/routers/game.py - Room catalog route → Five room puzzles: serves rooms
backend/app/routers/rooms.py - Leaderboard route → Standings builder: builds standings
backend/app/routers/leaderboard.py - Team routes → Standings builder: builds team summaries
backend/app/routers/teams.py - Admin routes → Standings builder: summarizes teams
backend/app/routers/admin.py - Game rules → Runner dispatch: runs submissions
backend/app/services/game.py - Game rules → Five room puzzles: loads puzzle data
backend/app/services/game.py - Game rules → Score calculation: scores progress
backend/app/services/game.py - Game rules → Room timers: checks deadlines
backend/app/services/game.py - Standings builder → Score calculation: calculates scores
backend/app/services/standings.py - Standings builder → Room timers: derives room status
backend/app/services/standings.py - Runner dispatch → JavaScript sandbox: dispatches JS
backend/app/services/code_runner.py - Runner dispatch → C++ sandbox: dispatches C++
backend/app/services/code_runner.py - Runner dispatch → Java sandbox: dispatches Java
backend/app/services/code_runner.py - Runner dispatch → Python sandbox: dispatches Python
backend/app/services/code_runner.py - JavaScript sandbox → Node.js runtime: runs locally
backend/app/services/js_runner.py - JavaScript sandbox → Cloud compiler: fallback
- C++ sandbox → Cloud compiler: fallback
- Java sandbox → Cloud compiler: fallback