# prasannaram2k4/insightify architecture

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

- Interactive diagram: https://gitdiagram.com/prasannaram2k4/insightify
- Repository: https://github.com/prasannaram2k4/insightify

## Overview

Insightify lets a user upload a resume and job description, optionally select a Hugging Face model, and receive a similarity score, keyword suggestions, interview questions, and a downloadable checklist. The React app submits the files to FastAPI; the API coordinates text extraction and analysis, optionally calls model generation, and saves results when MongoDB is available. The README documents history retrieval and checklist downloads. Source excerpts show the request and backend calls; the UI’s history behavior is not shown, so no frontend history link is inferred.

Main entry points: [`backend/app.py`](https://github.com/prasannaram2k4/insightify/blob/main/backend/app.py) (FastAPI API), [`frontend/src/App.jsx`](https://github.com/prasannaram2k4/insightify/blob/main/frontend/src/App.jsx) (Analysis UI), [`backend/utils_parse.py`](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py) (Model generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_webapp["Analysis UI<br/>[App.jsx]"]
end

subgraph group_api["API orchestration"]
  node_api_server["FastAPI API<br/>[app.py]"]
  node_history_route["Analysis history<br/>[app.py]"]
end

subgraph group_analysis["Resume analysis"]
  node_text_extract["Text extraction<br/>[utils_parse.py]"]
  node_keyword_match["Keyword suggestions<br/>[utils_parse.py]"]
  node_score_calc["TF-IDF scoring<br/>[utils_parse.py]"]
  node_question_prep["Question preparation<br/>[utils_parse.py]"]
  node_model_generation["Model generation<br/>[utils_parse.py]"]
  node_checklist_builder["Checklist builder<br/>[utils_parse.py]"]
end

subgraph group_state["Persistence and files"]
  node_checklist_files[("Checklist files<br/>[app.py]")]
  node_mongo[("MongoDB")]
end

node_user(("User"))
node_hf_service["Hugging Face API"]

node_user -->|"uploads files"| node_webapp
node_webapp -->|"submits analysis"| node_api_server
node_api_server -->|"extracts text"| node_text_extract
node_api_server -->|"requests suggestions"| node_keyword_match
node_api_server -->|"requests score"| node_score_calc
node_api_server -->|"builds questions"| node_question_prep
node_api_server -->|"requests generation"| node_model_generation
node_model_generation -->|"sends prompt"| node_hf_service
node_api_server -->|"builds checklist"| node_checklist_builder
node_api_server -->|"writes and serves"| node_checklist_files
node_api_server -->|"stores analyses"| node_mongo
node_history_route -->|"reads analyses"| node_mongo
node_api_server -->|"returns results"| node_webapp
node_webapp -->|"downloads checklist"| node_api_server

click node_webapp "https://github.com/prasannaram2k4/insightify/blob/main/frontend/src/App.jsx"
click node_api_server "https://github.com/prasannaram2k4/insightify/blob/main/backend/app.py"
click node_text_extract "https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py"
click node_keyword_match "https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py"
click node_score_calc "https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py"
click node_question_prep "https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py"
click node_model_generation "https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py"
click node_checklist_builder "https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py"
click node_checklist_files "https://github.com/prasannaram2k4/insightify/blob/main/backend/app.py"
click node_history_route "https://github.com/prasannaram2k4/insightify/blob/main/backend/app.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_webapp,node_user toneBlue
class node_api_server,node_history_route toneAmber
class node_text_extract,node_keyword_match,node_score_calc,node_question_prep,node_model_generation,node_checklist_builder,node_hf_service toneMint
class node_checklist_files,node_mongo toneRose
```

## Components

### Frontend

- [Analysis UI](https://github.com/prasannaram2k4/insightify/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### API orchestration

- [FastAPI API](https://github.com/prasannaram2k4/insightify/blob/main/backend/app.py): `backend/app.py`
- [Analysis history](https://github.com/prasannaram2k4/insightify/blob/main/backend/app.py): `backend/app.py`

### Resume analysis

- [Text extraction](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py): `backend/utils_parse.py`
- [Keyword suggestions](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py): `backend/utils_parse.py`
- [TF-IDF scoring](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py): `backend/utils_parse.py`
- [Question preparation](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py): `backend/utils_parse.py`
- [Model generation](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py): `backend/utils_parse.py`
- [Checklist builder](https://github.com/prasannaram2k4/insightify/blob/main/backend/utils_parse.py): `backend/utils_parse.py`

### Persistence and files

- [Checklist files](https://github.com/prasannaram2k4/insightify/blob/main/backend/app.py): `backend/app.py`
- **MongoDB**

### Other components

- **User**
- **Hugging Face API**

## Connections

- User → Analysis UI: uploads files (evidence: `README.md`)
- Analysis UI → FastAPI API: submits analysis (evidence: `frontend/src/App.jsx`)
- FastAPI API → Text extraction: extracts text (evidence: `backend/app.py`)
- FastAPI API → Keyword suggestions: requests suggestions (evidence: `backend/app.py`)
- FastAPI API → TF-IDF scoring: requests score (evidence: `backend/app.py`)
- FastAPI API → Question preparation: builds questions (evidence: `backend/app.py`)
- FastAPI API → Model generation: requests generation (evidence: `backend/app.py`)
- Model generation → Hugging Face API: sends prompt (evidence: `backend/utils_parse.py`)
- FastAPI API → Checklist builder: builds checklist (evidence: `backend/app.py`)
- FastAPI API → Checklist files: writes and serves (evidence: `backend/app.py`)
- FastAPI API → MongoDB: stores analyses (evidence: `backend/app.py`)
- Analysis history → MongoDB: reads analyses (evidence: `backend/app.py`)
- FastAPI API → Analysis UI: returns results (evidence: `frontend/src/App.jsx`)
- Analysis UI → FastAPI API: downloads checklist (evidence: `frontend/src/App.jsx`)
