# dikshit-rao/interviewiq architecture

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

- Interactive diagram: https://gitdiagram.com/dikshit-rao/interviewiq
- Repository: https://github.com/dikshit-rao/interviewiq

## Overview

InterviewIQ is a placement-preparation web app whose main workflows are indexing PDFs for cited, multi-document Q&A and conducting scored mock interviews whose history feeds dashboard and subject-performance views. The React screens call a FastAPI API; its handlers coordinate the RAG pipeline, Gemini requests, and SQLite records. The README documents these capabilities, while the sampled backend and frontend source supports the shown calls. Some UI pages and API integrations were not fully excerpted, so their links rely on the SOURCE INDEX or documented endpoints.

Main entry points: [`backend/app.py`](https://github.com/dikshit-rao/interviewiq/blob/main/backend/app.py) (FastAPI handlers), [`frontend/src/App.jsx`](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/App.jsx) (Page navigation), [`frontend/src/api.js`](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/api.js) (HTTP client), [`backend/llm.py`](https://github.com/dikshit-rao/interviewiq/blob/main/backend/llm.py) (Gemini tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_app_ui["Page navigation<br/>[App.jsx]"]
  node_chat_ui["Document Q&amp;A<br/>[Chat.jsx]"]
  node_documents_ui["Document manager<br/>[Documents.jsx]"]
  node_interview_ui["Mock interview<br/>[Interview.jsx]"]
  node_dashboard_ui["Readiness dashboard<br/>[Dashboard.jsx]"]
  node_performance_ui["Subject performance<br/>[Performance.jsx]"]
  node_api_client["HTTP client<br/>[api.js]"]
end

subgraph group_api["API workflows"]
  node_api_service["FastAPI handlers<br/>[app.py]"]
  node_schemas["Request schemas<br/>[models.py]"]
end

subgraph group_rag["Document retrieval"]
  node_pdf_pipeline["PDF indexing<br/>[pipeline.py]"]
  node_pdf_processor["Extract and chunk<br/>[pdf_processor.py]"]
  node_embeddings["Text embeddings<br/>[embeddings.py]"]
  node_vector_store[("FAISS index<br/>[vector_store.py]")]
  node_retriever["Chunk retrieval<br/>[retriever.py]"]
end

subgraph group_interview["Interview and records"]
  node_llm["Gemini tasks<br/>[llm.py]"]
  node_prompts["Prompt templates<br/>[prompts.py]"]
  node_relational_db[("SQLite records<br/>[database.py]")]
end

node_user(("Learner"))
node_gemini["Google Gemini"]

node_user -->|"uses"| node_app_ui
node_app_ui -->|"selects page"| node_chat_ui
node_app_ui -->|"selects page"| node_documents_ui
node_app_ui -->|"selects page"| node_interview_ui
node_app_ui -->|"selects page"| node_dashboard_ui
node_app_ui -->|"selects page"| node_performance_ui
node_chat_ui -->|"asks and lists"| node_api_client
node_documents_ui -->|"uploads and lists"| node_api_client
node_interview_ui -->|"starts and submits"| node_api_client
node_dashboard_ui -->|"loads metrics"| node_api_client
node_performance_ui -->|"loads breakdown"| node_api_client
node_api_client -->|"HTTP requests"| node_api_service
node_api_service -->|"validates requests"| node_schemas
node_api_service -->|"indexes uploads"| node_pdf_pipeline
node_pdf_pipeline -->|"extracts chunks"| node_pdf_processor
node_pdf_pipeline -->|"embeds chunks"| node_embeddings
node_pdf_pipeline -->|"stores vectors"| node_vector_store
node_api_service -->|"retrieves context"| node_retriever
node_retriever -->|"embeds query"| node_embeddings
node_retriever -->|"searches index"| node_vector_store
node_api_service -->|"generates answers"| node_llm
node_api_service -->|"generates questions"| node_llm
node_api_service -->|"evaluates answers"| node_llm
node_llm -->|"formats prompts"| node_prompts
node_llm -->|"generates content"| node_gemini
node_api_service -->|"stores sessions and scores"| node_relational_db
node_api_service -->|"reads dashboard data"| node_relational_db

click node_app_ui "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/App.jsx"
click node_chat_ui "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Chat.jsx"
click node_documents_ui "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Documents.jsx"
click node_interview_ui "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Interview.jsx"
click node_dashboard_ui "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Dashboard.jsx"
click node_performance_ui "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Performance.jsx"
click node_api_client "https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/api.js"
click node_api_service "https://github.com/dikshit-rao/interviewiq/blob/main/backend/app.py"
click node_pdf_pipeline "https://github.com/dikshit-rao/interviewiq/blob/main/backend/pipeline.py"
click node_pdf_processor "https://github.com/dikshit-rao/interviewiq/blob/main/backend/pdf_processor.py"
click node_embeddings "https://github.com/dikshit-rao/interviewiq/blob/main/backend/embeddings.py"
click node_vector_store "https://github.com/dikshit-rao/interviewiq/blob/main/backend/vector_store.py"
click node_retriever "https://github.com/dikshit-rao/interviewiq/blob/main/backend/retriever.py"
click node_llm "https://github.com/dikshit-rao/interviewiq/blob/main/backend/llm.py"
click node_prompts "https://github.com/dikshit-rao/interviewiq/blob/main/backend/prompts.py"
click node_relational_db "https://github.com/dikshit-rao/interviewiq/blob/main/backend/database.py"
click node_schemas "https://github.com/dikshit-rao/interviewiq/blob/main/backend/models.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_app_ui,node_chat_ui,node_documents_ui,node_interview_ui,node_dashboard_ui,node_performance_ui,node_api_client toneBlue
class node_api_service,node_schemas toneAmber
class node_pdf_pipeline,node_pdf_processor,node_embeddings,node_vector_store,node_retriever toneMint
class node_llm,node_prompts,node_relational_db toneRose
class node_user,node_gemini toneIndigo
```

## Components

### Web interface

- [Page navigation](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Document Q&A](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Chat.jsx): `frontend/src/pages/Chat.jsx`
- [Document manager](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Documents.jsx): `frontend/src/pages/Documents.jsx`
- [Mock interview](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Interview.jsx): `frontend/src/pages/Interview.jsx`
- [Readiness dashboard](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Subject performance](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/pages/Performance.jsx): `frontend/src/pages/Performance.jsx`
- [HTTP client](https://github.com/dikshit-rao/interviewiq/blob/main/frontend/src/api.js): `frontend/src/api.js`

### API workflows

- [FastAPI handlers](https://github.com/dikshit-rao/interviewiq/blob/main/backend/app.py): `backend/app.py`
- [Request schemas](https://github.com/dikshit-rao/interviewiq/blob/main/backend/models.py): `backend/models.py`

### Document retrieval

- [PDF indexing](https://github.com/dikshit-rao/interviewiq/blob/main/backend/pipeline.py): `backend/pipeline.py`
- [Extract and chunk](https://github.com/dikshit-rao/interviewiq/blob/main/backend/pdf_processor.py): `backend/pdf_processor.py`
- [Text embeddings](https://github.com/dikshit-rao/interviewiq/blob/main/backend/embeddings.py): `backend/embeddings.py`
- [FAISS index](https://github.com/dikshit-rao/interviewiq/blob/main/backend/vector_store.py): `backend/vector_store.py`
- [Chunk retrieval](https://github.com/dikshit-rao/interviewiq/blob/main/backend/retriever.py): `backend/retriever.py`

### Interview and records

- [Gemini tasks](https://github.com/dikshit-rao/interviewiq/blob/main/backend/llm.py): `backend/llm.py`
- [Prompt templates](https://github.com/dikshit-rao/interviewiq/blob/main/backend/prompts.py): `backend/prompts.py`
- [SQLite records](https://github.com/dikshit-rao/interviewiq/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Learner**
- **Google Gemini**

## Connections

- Learner → Page navigation: uses (evidence: `frontend/src/App.jsx`)
- Page navigation → Document Q&A: selects page (evidence: `frontend/src/App.jsx`)
- Page navigation → Document manager: selects page (evidence: `frontend/src/App.jsx`)
- Page navigation → Mock interview: selects page (evidence: `frontend/src/App.jsx`)
- Page navigation → Readiness dashboard: selects page (evidence: `frontend/src/App.jsx`)
- Page navigation → Subject performance: selects page (evidence: `frontend/src/App.jsx`)
- Document Q&A → HTTP client: asks and lists (evidence: `frontend/src/pages/Chat.jsx`)
- Document manager → HTTP client: uploads and lists (evidence: `frontend/src/pages/Documents.jsx`)
- Mock interview → HTTP client: starts and submits (evidence: `frontend/src/pages/Interview.jsx`)
- Readiness dashboard → HTTP client: loads metrics (evidence: `frontend/src/pages/Dashboard.jsx`)
- Subject performance → HTTP client: loads breakdown (evidence: `frontend/src/pages/Performance.jsx`)
- HTTP client → FastAPI handlers: HTTP requests (evidence: `frontend/src/api.js`)
- FastAPI handlers → Request schemas: validates requests (evidence: `backend/app.py`)
- FastAPI handlers → PDF indexing: indexes uploads (evidence: `backend/app.py`)
- PDF indexing → Extract and chunk: extracts chunks (evidence: `backend/pipeline.py`)
- PDF indexing → Text embeddings: embeds chunks (evidence: `backend/pipeline.py`)
- PDF indexing → FAISS index: stores vectors (evidence: `backend/pipeline.py`)
- FastAPI handlers → Chunk retrieval: retrieves context (evidence: `backend/app.py`)
- Chunk retrieval → Text embeddings: embeds query (evidence: `backend/retriever.py`)
- Chunk retrieval → FAISS index: searches index (evidence: `backend/retriever.py`)
- FastAPI handlers → Gemini tasks: generates answers (evidence: `backend/app.py`)
- FastAPI handlers → Gemini tasks: generates questions (evidence: `backend/app.py`)
- FastAPI handlers → Gemini tasks: evaluates answers (evidence: `backend/app.py`)
- Gemini tasks → Prompt templates: formats prompts (evidence: `backend/llm.py`)
- Gemini tasks → Google Gemini: generates content (evidence: `backend/llm.py`)
- FastAPI handlers → SQLite records: stores sessions and scores (evidence: `backend/app.py`)
- FastAPI handlers → SQLite records: reads dashboard data (evidence: `backend/app.py`)
