# umesh-kale0777/rolefit-ai architecture

> Architecture diagram of the GitHub repository umesh-kale0777/rolefit-ai, 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/umesh-kale0777/rolefit-ai
- Repository: https://github.com/umesh-kale0777/rolefit-ai

## Overview

RoleFit AI is a resume-screening product. A job seeker submits a PDF and job description in the React interface; the backend parses and preprocesses them, extracts skills, computes hybrid scoring and explainability, and concurrently produces project analysis, bias findings, and interview questions before the frontend displays results. The README documents the main capabilities; unsampled-module links are included only where the source index or README supports them.

Main entry points: [`backend/app/routers/analyze.py`](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/routers/analyze.py) (Analysis endpoint), [`frontend/src/pages/Home.jsx`](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/pages/Home.jsx) (Analysis page), [`backend/app/ai/scorer.py`](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/scorer.py) (Hybrid scoring), [`frontend/src/api/analyze.js`](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/api/analyze.js) (Analysis API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_home["Analysis page<br/>[Home.jsx]"]
  node_uploader["Resume uploader<br/>[ResumeUploader.jsx]"]
  node_api_client["Analysis API client<br/>[analyze.js]"]
  node_results["Results views<br/>[ScoreCard.jsx]"]
  node_projects_view["Project results"]
  node_explain_view["Score explanation<br/>[Explainability.jsx]"]
  node_bias_view["Bias report<br/>[BiasReport.jsx]"]
  node_questions_view["Interview questions"]
end

subgraph group_api["API and orchestration"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_analyze_route["Analysis endpoint<br/>[analyze.py]"]
  node_response_schema["Response schema<br/>[schemas.py]"]
end

subgraph group_analysis["Resume analysis"]
  node_pdf_parser["PDF parser<br/>[parser.py]"]
  node_preprocessor["Text preprocessing<br/>[preprocessor.py]"]
  node_skill_extractor["Skill extraction<br/>[skill_extractor.py]"]
  node_scorer["Hybrid scoring<br/>[scorer.py]"]
  node_embedder["Text embeddings<br/>[embedder.py]"]
  node_project_extractor["Project analysis"]
end

subgraph group_insights["AI insights"]
  node_bias_detector["Bias detection<br/>[bias_detector.py]"]
  node_interview_gen["Question generation<br/>[interview_gen.py]"]
end

node_jobseeker(("Job seeker"))
node_gemini{{"Gemini API"}}

node_jobseeker -->|"submits inputs"| node_home
node_home -->|"renders"| node_uploader
node_home -->|"calls analysis"| node_api_client
node_api_client -->|"POST analysis"| node_analyze_route
node_home -->|"renders results"| node_results
node_home -->|"renders results"| node_projects_view
node_home -->|"renders results"| node_explain_view
node_home -->|"renders results"| node_bias_view
node_home -->|"renders results"| node_questions_view
node_api_app -->|"mounts router"| node_analyze_route
node_analyze_route -->|"parses PDF"| node_pdf_parser
node_analyze_route -->|"preprocesses text"| node_preprocessor
node_analyze_route -->|"extracts skills"| node_skill_extractor
node_analyze_route -->|"calculates score"| node_scorer
node_scorer -->|"uses embeddings"| node_embedder
node_scorer -->|"uses skill coverage"| node_skill_extractor
node_scorer -->|"analyzes projects"| node_project_extractor
node_analyze_route -->|"checks job text"| node_bias_detector
node_analyze_route -->|"generates questions"| node_interview_gen
node_interview_gen -.->|"requests questions"| node_gemini
node_analyze_route -->|"builds response"| node_response_schema

click node_home "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/pages/Home.jsx"
click node_uploader "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/ResumeUploader.jsx"
click node_api_client "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/api/analyze.js"
click node_results "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/ScoreCard.jsx"
click node_projects_view "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/ProjectAnalysis.jsx"
click node_explain_view "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/Explainability.jsx"
click node_bias_view "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/BiasReport.jsx"
click node_questions_view "https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/InterviewQuestions.jsx"
click node_api_app "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/main.py"
click node_analyze_route "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/routers/analyze.py"
click node_response_schema "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/models/schemas.py"
click node_pdf_parser "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/parser.py"
click node_preprocessor "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/preprocessor.py"
click node_skill_extractor "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/skill_extractor.py"
click node_scorer "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/scorer.py"
click node_embedder "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/embedder.py"
click node_project_extractor "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/project_extractor.py"
click node_bias_detector "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/bias_detector.py"
click node_interview_gen "https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/interview_gen.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_home,node_uploader,node_api_client,node_results,node_projects_view,node_explain_view,node_bias_view,node_questions_view toneBlue
class node_api_app,node_analyze_route,node_response_schema toneAmber
class node_pdf_parser,node_preprocessor,node_skill_extractor,node_scorer,node_embedder,node_project_extractor,node_gemini toneMint
class node_bias_detector,node_interview_gen toneRose
class node_jobseeker toneIndigo
```

## Components

### Web client

- [Analysis page](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Resume uploader](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/ResumeUploader.jsx): `frontend/src/components/ResumeUploader.jsx`
- [Analysis API client](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/api/analyze.js): `frontend/src/api/analyze.js`
- [Results views](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/ScoreCard.jsx): `frontend/src/components/ScoreCard.jsx`
- [Project results](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/ProjectAnalysis.jsx): `frontend/src/components/ProjectAnalysis.jsx`
- [Score explanation](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/Explainability.jsx): `frontend/src/components/Explainability.jsx`
- [Bias report](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/BiasReport.jsx): `frontend/src/components/BiasReport.jsx`
- [Interview questions](https://github.com/umesh-kale0777/rolefit-ai/blob/main/frontend/src/components/InterviewQuestions.jsx): `frontend/src/components/InterviewQuestions.jsx`

### API and orchestration

- [FastAPI application](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Analysis endpoint](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/routers/analyze.py): `backend/app/routers/analyze.py`
- [Response schema](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/models/schemas.py): `backend/app/models/schemas.py`

### Resume analysis

- [PDF parser](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/parser.py): `backend/app/ai/parser.py`
- [Text preprocessing](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/preprocessor.py): `backend/app/ai/preprocessor.py`
- [Skill extraction](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/skill_extractor.py): `backend/app/ai/skill_extractor.py`
- [Hybrid scoring](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/scorer.py): `backend/app/ai/scorer.py`
- [Text embeddings](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/embedder.py): `backend/app/ai/embedder.py`
- [Project analysis](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/project_extractor.py): `backend/app/ai/project_extractor.py`

### AI insights

- [Bias detection](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/bias_detector.py): `backend/app/ai/bias_detector.py`
- [Question generation](https://github.com/umesh-kale0777/rolefit-ai/blob/main/backend/app/ai/interview_gen.py): `backend/app/ai/interview_gen.py`

### Other components

- **Job seeker**
- **Gemini API**

## Connections

- Job seeker → Analysis page: submits inputs (evidence: `frontend/src/pages/Home.jsx`)
- Analysis page → Resume uploader: renders (evidence: `frontend/src/pages/Home.jsx`)
- Analysis page → Analysis API client: calls analysis (evidence: `frontend/src/pages/Home.jsx`)
- Analysis API client → Analysis endpoint: POST analysis (evidence: `README.md`)
- Analysis page → Results views: renders results (evidence: `frontend/src/pages/Home.jsx`)
- Analysis page → Project results: renders results (evidence: `frontend/src/pages/Home.jsx`)
- Analysis page → Score explanation: renders results (evidence: `frontend/src/pages/Home.jsx`)
- Analysis page → Bias report: renders results (evidence: `frontend/src/pages/Home.jsx`)
- Analysis page → Interview questions: renders results (evidence: `frontend/src/pages/Home.jsx`)
- FastAPI application → Analysis endpoint: mounts router (evidence: `backend/app/main.py`)
- Analysis endpoint → PDF parser: parses PDF (evidence: `backend/app/routers/analyze.py`)
- Analysis endpoint → Text preprocessing: preprocesses text (evidence: `backend/app/routers/analyze.py`)
- Analysis endpoint → Skill extraction: extracts skills (evidence: `backend/app/routers/analyze.py`)
- Analysis endpoint → Hybrid scoring: calculates score (evidence: `backend/app/routers/analyze.py`)
- Hybrid scoring → Text embeddings: uses embeddings (evidence: `backend/app/ai/scorer.py`)
- Hybrid scoring → Skill extraction: uses skill coverage (evidence: `backend/app/ai/scorer.py`)
- Hybrid scoring → Project analysis: analyzes projects (evidence: `backend/app/ai/scorer.py`)
- Analysis endpoint → Bias detection: checks job text (evidence: `backend/app/routers/analyze.py`)
- Analysis endpoint → Question generation: generates questions (evidence: `backend/app/routers/analyze.py`)
- Question generation → Gemini API: requests questions (evidence: `backend/app/ai/interview_gen.py`)
- Analysis endpoint → Response schema: builds response (evidence: `backend/app/routers/analyze.py`)
