# pranay0904/ai-interview-assist-ml-service architecture

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

- Interactive diagram: https://gitdiagram.com/pranay0904/ai-interview-assist-ml-service
- Repository: https://github.com/pranay0904/ai-interview-assist-ml-service

## Overview

This is a small FastAPI NLP service. Its primary workflow accepts resume and job-description text, computes semantic similarity, and returns an ATS score. A separate Gemini module generates interview questions at import time; the sampled code does not connect it to the API. The diagram reflects the available source and omits uncertain internal framework behavior.

Main entry points: [`main.py`](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/main.py) (FastAPI Endpoint), [`services/ats_service.py`](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/services/ats_service.py) (Score Calculator), [`services/gemini_service.py`](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/services/gemini_service.py) (Question Generator), [`models/resume_ats_request_dto.py`](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/models/resume_ats_request_dto.py) (ATS Request DTO)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["ATS API"]
  node_main["FastAPI Endpoint<br/>[main.py]"]
  node_request["ATS Request DTO"]
end

subgraph group_scoring["Similarity Scoring"]
  node_ats["Score Calculator<br/>[ats_service.py]"]
  node_encoder["Sentence Transformer"]
end

subgraph group_generation["Question Generation"]
  node_gemini_service["Question Generator<br/>[gemini_service.py]"]
end

node_caller(("API Client"))
node_gemini{{"Gemini API"}}
node_console["Console Output"]

node_caller -->|"posts request"| node_main
node_main -->|"validates as"| node_request
node_main -->|"calculates score"| node_ats
node_ats -->|"encodes and compares"| node_encoder
node_ats -->|"returns score"| node_main
node_main -->|"returns score"| node_caller
node_gemini_service -.->|"generates questions"| node_gemini
node_gemini_service -.->|"prints response"| node_console

click node_main "https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/main.py"
click node_request "https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/models/resume_ats_request_dto.py"
click node_ats "https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/services/ats_service.py"
click node_gemini_service "https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/services/gemini_service.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_main,node_request,node_caller toneBlue
class node_ats,node_encoder toneAmber
class node_gemini_service,node_gemini toneMint
class node_console toneIndigo
```

## Components

### ATS API

- [FastAPI Endpoint](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/main.py): `main.py`
- [ATS Request DTO](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/models/resume_ats_request_dto.py): `models/resume_ats_request_dto.py`

### Similarity Scoring

- [Score Calculator](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/services/ats_service.py): `services/ats_service.py`
- **Sentence Transformer**

### Question Generation

- [Question Generator](https://github.com/pranay0904/ai-interview-assist-ml-service/blob/main/services/gemini_service.py): `services/gemini_service.py`

### Other components

- **API Client**
- **Gemini API**
- **Console Output**

## Connections

- API Client → FastAPI Endpoint: posts request
- FastAPI Endpoint → ATS Request DTO: validates as
- FastAPI Endpoint → Score Calculator: calculates score
- Score Calculator → Sentence Transformer: encodes and compares
- Score Calculator → FastAPI Endpoint: returns score
- FastAPI Endpoint → API Client: returns score
- Question Generator → Gemini API: generates questions
- Question Generator → Console Output: prints response
