# call-0f-code/interview-simulator architecture

> Architecture diagram of the GitHub repository call-0f-code/interview-simulator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/call-0f-code/interview-simulator
- Repository: https://github.com/call-0f-code/interview-simulator

## Overview

Interview Simulator is a full-stack coding-interview practice platform. Users register or sign in, choose a practice mode, enter a room or practice solo, write and run code, and receive feedback; collaborative rooms add synchronized coding, chat, and interview timing. The platform also exposes interview-performance dashboards and learning resources. The graph separates the browser experience, backend services, and AI feedback service. Some frontend-to-service links are documented at product level rather than visible in sampled request code, so those links are marked as documented or unverified.

Main entry points: [`frontend/src/App.jsx`](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/App.jsx) (Web app routes), [`backend/index.js`](https://github.com/call-0f-code/interview-simulator/blob/main/backend/index.js) (HTTP and socket server), [`frontend/src/pages/Interview.jsx`](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Interview.jsx) (Live interview), [`frontend/src/services/socket.js`](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/socket.js) (Socket client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Practice experience"]
  node_webapp["Web app routes<br/>[App.jsx]"]
  node_authui["Account access<br/>[Login.jsx]"]
  node_mode["Practice mode<br/>[SelectMode.jsx]"]
  node_roomui["Room workflow<br/>[RoomEntry.jsx]"]
  node_interviewui["Live interview<br/>[Interview.jsx]"]
  node_editor["Code editor<br/>[CodeEditor.jsx]"]
  node_chat["Interview chat<br/>[Chat.jsx]"]
  node_solo["Solo practice<br/>[SoloInterview.jsx]"]
  node_feedbackui["AI practice feedback<br/>[AIInterview.jsx]"]
  node_dashboardui["Performance dashboard<br/>[Dashboard.jsx]"]
  node_resources["Learning resources<br/>[Resources.jsx]"]
end

subgraph group_backend["Backend services"]
  node_api["HTTP API client<br/>[api.js]"]
  node_dashboardclient["Dashboard client<br/>[dashboardAPI.js]"]
  node_socketclient["Socket client<br/>[socket.js]"]
  node_server["HTTP and socket server<br/>[index.js]"]
  node_authroutes["Authentication routes<br/>[Auth.js]"]
  node_roomhandler["Room and collaboration<br/>[socketHandler.js]"]
  node_execution["Code execution<br/>[executeCode.js]"]
  node_dashboardlogic["Dashboard calculations"]
  node_questionroutes["Question and run routes<br/>[question.js]"]
end

subgraph group_persistence["Persistence"]
  node_userstore[("User records<br/>[user.js]")]
  node_interviewstore[("Interview records<br/>[Interview.js]")]
  node_submissionstore[("Submission records<br/>[Submission.js]")]
  node_questionstore[("Question bank<br/>[Question.js]")]
  node_mongodb[("MongoDB connection<br/>[db.js]")]
end

subgraph group_ai["AI feedback"]
  node_aiservice["Python AI service<br/>[app.py]"]
end

node_candidate(("Candidate"))
node_judge0["Judge0 execution API"]
node_email["Email delivery"]

node_candidate -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_authui
node_webapp -->|"routes to"| node_mode
node_webapp -->|"routes to"| node_roomui
node_webapp -->|"routes to"| node_interviewui
node_webapp -->|"routes to"| node_solo
node_webapp -->|"routes to"| node_feedbackui
node_webapp -->|"routes to"| node_dashboardui
node_webapp -->|"routes to"| node_resources
node_authui -->|"calls"| node_api
node_authui -->|"connects"| node_socketclient
node_roomui -->|"uses"| node_socketclient
node_interviewui -->|"uses"| node_socketclient
node_interviewui -->|"renders"| node_editor
node_interviewui -->|"renders"| node_chat
node_solo -->|"renders"| node_editor
node_feedbackui -->|"renders"| node_editor
node_feedbackui -->|"requests feedback"| node_aiservice
node_dashboardui -->|"fetches data"| node_dashboardclient
node_dashboardui -.->|"presents"| node_dashboardlogic
node_resources -->|"provides materials"| node_candidate
node_socketclient -->|"connects"| node_server
node_api -.->|"requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"dispatches sockets"| node_roomhandler
node_authroutes -->|"reads and writes"| node_userstore
node_authroutes -->|"sends reset code"| node_email
node_roomhandler -->|"runs code"| node_execution
node_roomhandler -->|"saves submissions"| node_submissionstore
node_execution -->|"submits code"| node_judge0
node_server -->|"routes requests"| node_questionroutes
node_questionroutes -->|"loads tests"| node_questionstore
node_questionroutes -->|"runs tests"| node_execution
node_dashboardlogic -->|"queries interviews"| node_interviewstore
node_server -->|"connects"| node_mongodb
node_mongodb -.->|"persists"| node_interviewstore
node_aiservice -.->|"uses database"| node_mongodb

click node_webapp "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Login.jsx"
click node_mode "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/SelectMode.jsx"
click node_roomui "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/RoomEntry.jsx"
click node_interviewui "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Interview.jsx"
click node_editor "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/components/InterviewRoom/CodeEditor.jsx"
click node_chat "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/components/InterviewRoom/Chat.jsx"
click node_solo "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/SoloInterview.jsx"
click node_feedbackui "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/AIInterview.jsx"
click node_dashboardui "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Dashboard.jsx"
click node_resources "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Resources.jsx"
click node_api "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/api.js"
click node_dashboardclient "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/dashboardAPI.js"
click node_socketclient "https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/socket.js"
click node_server "https://github.com/call-0f-code/interview-simulator/blob/main/backend/index.js"
click node_authroutes "https://github.com/call-0f-code/interview-simulator/blob/main/backend/routes/Auth.js"
click node_roomhandler "https://github.com/call-0f-code/interview-simulator/blob/main/backend/socket/socketHandler.js"
click node_execution "https://github.com/call-0f-code/interview-simulator/blob/main/backend/utils/executeCode.js"
click node_dashboardlogic "https://github.com/call-0f-code/interview-simulator/blob/main/backend/controllers/dashboardController.js"
click node_questionroutes "https://github.com/call-0f-code/interview-simulator/blob/main/backend/routes/question.js"
click node_userstore "https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/user.js"
click node_interviewstore "https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/Interview.js"
click node_submissionstore "https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/Submission.js"
click node_questionstore "https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/Question.js"
click node_mongodb "https://github.com/call-0f-code/interview-simulator/blob/main/backend/config/db.js"
click node_aiservice "https://github.com/call-0f-code/interview-simulator/blob/main/ai-service/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_authui,node_mode,node_roomui,node_interviewui,node_editor,node_chat,node_solo,node_feedbackui,node_dashboardui,node_resources toneBlue
class node_api,node_dashboardclient,node_socketclient,node_server,node_authroutes,node_roomhandler,node_execution,node_dashboardlogic,node_questionroutes toneAmber
class node_userstore,node_interviewstore,node_submissionstore,node_questionstore,node_mongodb,node_judge0 toneMint
class node_aiservice toneRose
class node_candidate,node_email toneIndigo
```

## Components

### Practice experience

- [Web app routes](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Account access](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Practice mode](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/SelectMode.jsx): `frontend/src/pages/SelectMode.jsx`
- [Room workflow](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/RoomEntry.jsx): `frontend/src/pages/RoomEntry.jsx`
- [Live interview](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Interview.jsx): `frontend/src/pages/Interview.jsx`
- [Code editor](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/components/InterviewRoom/CodeEditor.jsx): `frontend/src/components/InterviewRoom/CodeEditor.jsx`
- [Interview chat](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/components/InterviewRoom/Chat.jsx): `frontend/src/components/InterviewRoom/Chat.jsx`
- [Solo practice](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/SoloInterview.jsx): `frontend/src/pages/SoloInterview.jsx`
- [AI practice feedback](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/AIInterview.jsx): `frontend/src/pages/AIInterview.jsx`
- [Performance dashboard](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Learning resources](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/pages/Resources.jsx): `frontend/src/pages/Resources.jsx`

### Backend services

- [HTTP API client](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Dashboard client](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/dashboardAPI.js): `frontend/src/services/dashboardAPI.js`
- [Socket client](https://github.com/call-0f-code/interview-simulator/blob/main/frontend/src/services/socket.js): `frontend/src/services/socket.js`
- [HTTP and socket server](https://github.com/call-0f-code/interview-simulator/blob/main/backend/index.js): `backend/index.js`
- [Authentication routes](https://github.com/call-0f-code/interview-simulator/blob/main/backend/routes/Auth.js): `backend/routes/Auth.js`
- [Room and collaboration](https://github.com/call-0f-code/interview-simulator/blob/main/backend/socket/socketHandler.js): `backend/socket/socketHandler.js`
- [Code execution](https://github.com/call-0f-code/interview-simulator/blob/main/backend/utils/executeCode.js): `backend/utils/executeCode.js`
- [Dashboard calculations](https://github.com/call-0f-code/interview-simulator/blob/main/backend/controllers/dashboardController.js): `backend/controllers/dashboardController.js`
- [Question and run routes](https://github.com/call-0f-code/interview-simulator/blob/main/backend/routes/question.js): `backend/routes/question.js`

### Persistence

- [User records](https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/user.js): `backend/models/user.js`
- [Interview records](https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/Interview.js): `backend/models/Interview.js`
- [Submission records](https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/Submission.js): `backend/models/Submission.js`
- [Question bank](https://github.com/call-0f-code/interview-simulator/blob/main/backend/models/Question.js): `backend/models/Question.js`
- [MongoDB connection](https://github.com/call-0f-code/interview-simulator/blob/main/backend/config/db.js): `backend/config/db.js`

### AI feedback

- [Python AI service](https://github.com/call-0f-code/interview-simulator/blob/main/ai-service/app.py): `ai-service/app.py`

### Other components

- **Candidate**
- **Judge0 execution API**
- **Email delivery**

## Connections

- Candidate → Web app routes: uses (evidence: `README.md`)
- Web app routes → Account access: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → Practice mode: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → Room workflow: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → Live interview: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → Solo practice: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → AI practice feedback: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → Performance dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Web app routes → Learning resources: routes to (evidence: `frontend/src/App.jsx`)
- Account access → HTTP API client: calls (evidence: `frontend/src/pages/Login.jsx`)
- Account access → Socket client: connects (evidence: `frontend/src/pages/Login.jsx`)
- Room workflow → Socket client: uses (evidence: `frontend/src/pages/RoomEntry.jsx`)
- Live interview → Socket client: uses (evidence: `frontend/src/pages/Interview.jsx`)
- Live interview → Code editor: renders (evidence: `frontend/src/pages/Interview.jsx`)
- Live interview → Interview chat: renders (evidence: `frontend/src/pages/Interview.jsx`)
- Solo practice → Code editor: renders (evidence: `frontend/src/pages/SoloInterview.jsx`)
- AI practice feedback → Code editor: renders (evidence: `frontend/src/pages/AIInterview.jsx`)
- AI practice feedback → Python AI service: requests feedback (evidence: `README.md`)
- Performance dashboard → Dashboard client: fetches data (evidence: `frontend/src/pages/Dashboard.jsx`)
- Performance dashboard → Dashboard calculations: presents
- Learning resources → Candidate: provides materials (evidence: `README.md`)
- Socket client → HTTP and socket server: connects (evidence: `README.md`)
- HTTP API client → HTTP and socket server: requests
- HTTP and socket server → Authentication routes: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Room and collaboration: dispatches sockets (evidence: `backend/index.js`)
- Authentication routes → User records: reads and writes (evidence: `backend/routes/Auth.js`)
- Authentication routes → Email delivery: sends reset code (evidence: `backend/routes/Auth.js`)
- Room and collaboration → Code execution: runs code (evidence: `backend/socket/socketHandler.js`)
- Room and collaboration → Submission records: saves submissions (evidence: `backend/socket/socketHandler.js`)
- Code execution → Judge0 execution API: submits code (evidence: `backend/utils/executeCode.js`)
- HTTP and socket server → Question and run routes: routes requests (evidence: `backend/routes/question.js`)
- Question and run routes → Question bank: loads tests (evidence: `backend/routes/question.js`)
- Question and run routes → Code execution: runs tests
- Dashboard calculations → Interview records: queries interviews (evidence: `backend/controllers/dashboardController.js`)
- HTTP and socket server → MongoDB connection: connects (evidence: `backend/index.js`)
- MongoDB connection → Interview records: persists
- Python AI service → MongoDB connection: uses database
