# vighneshmane07/ai-rag-resume-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/vighneshmane07/ai-rag-resume-analyzer
- Repository: https://github.com/vighneshmane07/ai-rag-resume-analyzer

## Overview

AI RAG Resume Analyzer: users authenticate, upload PDFs, select indexed resumes, and ask questions answered from retrieved resume text. The backend also lists documents and stores chat records. README capabilities such as role suitability analysis, ATS suggestions, skill-gap detection, and career guidance are represented as resume-chat uses, not separate sampled modules. The implementation is concentrated in main.py and App.jsx; delete-document and history endpoints are documented but not visible in the excerpt, so their implementation links are omitted.

Main entry points: [`main.py`](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py) (PDF upload), [`frontend/src/App.jsx`](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/frontend/src/App.jsx) (Resume chat UI), [`frontend/src/main.jsx`](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/frontend/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app_entry["React entry<br/>[main.jsx]"]
  node_resume_ui["Resume chat UI<br/>[App.jsx]"]
end

subgraph group_identity["Identity"]
  node_auth_api["Signup and login<br/>[main.py]"]
  node_token_guard["JWT verification<br/>[main.py]"]
  node_password_hash["Password hashing<br/>[main.py]"]
end

subgraph group_documents["Resume indexing"]
  node_upload_api["PDF upload<br/>[main.py]"]
  node_pdf_extract["PDF text extraction<br/>[main.py]"]
  node_text_chunks["Text chunking<br/>[main.py]"]
  node_embedding["Text embeddings<br/>[main.py]"]
  node_document_api["Document listing<br/>[main.py]"]
end

subgraph group_assistant["RAG assistant"]
  node_chat_api["Resume chat<br/>[main.py]"]
  node_semantic_search["Semantic retrieval<br/>[main.py]"]
  node_prompt_build["Context prompt<br/>[main.py]"]
  node_llm["Groq LLM"]
end

subgraph group_persistence["Persistence"]
  node_chat_history["Chat history<br/>[main.py]"]
  node_mongo_users[("User records")]
  node_mongo_chats[("Chat records")]
  node_vector_store[("ChromaDB")]
end

node_user(("User"))

node_user -->|"opens"| node_app_entry
node_app_entry -->|"renders"| node_resume_ui
node_user -->|"uses"| node_resume_ui
node_resume_ui -->|"requests auth"| node_auth_api
node_auth_api -->|"hashes passwords"| node_password_hash
node_auth_api -->|"reads and writes"| node_mongo_users
node_auth_api -->|"issues JWT"| node_token_guard
node_resume_ui -->|"uploads PDF"| node_upload_api
node_upload_api -->|"requires token"| node_token_guard
node_upload_api -->|"extracts text"| node_pdf_extract
node_upload_api -->|"splits text"| node_text_chunks
node_upload_api -->|"encodes chunks"| node_embedding
node_upload_api -->|"stores chunks"| node_vector_store
node_resume_ui -->|"lists documents"| node_document_api
node_document_api -->|"requires token"| node_token_guard
node_document_api -->|"reads metadata"| node_vector_store
node_resume_ui -->|"sends question"| node_chat_api
node_chat_api -->|"requires token"| node_token_guard
node_chat_api -->|"queries chunks"| node_semantic_search
node_semantic_search -->|"encodes question"| node_embedding
node_semantic_search -->|"retrieves chunks"| node_vector_store
node_chat_api -->|"builds prompt"| node_prompt_build
node_chat_api -->|"requests completion"| node_llm
node_chat_api -->|"records exchange"| node_chat_history
node_chat_history -->|"writes records"| node_mongo_chats

click node_app_entry "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/frontend/src/main.jsx"
click node_resume_ui "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/frontend/src/App.jsx"
click node_auth_api "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_token_guard "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_password_hash "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_upload_api "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_pdf_extract "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_text_chunks "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_embedding "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_document_api "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_chat_api "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_semantic_search "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_prompt_build "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py"
click node_chat_history "https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.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_entry,node_resume_ui,node_user toneBlue
class node_auth_api,node_token_guard,node_password_hash toneAmber
class node_upload_api,node_pdf_extract,node_text_chunks,node_embedding,node_document_api toneMint
class node_chat_api,node_semantic_search,node_prompt_build,node_llm toneRose
class node_chat_history,node_mongo_users,node_mongo_chats,node_vector_store toneIndigo
```

## Components

### Web client

- [React entry](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Resume chat UI](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Identity

- [Signup and login](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [JWT verification](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [Password hashing](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`

### Resume indexing

- [PDF upload](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [PDF text extraction](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [Text chunking](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [Text embeddings](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [Document listing](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`

### RAG assistant

- [Resume chat](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [Semantic retrieval](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- [Context prompt](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- **Groq LLM**

### Persistence

- [Chat history](https://github.com/vighneshmane07/ai-rag-resume-analyzer/blob/main/main.py): `main.py`
- **User records**
- **Chat records**
- **ChromaDB**

### Other components

- **User**

## Connections

- User → React entry: opens (evidence: `README.md`)
- React entry → Resume chat UI: renders (evidence: `frontend/src/main.jsx`)
- User → Resume chat UI: uses (evidence: `README.md`)
- Resume chat UI → Signup and login: requests auth (evidence: `frontend/src/App.jsx`)
- Signup and login → Password hashing: hashes passwords (evidence: `main.py`)
- Signup and login → User records: reads and writes (evidence: `main.py`)
- Signup and login → JWT verification: issues JWT (evidence: `main.py`)
- Resume chat UI → PDF upload: uploads PDF (evidence: `frontend/src/App.jsx`)
- PDF upload → JWT verification: requires token (evidence: `main.py`)
- PDF upload → PDF text extraction: extracts text (evidence: `main.py`)
- PDF upload → Text chunking: splits text (evidence: `main.py`)
- PDF upload → Text embeddings: encodes chunks (evidence: `main.py`)
- PDF upload → ChromaDB: stores chunks (evidence: `main.py`)
- Resume chat UI → Document listing: lists documents (evidence: `frontend/src/App.jsx`)
- Document listing → JWT verification: requires token (evidence: `main.py`)
- Document listing → ChromaDB: reads metadata (evidence: `main.py`)
- Resume chat UI → Resume chat: sends question (evidence: `frontend/src/App.jsx`)
- Resume chat → JWT verification: requires token (evidence: `main.py`)
- Resume chat → Semantic retrieval: queries chunks (evidence: `main.py`)
- Semantic retrieval → Text embeddings: encodes question (evidence: `main.py`)
- Semantic retrieval → ChromaDB: retrieves chunks (evidence: `main.py`)
- Resume chat → Context prompt: builds prompt (evidence: `main.py`)
- Resume chat → Groq LLM: requests completion (evidence: `main.py`)
- Resume chat → Chat history: records exchange (evidence: `main.py`)
- Chat history → Chat records: writes records (evidence: `main.py`)
