# mahendar-tech367/ai-resume-ranking architecture

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

- Interactive diagram: https://gitdiagram.com/mahendar-tech367/ai-resume-ranking
- Repository: https://github.com/mahendar-tech367/ai-resume-ranking

## Overview

ResumeRanker is a Flask resume-ranking web application. Its main workflow accepts multiple resumes, extracts text, analyzes skills and keywords, detects experience and projects, scores candidates, and ranks results. The Flask app also handles authentication, password recovery, contact, and chat; PostgreSQL stores application data, while the chat helper connects to Groq. The workflow stages are documented in the README; the sampled app excerpt confirms database operations, a chat call, and a Mailjet request, but does not expose every route or UI connection.

Main entry points: [`backend/app.py`](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py) (Flask application), [`api/index.py`](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/api/index.py) (API entry point), [`backend/aichatbox.py`](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/aichatbox.py) (Chat helper), [`frontend/templates`](https://github.com/mahendar-tech367/ai-resume-ranking/tree/main/frontend/templates) (Web templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_entry["API entry point<br/>[index.py]"]
  node_flask["Flask application<br/>[app.py]"]
  node_templates["Web templates"]
end

subgraph group_ranking["Resume ranking"]
  node_upload["Resume upload<br/>[app.py]"]
  node_extract["Text extraction<br/>[app.py]"]
  node_analysis["Resume analysis<br/>[app.py]"]
  node_scoring["Resume scoring<br/>[app.py]"]
  node_ranking_results["Candidate ranking<br/>[app.py]"]
end

subgraph group_accounts["Accounts and messaging"]
  node_auth["User authentication<br/>[app.py]"]
  node_recovery["Password recovery<br/>[app.py]"]
  node_contact["Contact form<br/>[app.py]"]
  node_chat["AI chat<br/>[app.py]"]
end

subgraph group_integrations["External services"]
  node_chat_helper["Chat helper<br/>[aichatbox.py]"]
  node_database[("PostgreSQL database")]
  node_mailjet["Mailjet"]
  node_groq["Groq model"]
end

node_user(("Candidate or recruiter"))

node_user -.->|"opens app"| node_entry
node_entry -->|"imports app"| node_flask
node_user -.->|"submits resumes"| node_flask
node_flask -.->|"accepts files"| node_upload
node_upload -->|"extracts text"| node_extract
node_extract -->|"analyzes text"| node_analysis
node_analysis -->|"calculates scores"| node_scoring
node_scoring -->|"ranks resumes"| node_ranking_results
node_flask -->|"reads and writes"| node_database
node_flask -->|"sends email"| node_mailjet
node_flask -->|"calls helper"| node_chat_helper
node_chat_helper -->|"invokes model"| node_groq
node_user -.->|"signs in"| node_auth
node_user -.->|"requests reset"| node_recovery
node_user -.->|"submits message"| node_contact
node_user -.->|"sends message"| node_chat
node_flask -.->|"renders pages"| node_templates

click node_entry "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/api/index.py"
click node_flask "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_templates "https://github.com/mahendar-tech367/ai-resume-ranking/tree/main/frontend/templates"
click node_upload "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_extract "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_analysis "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_scoring "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_ranking_results "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_auth "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_recovery "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_contact "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_chat "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py"
click node_chat_helper "https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/aichatbox.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_entry,node_flask,node_templates toneBlue
class node_upload,node_extract,node_analysis,node_scoring,node_ranking_results toneAmber
class node_auth,node_recovery,node_contact,node_chat toneMint
class node_chat_helper,node_database,node_mailjet,node_groq toneRose
class node_user toneIndigo
```

## Components

### Web application

- [API entry point](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/api/index.py): `api/index.py`
- [Flask application](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Web templates](https://github.com/mahendar-tech367/ai-resume-ranking/tree/main/frontend/templates): `frontend/templates`

### Resume ranking

- [Resume upload](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Text extraction](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Resume analysis](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Resume scoring](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Candidate ranking](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`

### Accounts and messaging

- [User authentication](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Password recovery](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [Contact form](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`
- [AI chat](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/app.py): `backend/app.py`

### External services

- [Chat helper](https://github.com/mahendar-tech367/ai-resume-ranking/blob/main/backend/aichatbox.py): `backend/aichatbox.py`
- **PostgreSQL database**
- **Mailjet**
- **Groq model**

### Other components

- **Candidate or recruiter**

## Connections

- Candidate or recruiter → API entry point: opens app
- API entry point → Flask application: imports app (evidence: `api/index.py`)
- Candidate or recruiter → Flask application: submits resumes
- Flask application → Resume upload: accepts files (evidence: `backend/app.py`)
- Resume upload → Text extraction: extracts text (evidence: `README.md`)
- Text extraction → Resume analysis: analyzes text (evidence: `README.md`)
- Resume analysis → Resume scoring: calculates scores (evidence: `README.md`)
- Resume scoring → Candidate ranking: ranks resumes (evidence: `README.md`)
- Flask application → PostgreSQL database: reads and writes (evidence: `backend/app.py`)
- Flask application → Mailjet: sends email (evidence: `backend/app.py`)
- Flask application → Chat helper: calls helper (evidence: `backend/app.py`)
- Chat helper → Groq model: invokes model (evidence: `backend/aichatbox.py`)
- Candidate or recruiter → User authentication: signs in
- Candidate or recruiter → Password recovery: requests reset
- Candidate or recruiter → Contact form: submits message
- Candidate or recruiter → AI chat: sends message
- Flask application → Web templates: renders pages
