# manish-acharyya/interviewiq architecture

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

- Interactive diagram: https://gitdiagram.com/manish-acharyya/interviewiq
- Repository: https://github.com/manish-acharyya/interviewiq

## Overview

InterviewIQ.AI lets candidates configure a mock interview, answer AI-generated questions, and review scored feedback and interview history. The React client provides account access, interview setup and practice, reports, and credit-plan purchases; Express controllers handle authentication, interview evaluation, and payments against MongoDB and external AI/payment services. Resume analysis, speech interaction, and OAuth are documented capabilities, but their full implementation is not shown in the excerpts. Edges reflect shown imports, calls, or documented capabilities; unsampled details are left unconnected.

Main entry points: [`client/src/App.jsx`](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/App.jsx) (Application routes), [`client/src/services/interviewservice.js`](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/interviewservice.js) (Interview API client), [`server/controller/interviewcontroller.js`](https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/interviewcontroller.js) (Interview workflows), [`server/controller/paymentcontroller.js`](https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/paymentcontroller.js) (Payment workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Candidate experience"]
  node_app["Application routes<br/>[App.jsx]"]
  node_auth_ui["Account access<br/>[Login.jsx]"]
  node_auth_context["Auth context<br/>[AuthContext.jsx]"]
  node_interview_setup["Interview setup<br/>[Step1Setup.jsx]"]
  node_interview_session["Interview session<br/>[Step2Interview.jsx]"]
  node_interview_result["Report presentation<br/>[Step3Report.jsx]"]
  node_history["Interview history"]
  node_pricing["Credit plans<br/>[Pricing.jsx]"]
  node_client_auth_service["Auth API client<br/>[authservice.js]"]
  node_client_interview_service["Interview API client"]
  node_client_payment_service["Payment API client<br/>[paymentservice.js]"]
end

subgraph group_server["API and domain workflows"]
  node_auth_routes["Auth routes<br/>[authRoute.js]"]
  node_auth_controller["Account workflows<br/>[authcontroller.js]"]
  node_auth_guard["JWT guard<br/>[isAuth.js]"]
  node_interview_routes["Interview routes<br/>[interviewroute.js]"]
  node_interview_controller["Interview workflows"]
  node_payment_routes["Payment routes<br/>[paymentRoute.js]"]
  node_payment_controller["Payment workflows"]
end

subgraph group_data["Persistent data"]
  node_user_store[("User records<br/>[usermodel.js]")]
  node_interview_store[("Interview records<br/>[interviewmodel.js]")]
  node_payment_store[("Payment records<br/>[paymentmodel.js]")]
end

subgraph group_integrations["External services"]
  node_ai_service["AI completion service"]
  node_razorpay_service["Razorpay client<br/>[razorpayService.js]"]
  node_email["Email transport<br/>[email.js]"]
end

node_candidate(("Candidate"))
node_ai_provider["OpenRouter AI"]
node_razorpay["Razorpay"]

node_candidate -->|"uses"| node_app
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_interview_setup
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_pricing
node_app -->|"routes to"| node_interview_result
node_auth_ui -->|"updates"| node_auth_context
node_auth_context -->|"calls"| node_client_auth_service
node_auth_ui -->|"calls"| node_client_auth_service
node_interview_setup -->|"calls"| node_client_interview_service
node_interview_session -->|"calls"| node_client_interview_service
node_history -->|"fetches"| node_client_interview_service
node_interview_result -->|"fetches"| node_client_interview_service
node_pricing -->|"calls"| node_client_payment_service
node_client_auth_service -->|"HTTP requests"| node_auth_routes
node_client_interview_service -->|"HTTP requests"| node_interview_routes
node_client_payment_service -->|"HTTP requests"| node_payment_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_routes -->|"guards current user"| node_auth_guard
node_interview_routes -->|"dispatches"| node_interview_controller
node_interview_routes -->|"guards requests"| node_auth_guard
node_payment_routes -->|"dispatches"| node_payment_controller
node_payment_routes -->|"guards requests"| node_auth_guard
node_auth_controller -->|"reads and writes"| node_user_store
node_auth_controller -->|"sends mail"| node_email
node_interview_controller -->|"reads and updates"| node_user_store
node_interview_controller -->|"creates and updates"| node_interview_store
node_interview_controller -->|"requests evaluation"| node_ai_service
node_ai_service -->|"sends prompts"| node_ai_provider
node_payment_controller -->|"creates and updates"| node_payment_store
node_payment_controller -->|"credits user"| node_user_store
node_payment_controller -->|"creates orders"| node_razorpay_service
node_razorpay_service -.->|"integrates"| node_razorpay
node_candidate -.->|"practices by voice"| node_interview_session
node_candidate -.->|"may use OAuth"| node_auth_ui

click node_app "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/App.jsx"
click node_auth_ui "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/pages/Login.jsx"
click node_auth_context "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/context/AuthContext.jsx"
click node_interview_setup "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/components/Step1Setup.jsx"
click node_interview_session "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/components/Step2Interview.jsx"
click node_interview_result "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/components/Step3Report.jsx"
click node_history "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/pages/InterviewHistory.jsx"
click node_pricing "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/pages/Pricing.jsx"
click node_client_auth_service "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/authservice.js"
click node_client_interview_service "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/interviewservice.js"
click node_client_payment_service "https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/paymentservice.js"
click node_auth_routes "https://github.com/manish-acharyya/interviewiq/blob/main/server/routes/authRoute.js"
click node_auth_controller "https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/authcontroller.js"
click node_auth_guard "https://github.com/manish-acharyya/interviewiq/blob/main/server/middlewares/isAuth.js"
click node_interview_routes "https://github.com/manish-acharyya/interviewiq/blob/main/server/routes/interviewroute.js"
click node_interview_controller "https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/interviewcontroller.js"
click node_payment_routes "https://github.com/manish-acharyya/interviewiq/blob/main/server/routes/paymentRoute.js"
click node_payment_controller "https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/paymentcontroller.js"
click node_user_store "https://github.com/manish-acharyya/interviewiq/blob/main/server/model/usermodel.js"
click node_interview_store "https://github.com/manish-acharyya/interviewiq/blob/main/server/model/interviewmodel.js"
click node_payment_store "https://github.com/manish-acharyya/interviewiq/blob/main/server/model/paymentmodel.js"
click node_ai_service "https://github.com/manish-acharyya/interviewiq/blob/main/server/services/openRouterService.js"
click node_razorpay_service "https://github.com/manish-acharyya/interviewiq/blob/main/server/services/razorpayService.js"
click node_email "https://github.com/manish-acharyya/interviewiq/blob/main/server/config/email.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_auth_ui,node_auth_context,node_interview_setup,node_interview_session,node_interview_result,node_history,node_pricing,node_client_auth_service,node_client_interview_service,node_client_payment_service toneBlue
class node_auth_routes,node_auth_controller,node_auth_guard,node_interview_routes,node_interview_controller,node_payment_routes,node_payment_controller toneAmber
class node_user_store,node_interview_store,node_payment_store,node_ai_provider toneMint
class node_ai_service,node_razorpay_service,node_email toneRose
class node_candidate,node_razorpay toneIndigo
```

## Components

### Candidate experience

- [Application routes](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Account access](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [Auth context](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Interview setup](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/components/Step1Setup.jsx): `client/src/components/Step1Setup.jsx`
- [Interview session](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/components/Step2Interview.jsx): `client/src/components/Step2Interview.jsx`
- [Report presentation](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/components/Step3Report.jsx): `client/src/components/Step3Report.jsx`
- [Interview history](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/pages/InterviewHistory.jsx): `client/src/pages/InterviewHistory.jsx`
- [Credit plans](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/pages/Pricing.jsx): `client/src/pages/Pricing.jsx`
- [Auth API client](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/authservice.js): `client/src/services/authservice.js`
- [Interview API client](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/interviewservice.js): `client/src/services/interviewservice.js`
- [Payment API client](https://github.com/manish-acharyya/interviewiq/blob/main/client/src/services/paymentservice.js): `client/src/services/paymentservice.js`

### API and domain workflows

- [Auth routes](https://github.com/manish-acharyya/interviewiq/blob/main/server/routes/authRoute.js): `server/routes/authRoute.js`
- [Account workflows](https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/authcontroller.js): `server/controller/authcontroller.js`
- [JWT guard](https://github.com/manish-acharyya/interviewiq/blob/main/server/middlewares/isAuth.js): `server/middlewares/isAuth.js`
- [Interview routes](https://github.com/manish-acharyya/interviewiq/blob/main/server/routes/interviewroute.js): `server/routes/interviewroute.js`
- [Interview workflows](https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/interviewcontroller.js): `server/controller/interviewcontroller.js`
- [Payment routes](https://github.com/manish-acharyya/interviewiq/blob/main/server/routes/paymentRoute.js): `server/routes/paymentRoute.js`
- [Payment workflows](https://github.com/manish-acharyya/interviewiq/blob/main/server/controller/paymentcontroller.js): `server/controller/paymentcontroller.js`

### Persistent data

- [User records](https://github.com/manish-acharyya/interviewiq/blob/main/server/model/usermodel.js): `server/model/usermodel.js`
- [Interview records](https://github.com/manish-acharyya/interviewiq/blob/main/server/model/interviewmodel.js): `server/model/interviewmodel.js`
- [Payment records](https://github.com/manish-acharyya/interviewiq/blob/main/server/model/paymentmodel.js): `server/model/paymentmodel.js`

### External services

- [AI completion service](https://github.com/manish-acharyya/interviewiq/blob/main/server/services/openRouterService.js): `server/services/openRouterService.js`
- [Razorpay client](https://github.com/manish-acharyya/interviewiq/blob/main/server/services/razorpayService.js): `server/services/razorpayService.js`
- [Email transport](https://github.com/manish-acharyya/interviewiq/blob/main/server/config/email.js): `server/config/email.js`

### Other components

- **Candidate**
- **OpenRouter AI**
- **Razorpay**

## Connections

- Candidate → Application routes: uses
- Application routes → Account access: routes to (evidence: `client/src/App.jsx`)
- Application routes → Interview setup: routes to (evidence: `client/src/App.jsx`)
- Application routes → Interview history: routes to (evidence: `client/src/App.jsx`)
- Application routes → Credit plans: routes to (evidence: `client/src/App.jsx`)
- Application routes → Report presentation: routes to (evidence: `client/src/App.jsx`)
- Account access → Auth context: updates (evidence: `client/src/pages/Login.jsx`)
- Auth context → Auth API client: calls (evidence: `client/src/context/AuthContext.jsx`)
- Account access → Auth API client: calls (evidence: `client/src/pages/Login.jsx`)
- Interview setup → Interview API client: calls (evidence: `client/src/components/Step1Setup.jsx`)
- Interview session → Interview API client: calls (evidence: `client/src/components/Step2Interview.jsx`)
- Interview history → Interview API client: fetches (evidence: `client/src/pages/InterviewHistory.jsx`)
- Report presentation → Interview API client: fetches (evidence: `client/src/pages/InterviewReport.jsx`)
- Credit plans → Payment API client: calls (evidence: `client/src/pages/Pricing.jsx`)
- Auth API client → Auth routes: HTTP requests (evidence: `client/src/services/authservice.js`)
- Interview API client → Interview routes: HTTP requests (evidence: `client/src/services/interviewservice.js`)
- Payment API client → Payment routes: HTTP requests (evidence: `client/src/services/paymentservice.js`)
- Auth routes → Account workflows: dispatches (evidence: `server/routes/authRoute.js`)
- Auth routes → JWT guard: guards current user (evidence: `server/routes/authRoute.js`)
- Interview routes → Interview workflows: dispatches (evidence: `server/routes/interviewroute.js`)
- Interview routes → JWT guard: guards requests (evidence: `server/routes/interviewroute.js`)
- Payment routes → Payment workflows: dispatches (evidence: `server/routes/paymentRoute.js`)
- Payment routes → JWT guard: guards requests (evidence: `server/routes/paymentRoute.js`)
- Account workflows → User records: reads and writes (evidence: `server/controller/authcontroller.js`)
- Account workflows → Email transport: sends mail (evidence: `server/controller/authcontroller.js`)
- Interview workflows → User records: reads and updates (evidence: `server/controller/interviewcontroller.js`)
- Interview workflows → Interview records: creates and updates (evidence: `server/controller/interviewcontroller.js`)
- Interview workflows → AI completion service: requests evaluation (evidence: `server/controller/interviewcontroller.js`)
- AI completion service → OpenRouter AI: sends prompts (evidence: `server/services/openRouterService.js`)
- Payment workflows → Payment records: creates and updates (evidence: `server/controller/paymentcontroller.js`)
- Payment workflows → User records: credits user (evidence: `server/controller/paymentcontroller.js`)
- Payment workflows → Razorpay client: creates orders (evidence: `server/controller/paymentcontroller.js`)
- Razorpay client → Razorpay: integrates
- Candidate → Interview session: practices by voice
- Candidate → Account access: may use OAuth
