# vaishnavi-3-naik/ai-interview-platform architecture

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

- Interactive diagram: https://gitdiagram.com/vaishnavi-3-naik/ai-interview-platform
- Repository: https://github.com/vaishnavi-3-naik/ai-interview-platform

## Overview

This is an AI interview practice platform: users register or log in, configure an interview, answer questions, receive AI feedback, and review results and history. The sampled backend confirms interview creation, retrieval and completion, plus answer evaluation; the client tree identifies setup, interview, result and history screens. The question-generation service is present, but its route and caller are not evidenced in the sampled source, so it is shown as a separate capability. Frontend API wiring is likewise not inferred.

Main entry points: [`client/src/App.jsx`](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/App.jsx) (Client router), [`server/server.js`](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/server.js) (HTTP API), [`server/routes/interviewRoutes.js`](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/interviewRoutes.js) (Interview routes), [`server/routes/aiRoutes.js`](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/aiRoutes.js) (AI routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Client router<br/>[App.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_login["Login<br/>[Login.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_setup["Interview setup<br/>[InterviewSetup.jsx]"]
  node_interview_ui["Interview session<br/>[Interview.jsx]"]
  node_result["Interview result"]
  node_history["Interview history"]
end

subgraph group_api["API and access"]
  node_http_api["HTTP API<br/>[server.js]"]
  node_auth_routes["Auth routes<br/>[authRoutes.js]"]
  node_interview_routes["Interview routes<br/>[interviewRoutes.js]"]
  node_ai_routes["AI routes<br/>[aiRoutes.js]"]
  node_auth_middleware["JWT protection<br/>[authMiddleware.js]"]
end

subgraph group_interviews["Interview workflow"]
  node_interview_controller["Interview operations"]
  node_interview_model["Interview model<br/>[Interview.js]"]
  node_ai_controller["Answer evaluation<br/>[aiController.js]"]
  node_question_service["Question generation<br/>[geminiService.js]"]
end

subgraph group_identity["Accounts"]
  node_auth_controller["Account operations<br/>[authController.js]"]
  node_user_routes["Profile route<br/>[userRoutes.js]"]
  node_user_model["User model<br/>[User.js]"]
end

subgraph group_integrations["AI and storage"]
  node_gemini["Google Gemini"]
  node_db_config["Database connection<br/>[db.js]"]
  node_mongo[("MongoDB")]
end

node_candidate(("Candidate"))

node_candidate -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_setup
node_app -->|"routes to"| node_interview_ui
node_app -->|"routes to"| node_result
node_app -->|"routes to"| node_history
node_http_api -->|"mounts"| node_auth_routes
node_http_api -->|"mounts"| node_interview_routes
node_http_api -->|"mounts"| node_ai_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_interview_routes -->|"protects"| node_auth_middleware
node_interview_routes -->|"dispatches"| node_interview_controller
node_ai_routes -->|"protects"| node_auth_middleware
node_ai_routes -->|"dispatches"| node_ai_controller
node_auth_controller -->|"reads and writes"| node_user_model
node_user_routes -->|"protects"| node_auth_middleware
node_user_routes -->|"reads"| node_user_model
node_interview_controller -->|"reads and writes"| node_interview_model
node_ai_controller -->|"evaluates with"| node_gemini
node_question_service -->|"generates with"| node_gemini
node_http_api -->|"connects through"| node_db_config
node_db_config -->|"connects"| node_mongo

click node_app "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/App.jsx"
click node_api_client "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/services/api.js"
click node_login "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/Login.jsx"
click node_dashboard "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/Dashboard.jsx"
click node_setup "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/InterviewSetup.jsx"
click node_interview_ui "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/Interview.jsx"
click node_result "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/InterviewResult.jsx"
click node_history "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/InterviewHistory.jsx"
click node_http_api "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/server.js"
click node_auth_routes "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/authRoutes.js"
click node_interview_routes "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/interviewRoutes.js"
click node_ai_routes "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/aiRoutes.js"
click node_auth_middleware "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/middleware/authMiddleware.js"
click node_auth_controller "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/controllers/authController.js"
click node_user_routes "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/userRoutes.js"
click node_user_model "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/models/User.js"
click node_interview_controller "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/controllers/interviewController.js"
click node_interview_model "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/models/Interview.js"
click node_ai_controller "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/controllers/aiController.js"
click node_question_service "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/services/geminiService.js"
click node_db_config "https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/config/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_app,node_api_client,node_login,node_dashboard,node_setup,node_interview_ui,node_result,node_history toneBlue
class node_http_api,node_auth_routes,node_interview_routes,node_ai_routes,node_auth_middleware toneAmber
class node_interview_controller,node_interview_model,node_ai_controller,node_question_service toneMint
class node_auth_controller,node_user_routes,node_user_model toneRose
class node_gemini,node_db_config,node_mongo,node_candidate toneIndigo
```

## Components

### Web client

- [Client router](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [API client](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/services/api.js): `client/src/services/api.js`
- [Login](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [Dashboard](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Interview setup](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/InterviewSetup.jsx): `client/src/pages/InterviewSetup.jsx`
- [Interview session](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/Interview.jsx): `client/src/pages/Interview.jsx`
- [Interview result](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/InterviewResult.jsx): `client/src/pages/InterviewResult.jsx`
- [Interview history](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/client/src/pages/InterviewHistory.jsx): `client/src/pages/InterviewHistory.jsx`

### API and access

- [HTTP API](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/server.js): `server/server.js`
- [Auth routes](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Interview routes](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/interviewRoutes.js): `server/routes/interviewRoutes.js`
- [AI routes](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/aiRoutes.js): `server/routes/aiRoutes.js`
- [JWT protection](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/middleware/authMiddleware.js): `server/middleware/authMiddleware.js`

### Interview workflow

- [Interview operations](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/controllers/interviewController.js): `server/controllers/interviewController.js`
- [Interview model](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/models/Interview.js): `server/models/Interview.js`
- [Answer evaluation](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/controllers/aiController.js): `server/controllers/aiController.js`
- [Question generation](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/services/geminiService.js): `server/services/geminiService.js`

### Accounts

- [Account operations](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Profile route](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/routes/userRoutes.js): `server/routes/userRoutes.js`
- [User model](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/models/User.js): `server/models/User.js`

### AI and storage

- **Google Gemini**
- [Database connection](https://github.com/vaishnavi-3-naik/ai-interview-platform/blob/main/server/config/db.js): `server/config/db.js`
- **MongoDB**

### Other components

- **Candidate**

## Connections

- Candidate → Client router: opens
- Client router → Login: routes to
- Client router → Dashboard: routes to
- Client router → Interview setup: routes to
- Client router → Interview session: routes to
- Client router → Interview result: routes to
- Client router → Interview history: routes to
- HTTP API → Auth routes: mounts
- HTTP API → Interview routes: mounts
- HTTP API → AI routes: mounts
- Auth routes → Account operations: dispatches
- Interview routes → JWT protection: protects
- Interview routes → Interview operations: dispatches
- AI routes → JWT protection: protects
- AI routes → Answer evaluation: dispatches
- Account operations → User model: reads and writes
- Profile route → JWT protection: protects
- Profile route → User model: reads
- Interview operations → Interview model: reads and writes
- Answer evaluation → Google Gemini: evaluates with
- Question generation → Google Gemini: generates with
- HTTP API → Database connection: connects through
- Database connection → MongoDB: connects
