How tejxs18/peerprep works
PeerPrep supports two practice paths: authenticated peer rooms for collaborative coding, chat, and video, and AI-led interview sessions with persistent questions, code reviews, follow-ups, and Q&A. The graph also preserves code execution and lobby presence as distinct capabilities. Controller, route, client-service, and execution wiring is supported by sampled source; README-described room/editor details and unsampled AI-agent internals are represented at their documented module paths, with uncertain call links omitted.
Main entry points: index.js Express API · App.jsx Routed app · Room.jsx Collaborative room · InterviewRoom.jsx Interview workspace
Components 33
Client experience
- Routed app
client/src/App.jsx - Login / register
client/src/pages/Authentication/Login.jsx - Auth state
client/src/context/AuthContext.jsx - Lobby
client/src/pages/Lobby/Lobby.jsx - Collaborative room
client/src/pages/Room/Room.jsx - Code editor
client/src/components/CodeEditor.jsx - Video controls
client/src/components/RoomVideoControls.jsx - Interview workspace
client/src/pages/InterviewRoom/InterviewRoom.jsx - Question and difficulty
client/src/components/ai/QuestionPanel.jsx - Review and follow-ups
client/src/components/ai/FeedbackPanel.jsx
API and identity
- Express API
server/index.js - Auth routes
server/routes/authRoutes.js - Auth handlers
server/controllers/authController.js - JWT middleware
server/middleware/auth.js
Practice services
- Interview API client
client/src/services/interviewService.js - Lobby presence client
client/src/services/lobbyStreamService.js - Room chat client
client/src/services/streamService.js - Video client
client/src/services/streamVideoService.js - Code execution
server/routes/executeRoutes.js
AI interview
- Interview routes
server/routes/interviewRoutes.js - Interview orchestration
server/controllers/interviewController.js - Agent runner
server/agents/agentRunner.mjs - Interviewer agent
server/agents/interviewerAgent.mjs - Code reviewer agent
server/agents/codeReviewerAgent.mjs - Follow-up agent
server/agents/followupAgent.mjs - Gemini client
server/agents/geminiClient.mjs
Persistence and cloud
- Interview sessions
server/models/Interview.js - User records
server/models/User.js - MongoDB
- GetStream
- Gemini API
- Language runtimes
Other components
- Participant
Connections 42
- Participant → Routed app: uses
- Routed app → Auth state: provides auth
- Routed app → Login / register: routes
- Routed app → Lobby: routes
- Routed app → Collaborative room: routes
- Routed app → Interview workspace: routes
- Login / register → Express API: auth requests
- Auth state → Express API: auth requests
- Express API → Auth routes: dispatches
- Auth routes → Auth handlers: calls
- Auth handlers → User records: reads / writes
- User records → MongoDB: persists
- Lobby → Lobby presence client: uses
- Lobby presence client → Room chat client: gets token
- Lobby presence client → Express API: lobby requests
- Lobby presence client → GetStream: presence events
- Collaborative room → Code editor: edits code
- Collaborative room → Room chat client: uses
- Collaborative room → Video client: uses
- Video client → GetStream: video calls
- Room chat client → GetStream: chat and sync
- Collaborative room → Express API: execute request
- Express API → Code execution: dispatches
- Code execution → Language runtimes: spawns code
- Interview workspace → Question and difficulty: shows prompts
- Interview workspace → Review and follow-ups: shows results
- Interview workspace → Interview API client: requests sessions
- Interview API client → Express API: interview requests
- Express API → Interview routes: dispatches
- Interview routes → JWT middleware: guards routes
- Interview routes → Interview orchestration: dispatches
- Interview orchestration → Interview sessions: reads / writes
- Interview sessions → MongoDB: persists
- Interview orchestration → Agent runner: loads and calls
- Agent runner → Interviewer agent: dispatches
- Agent runner → Code reviewer agent: dispatches
- Agent runner → Follow-up agent: dispatches
- Interviewer agent → Gemini client: generates with
- Code reviewer agent → Gemini client: reviews with
- Follow-up agent → Gemini client: generates with
- Gemini client → Gemini API: generates content
- Auth routes → GetStream: tokens and channels