# snehalkrushnabandal/snehal-ai-representative architecture

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

- Interactive diagram: https://gitdiagram.com/snehalkrushnabandal/snehal-ai-representative
- Repository: https://github.com/snehalkrushnabandal/snehal-ai-representative

## Overview

Snehal AI is a candidate-representative portfolio with a profile and projects interface plus an AI recruiter chat. The visible chat flow sends a question and conversation history from the browser to the FastAPI streaming endpoint, which generates an answer using candidate context and Groq. The backend also contains resume parsing and job-match models, and the UI includes recruiter job-description analysis; their detailed routes are not shown. The empty README and partial backend excerpt limit evidence for those broader capabilities.

Main entry points: [`frontend/src/App.jsx`](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/App.jsx) (Portfolio Views), [`backend/snehal-ai.py`](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py) (Chat API), [`frontend/src/components/AIChat.jsx`](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/components/AIChat.jsx) (Chat Interface), [`frontend/src/main.jsx`](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/main.jsx) (Web Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portfolio["Portfolio UI"]
  node_web_entry["Web Entry<br/>[main.jsx]"]
  node_portfolio_app["Portfolio Views<br/>[App.jsx]"]
  node_profile_projects["Profile &amp; Projects<br/>[App.jsx]"]
  node_chat_ui["Chat Interface<br/>[AIChat.jsx]"]
end

subgraph group_assistant["AI Assistant"]
  node_chat_api["Chat API<br/>[snehal-ai.py]"]
  node_candidate_answer["Answer Generation<br/>[snehal-ai.py]"]
  node_candidate_context["Context Selection<br/>[snehal-ai.py]"]
  node_resume_parser["Resume Parsing<br/>[snehal-ai.py]"]
  node_job_match["Job Matching<br/>[snehal-ai.py]"]
end

subgraph group_candidate["Candidate Data"]
  node_profile_loader["Profile Loader"]
  node_profile_file["Candidate Profile"]
end

node_recruiter(("Recruiter"))
node_groq["Groq API"]

node_recruiter -->|"opens portfolio"| node_web_entry
node_web_entry -->|"renders"| node_portfolio_app
node_portfolio_app -->|"shows views"| node_profile_projects
node_portfolio_app -->|"opens chat"| node_chat_ui
node_recruiter -->|"asks questions"| node_chat_ui
node_chat_ui -->|"streams question"| node_chat_api
node_chat_api -->|"dispatches"| node_candidate_answer
node_candidate_answer -.->|"selects context"| node_candidate_context
node_candidate_answer -->|"requests completion"| node_groq
node_resume_parser -->|"requests parse"| node_groq
node_job_match -.->|"evaluates match"| node_groq
node_chat_api -->|"imports helper"| node_profile_loader
node_profile_loader -.->|"loads JSON"| node_profile_file

click node_web_entry "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/main.jsx"
click node_portfolio_app "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/App.jsx"
click node_profile_projects "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/App.jsx"
click node_chat_ui "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/components/AIChat.jsx"
click node_chat_api "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py"
click node_candidate_answer "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py"
click node_candidate_context "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py"
click node_resume_parser "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py"
click node_job_match "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py"
click node_profile_loader "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/services/candidate_service.py"
click node_profile_file "https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/candidate_profile.json"

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_web_entry,node_portfolio_app,node_profile_projects,node_chat_ui toneBlue
class node_chat_api,node_candidate_answer,node_candidate_context,node_resume_parser,node_job_match toneAmber
class node_profile_loader,node_profile_file,node_groq toneMint
class node_recruiter toneIndigo
```

## Components

### Portfolio UI

- [Web Entry](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Portfolio Views](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Profile & Projects](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Chat Interface](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/frontend/src/components/AIChat.jsx): `frontend/src/components/AIChat.jsx`

### AI Assistant

- [Chat API](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py): `backend/snehal-ai.py`
- [Answer Generation](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py): `backend/snehal-ai.py`
- [Context Selection](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py): `backend/snehal-ai.py`
- [Resume Parsing](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py): `backend/snehal-ai.py`
- [Job Matching](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/snehal-ai.py): `backend/snehal-ai.py`

### Candidate Data

- [Profile Loader](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/services/candidate_service.py): `backend/services/candidate_service.py`
- [Candidate Profile](https://github.com/snehalkrushnabandal/snehal-ai-representative/blob/main/backend/candidate_profile.json): `backend/candidate_profile.json`

### Other components

- **Recruiter**
- **Groq API**

## Connections

- Recruiter → Web Entry: opens portfolio (evidence: `frontend/src/main.jsx`)
- Web Entry → Portfolio Views: renders (evidence: `frontend/src/main.jsx`)
- Portfolio Views → Profile & Projects: shows views (evidence: `frontend/src/App.jsx`)
- Portfolio Views → Chat Interface: opens chat (evidence: `frontend/src/App.jsx`)
- Recruiter → Chat Interface: asks questions (evidence: `frontend/src/components/AIChat.jsx`)
- Chat Interface → Chat API: streams question (evidence: `frontend/src/components/AIChat.jsx`)
- Chat API → Answer Generation: dispatches (evidence: `backend/snehal-ai.py`)
- Answer Generation → Context Selection: selects context (evidence: `backend/snehal-ai.py`)
- Answer Generation → Groq API: requests completion (evidence: `backend/snehal-ai.py`)
- Resume Parsing → Groq API: requests parse (evidence: `backend/snehal-ai.py`)
- Job Matching → Groq API: evaluates match
- Chat API → Profile Loader: imports helper (evidence: `backend/snehal-ai.py`)
- Profile Loader → Candidate Profile: loads JSON
