# ameercoder22/rolefit-ai architecture

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

## Overview

RoleSync AI is a resume-to-role matching, optimization, document-generation, and mock-interview product. The principal workflow is to provide a resume and job description, inspect match and ATS diagnostics, select truthful recommendations, optimize, and download a chosen template; users can also build a resume or practice and score a role-specific interview. The excerpts show backend analysis, optimization, generation, and interview logic, but not the frontend request handlers or helper-module wiring; those links are therefore omitted or marked unverified.

Main entry points: [`frontend/src/main.jsx`](https://github.com/ameercoder22/rolefit-ai/blob/main/frontend/src/main.jsx) (RoleSync UI), [`backend/app/main.py`](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py) (Match and ATS Analysis), [`backend/templates/sources`](https://github.com/ameercoder22/rolefit-ai/tree/main/backend/templates/sources) (Source Templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User Experience"]
  node_frontend["RoleSync UI<br/>[main.jsx]"]
end

subgraph group_match["Resume Matching"]
  node_resume_parse["Resume Parsing<br/>[main.py]"]
  node_match_analysis["Match and ATS Analysis<br/>[main.py]"]
  node_semantic["Semantic Similarity<br/>[main.py]"]
end

subgraph group_resume["Resume Output"]
  node_optimizer["Resume Optimization<br/>[main.py]"]
  node_docx_generation["DOCX Generation<br/>[main.py]"]
  node_template_helpers["Template Rendering Helpers"]
  node_resume_templates["Source Templates"]
end

subgraph group_interview["Mock Interview"]
  node_interview_start["Interview Generation<br/>[main.py]"]
  node_answer_evaluation["Answer Evaluation<br/>[main.py]"]
end

node_candidate(("Candidate"))
node_gemini{{"Gemini API"}}
node_sentence_transformers{{"Sentence Transformers"}}

node_candidate -->|"provides resume and job"| node_frontend
node_frontend -.->|"uploads resume"| node_resume_parse
node_frontend -.->|"requests analysis"| node_match_analysis
node_resume_parse -->|"parses resume"| node_match_analysis
node_match_analysis -->|"measures similarity"| node_semantic
node_semantic -.->|"encodes text"| node_sentence_transformers
node_frontend -.->|"submits selected recommendations"| node_optimizer
node_optimizer -->|"reanalyzes result"| node_match_analysis
node_optimizer -.->|"requests rewrite"| node_gemini
node_frontend -.->|"requests template download"| node_docx_generation
node_docx_generation -.->|"selects template"| node_resume_templates
node_frontend -.->|"starts interview"| node_interview_start
node_interview_start -.->|"generates questions"| node_gemini
node_frontend -.->|"submits answer"| node_answer_evaluation
node_answer_evaluation -.->|"requests evaluation"| node_gemini

click node_frontend "https://github.com/ameercoder22/rolefit-ai/blob/main/frontend/src/main.jsx"
click node_resume_parse "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py"
click node_match_analysis "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py"
click node_semantic "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py"
click node_optimizer "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py"
click node_docx_generation "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py"
click node_template_helpers "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/generate_helpers.py"
click node_resume_templates "https://github.com/ameercoder22/rolefit-ai/tree/main/backend/templates/sources"
click node_interview_start "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py"
click node_answer_evaluation "https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/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_frontend toneBlue
class node_resume_parse,node_match_analysis,node_semantic toneAmber
class node_optimizer,node_docx_generation,node_template_helpers,node_resume_templates,node_gemini toneMint
class node_interview_start,node_answer_evaluation toneRose
class node_candidate,node_sentence_transformers toneIndigo
```

## Components

### User Experience

- [RoleSync UI](https://github.com/ameercoder22/rolefit-ai/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### Resume Matching

- [Resume Parsing](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Match and ATS Analysis](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Semantic Similarity](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`

### Resume Output

- [Resume Optimization](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [DOCX Generation](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Template Rendering Helpers](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/generate_helpers.py): `backend/app/generate_helpers.py`
- [Source Templates](https://github.com/ameercoder22/rolefit-ai/tree/main/backend/templates/sources): `backend/templates/sources`

### Mock Interview

- [Interview Generation](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Answer Evaluation](https://github.com/ameercoder22/rolefit-ai/blob/main/backend/app/main.py): `backend/app/main.py`

### Other components

- **Candidate**
- **Gemini API**
- **Sentence Transformers**

## Connections

- Candidate → RoleSync UI: provides resume and job (evidence: `README.md`)
- RoleSync UI → Resume Parsing: uploads resume
- RoleSync UI → Match and ATS Analysis: requests analysis
- Resume Parsing → Match and ATS Analysis: parses resume (evidence: `backend/app/main.py`)
- Match and ATS Analysis → Semantic Similarity: measures similarity (evidence: `backend/app/main.py`)
- Semantic Similarity → Sentence Transformers: encodes text
- RoleSync UI → Resume Optimization: submits selected recommendations
- Resume Optimization → Match and ATS Analysis: reanalyzes result (evidence: `backend/app/main.py`)
- Resume Optimization → Gemini API: requests rewrite
- RoleSync UI → DOCX Generation: requests template download
- DOCX Generation → Source Templates: selects template
- RoleSync UI → Interview Generation: starts interview
- Interview Generation → Gemini API: generates questions
- RoleSync UI → Answer Evaluation: submits answer
- Answer Evaluation → Gemini API: requests evaluation
