How satyasaidevarakonda/1vs1-rag-quiz works
This is a real-time multiplayer quiz platform with registered and guest access, 1v1 rooms, document-grounded question generation, and hosted competition/spectator sessions. Users enter through the React app, authenticate or continue as a guest, then create or join a game; the backend owns authoritative timing, scoring, and results. Competition sessions provide a separate leaderboard-oriented flow. The README documents the PDF/RAG capability and automatic cleanup; AI service internals are shown, but most backend and competition implementation details were not sampled, so uncertain links are omitted.
Main entry points: App.jsx Routes and shell · main.py HTTP and WS API · api.js HTTP client · AuthContext.jsx Auth state
Components 23
React client
- Routes and shell
frontend/src/App.jsx - Auth screens
frontend/src/components/Login.jsx - Signup screen
frontend/src/components/Signup.jsx - Guest mode
frontend/src/components/GuestMode.jsx - Game dashboard
frontend/src/components/Dashboard.jsx - Player profile
frontend/src/components/Profile.jsx - Auth state
frontend/src/context/AuthContext.jsx - HTTP client
frontend/src/services/api.js - Game screen
frontend/src/components/Game.jsx - Game state
frontend/src/context/GameContext.jsx - WebSocket client
frontend/src/services/socket.js
Live quiz gameplay
- Authoritative game engine
backend/game_manager.py
Competition sessions
- Competition lobby
frontend/src/components/CompetitionLobby.jsx - Competition room
frontend/src/components/CompetitionRoom.jsx - Competition engine
backend/competition.py
Backend and AI
- HTTP and WS API
backend/main.py - Token utilities
backend/auth.py - MongoDB
backend/database.py - Request models
backend/models.py - Document question API
backend/ai-service/main.py - RAG processing
backend/ai-service/rag_pipeline.py
Other components
- Players
- Gemini LLM
Connections 34
- Players → Routes and shell: use
README.md - Routes and shell → Auth screens: routes to
frontend/src/App.jsx - Routes and shell → Signup screen: routes to
frontend/src/App.jsx - Routes and shell → Guest mode: routes to
frontend/src/App.jsx - Routes and shell → Game dashboard: routes to
frontend/src/App.jsx - Routes and shell → Game screen: routes to
frontend/src/App.jsx - Routes and shell → Player profile: routes to
frontend/src/App.jsx - Routes and shell → Competition lobby: routes to
frontend/src/App.jsx - Routes and shell → Competition room: routes to
frontend/src/App.jsx - Auth screens → Auth state: uses
frontend/src/components/Login.jsx - Signup screen → Auth state: uses
frontend/src/components/Signup.jsx - Guest mode → Auth state: uses
frontend/src/components/GuestMode.jsx - Auth state → HTTP client: requests auth
frontend/src/context/AuthContext.jsx - Game dashboard → HTTP client: requests data
frontend/src/components/Dashboard.jsx - Player profile → HTTP client: requests profile
frontend/src/components/Profile.jsx - Player profile → Auth state: updates user
frontend/src/components/Profile.jsx - Game dashboard → Game state: uses
frontend/src/components/Dashboard.jsx - Game screen → Game state: uses
frontend/src/components/Game.jsx - Game state → WebSocket client: sends and receives
frontend/src/context/GameContext.jsx - Competition lobby → HTTP client: requests rooms
frontend/src/components/CompetitionLobby.jsx - Competition room → HTTP client: requests session data
frontend/src/components/CompetitionRoom.jsx - Competition room → WebSocket client: uses
frontend/src/components/CompetitionRoom.jsx - HTTP client → HTTP and WS API: HTTP requests
frontend/src/services/api.js - WebSocket client → HTTP and WS API: WebSocket messages
frontend/src/services/socket.js - HTTP and WS API → Token utilities: authenticates
backend/main.py - HTTP and WS API → Request models: validates with
backend/main.py - HTTP and WS API → MongoDB: reads and writes
backend/main.py - HTTP and WS API → Authoritative game engine: dispatches game events
backend/main.py - HTTP and WS API → Competition engine: handles competition
backend/main.py - Authoritative game engine → MongoDB: persists history
backend/game_manager.py - Competition engine → MongoDB: stores session data
backend/competition.py - HTTP and WS API → Document question API: uploads and generates
backend/main.py - Document question API → RAG processing: uses pipeline
backend/ai-service/main.py - RAG processing → Gemini LLM: generates questions
backend/ai-service/rag_pipeline.py