# vinn31-git/interview-platform-ai architecture

> Architecture diagram of the GitHub repository vinn31-git/interview-platform-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vinn31-git/interview-platform-ai
- Repository: https://github.com/vinn31-git/interview-platform-ai

## Overview

InterviewMate is a mock-interview platform: users authenticate, configure and complete conversational or coding interviews, then review evaluations and historical performance. The React client calls an Express API; backend controllers handle authentication, interview records, AI interviewing, evaluation and code execution, with interview data stored through Prisma. The README also documents webcam support, security controls and analytics. Some connections are based on documented capabilities or indexed imports rather than complete source excerpts, so uncertain wiring is omitted.

Main entry points: [`Phase1/src/routes/AppRoutes.jsx`](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/routes/AppRoutes.jsx) (Client routing), [`Phase2/server.js`](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/server.js) (Express server), [`Phase1/src/pages/InterviewRoom.jsx`](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/InterviewRoom.jsx) (Interview room), [`Phase1/src/services/interviewHistoryService.js`](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/interviewHistoryService.js) (Interview history API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_routes["Client routing<br/>[AppRoutes.jsx]"]
  node_authui["Sign-in and profile<br/>[authService.js]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_setup["Interview setup<br/>[InterviewSetup.jsx]"]
  node_room["Interview room<br/>[InterviewRoom.jsx]"]
  node_speech["Speech input<br/>[useSpeech.js]"]
  node_editor["Code editor<br/>[codeEditor.jsx]"]
  node_results["Results<br/>[Results.jsx]"]
  node_analytics["Analytics<br/>[Analytics.jsx]"]
  node_historysvc["Interview history API"]
  node_authsvc["Authentication API<br/>[authService.js]"]
  node_axios["HTTP client<br/>[axiosConfig.js]"]
end

subgraph group_backend["API and interviews"]
  node_server["Express server<br/>[server.js]"]
  node_auth["Authentication<br/>[authController.js]"]
  node_authmw["JWT middleware<br/>[authMiddleware.js]"]
  node_interview["Interview records"]
  node_chat["AI interviewer"]
  node_evaluation["Evaluation"]
  node_judge["Code execution API"]
end

subgraph group_data["Persistence"]
  node_dbclient["Prisma client<br/>[db.js]"]
  node_database[("SQLite database")]
end

subgraph group_integrations["External services"]
  node_groq["Groq AI"]
  node_judge0["Judge0"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses"| node_routes
node_routes -->|"routes to"| node_authui
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_setup
node_routes -->|"routes to"| node_room
node_routes -->|"routes to"| node_results
node_routes -->|"routes to"| node_analytics
node_authui -->|"calls"| node_authsvc
node_setup -->|"starts interview"| node_historysvc
node_room -->|"saves results"| node_historysvc
node_room -->|"interview chat"| node_chat
node_room -->|"renders"| node_editor
node_room -.->|"uses speech"| node_speech
node_room -->|"runs code"| node_judge
node_results -->|"loads record"| node_historysvc
node_analytics -->|"loads history"| node_historysvc
node_historysvc -->|"sends requests"| node_axios
node_authsvc -->|"sends requests"| node_axios
node_axios -->|"API requests"| node_server
node_server -->|"mounts auth routes"| node_auth
node_server -->|"protects routes"| node_authmw
node_server -.->|"mounts interview API"| node_interview
node_server -->|"mounts AI routes"| node_chat
node_server -->|"mounts evaluation API"| node_evaluation
node_server -->|"mounts code API"| node_judge
node_auth -->|"reads and writes"| node_dbclient
node_interview -->|"reads and writes"| node_dbclient
node_dbclient -->|"persists data"| node_database
node_chat -->|"requests completions"| node_groq
node_judge -.->|"executes code"| node_judge0
node_evaluation -.->|"AI evaluation"| node_groq

click node_routes "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/routes/AppRoutes.jsx"
click node_authui "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/authService.js"
click node_dashboard "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/Dashboard.jsx"
click node_setup "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/InterviewSetup.jsx"
click node_room "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/InterviewRoom.jsx"
click node_speech "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/hooks/useSpeech.js"
click node_editor "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/components/codeEditor.jsx"
click node_results "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/Results.jsx"
click node_analytics "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/Analytics.jsx"
click node_historysvc "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/interviewHistoryService.js"
click node_authsvc "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/authService.js"
click node_axios "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/axiosConfig.js"
click node_server "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/server.js"
click node_auth "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/authController.js"
click node_authmw "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/middleware/authMiddleware.js"
click node_interview "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/interviewController.js"
click node_chat "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/interviewerController.js"
click node_evaluation "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/evaluationController.js"
click node_judge "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/judge0Controller.js"
click node_dbclient "https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/utils/db.js"

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_routes,node_authui,node_dashboard,node_setup,node_room,node_speech,node_editor,node_results,node_analytics,node_historysvc,node_authsvc,node_axios toneBlue
class node_server,node_auth,node_authmw,node_interview,node_chat,node_evaluation,node_judge toneAmber
class node_dbclient,node_database toneMint
class node_groq,node_judge0 toneRose
class node_candidate toneIndigo
```

## Components

### React client

- [Client routing](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/routes/AppRoutes.jsx): `Phase1/src/routes/AppRoutes.jsx`
- [Sign-in and profile](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/authService.js): `Phase1/src/services/authService.js`
- [Dashboard](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/Dashboard.jsx): `Phase1/src/pages/Dashboard.jsx`
- [Interview setup](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/InterviewSetup.jsx): `Phase1/src/pages/InterviewSetup.jsx`
- [Interview room](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/InterviewRoom.jsx): `Phase1/src/pages/InterviewRoom.jsx`
- [Speech input](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/hooks/useSpeech.js): `Phase1/src/hooks/useSpeech.js`
- [Code editor](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/components/codeEditor.jsx): `Phase1/src/components/codeEditor.jsx`
- [Results](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/Results.jsx): `Phase1/src/pages/Results.jsx`
- [Analytics](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/pages/Analytics.jsx): `Phase1/src/pages/Analytics.jsx`
- [Interview history API](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/interviewHistoryService.js): `Phase1/src/services/interviewHistoryService.js`
- [Authentication API](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/authService.js): `Phase1/src/services/authService.js`
- [HTTP client](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase1/src/services/axiosConfig.js): `Phase1/src/services/axiosConfig.js`

### API and interviews

- [Express server](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/server.js): `Phase2/server.js`
- [Authentication](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/authController.js): `Phase2/controllers/authController.js`
- [JWT middleware](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/middleware/authMiddleware.js): `Phase2/middleware/authMiddleware.js`
- [Interview records](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/interviewController.js): `Phase2/controllers/interviewController.js`
- [AI interviewer](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/interviewerController.js): `Phase2/controllers/interviewerController.js`
- [Evaluation](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/evaluationController.js): `Phase2/controllers/evaluationController.js`
- [Code execution API](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/controllers/judge0Controller.js): `Phase2/controllers/judge0Controller.js`

### Persistence

- [Prisma client](https://github.com/vinn31-git/interview-platform-ai/blob/main/Phase2/utils/db.js): `Phase2/utils/db.js`
- **SQLite database**

### External services

- **Groq AI**
- **Judge0**

### Other components

- **Candidate**

## Connections

- Candidate → Client routing: uses (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Client routing → Sign-in and profile: routes to (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Client routing → Dashboard: routes to (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Client routing → Interview setup: routes to (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Client routing → Interview room: routes to (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Client routing → Results: routes to (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Client routing → Analytics: routes to (evidence: `Phase1/src/routes/AppRoutes.jsx`)
- Sign-in and profile → Authentication API: calls (evidence: `Phase1/src/services/authService.js`)
- Interview setup → Interview history API: starts interview (evidence: `Phase1/src/pages/InterviewSetup.jsx`)
- Interview room → Interview history API: saves results (evidence: `Phase1/src/pages/InterviewRoom.jsx`)
- Interview room → AI interviewer: interview chat (evidence: `Phase1/src/pages/InterviewRoom.jsx`)
- Interview room → Code editor: renders (evidence: `Phase1/src/pages/InterviewRoom.jsx`)
- Interview room → Speech input: uses speech (evidence: `Phase1/src/pages/InterviewRoom.jsx`)
- Interview room → Code execution API: runs code (evidence: `Phase1/src/pages/InterviewRoom.jsx`)
- Results → Interview history API: loads record (evidence: `Phase1/src/pages/Results.jsx`)
- Analytics → Interview history API: loads history (evidence: `Phase1/src/pages/Analytics.jsx`)
- Interview history API → HTTP client: sends requests (evidence: `Phase1/src/services/interviewHistoryService.js`)
- Authentication API → HTTP client: sends requests (evidence: `Phase1/src/services/authService.js`)
- HTTP client → Express server: API requests (evidence: `README.md`)
- Express server → Authentication: mounts auth routes (evidence: `Phase2/server.js`)
- Express server → JWT middleware: protects routes (evidence: `Phase2/server.js`)
- Express server → Interview records: mounts interview API
- Express server → AI interviewer: mounts AI routes (evidence: `Phase2/server.js`)
- Express server → Evaluation: mounts evaluation API (evidence: `Phase2/server.js`)
- Express server → Code execution API: mounts code API (evidence: `Phase2/server.js`)
- Authentication → Prisma client: reads and writes (evidence: `Phase2/controllers/authController.js`)
- Interview records → Prisma client: reads and writes (evidence: `Phase2/controllers/interviewController.js`)
- Prisma client → SQLite database: persists data (evidence: `README.md`)
- AI interviewer → Groq AI: requests completions (evidence: `Phase2/controllers/interviewerController.js`)
- Code execution API → Judge0: executes code
- Evaluation → Groq AI: AI evaluation (evidence: `README.md`)
