# mmahimashree/resume-screener architecture

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

- Interactive diagram: https://gitdiagram.com/mmahimashree/resume-screener
- Repository: https://github.com/mmahimashree/resume-screener

## Overview

The product is a Flask resume-screening and career-advice web app. A user uploads a PDF through the web interface; the server extracts and cleans its text, predicts a broad role, maps it to a more specific role, and returns an explanation. The app also offers follow-up career questions using the resume and predicted role stored in the session. The README documents the TF-IDF/model workflow; unsampled implementation details are represented only where that documentation supports them.

Main entry points: [`app.py`](https://github.com/mmahimashree/resume-screener/blob/main/app.py) (Flask routes), [`templates/index.html`](https://github.com/mmahimashree/resume-screener/blob/main/templates/index.html) (Resume and results UI), [`model.pkl`](https://github.com/mmahimashree/resume-screener/blob/main/model.pkl) (Role classifier), [`tfidf.pkl`](https://github.com/mmahimashree/resume-screener/blob/main/tfidf.pkl) (TF-IDF vectorizer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_interface["Resume and results UI<br/>[index.html]"]
  node_server["Flask routes<br/>[app.py]"]
end

subgraph group_screen["Resume screening"]
  node_pdf["PDF text extraction<br/>[app.py]"]
  node_clean["Text cleanup<br/>[app.py]"]
  node_features["TF-IDF features<br/>[app.py]"]
  node_classifier["Role classifier<br/>[model.pkl]"]
  node_rolemap["Specific role mapping<br/>[app.py]"]
end

subgraph group_advice["AI career advice"]
  node_explanation["Prediction explanation<br/>[app.py]"]
  node_chat["Career Q&amp;A<br/>[app.py]"]
  node_groq["Groq LLM"]
end

subgraph group_assets["Model assets"]
  node_vectorizer["TF-IDF vectorizer<br/>[tfidf.pkl]"]
  node_encoder["Role encoder<br/>[encoder.pkl]"]
end

node_user(("Resume owner"))

node_user -->|"uploads resume"| node_interface
node_interface -->|"submits PDF"| node_server
node_server -->|"renders results"| node_interface
node_server -->|"extracts text"| node_pdf
node_server -->|"cleans text"| node_clean
node_server -->|"builds features"| node_features
node_features -.->|"uses"| node_vectorizer
node_server -.->|"predicts role"| node_classifier
node_server -->|"decodes label"| node_encoder
node_server -->|"maps role"| node_rolemap
node_server -->|"requests explanation"| node_explanation
node_explanation -->|"prompts model"| node_groq
node_user -.->|"asks follow-up"| node_interface
node_interface -.->|"sends question"| node_chat
node_chat -->|"requests answer"| node_groq
node_chat -->|"reads session"| node_server

click node_interface "https://github.com/mmahimashree/resume-screener/blob/main/templates/index.html"
click node_server "https://github.com/mmahimashree/resume-screener/blob/main/app.py"
click node_pdf "https://github.com/mmahimashree/resume-screener/blob/main/app.py"
click node_clean "https://github.com/mmahimashree/resume-screener/blob/main/app.py"
click node_features "https://github.com/mmahimashree/resume-screener/blob/main/app.py"
click node_classifier "https://github.com/mmahimashree/resume-screener/blob/main/model.pkl"
click node_vectorizer "https://github.com/mmahimashree/resume-screener/blob/main/tfidf.pkl"
click node_encoder "https://github.com/mmahimashree/resume-screener/blob/main/encoder.pkl"
click node_rolemap "https://github.com/mmahimashree/resume-screener/blob/main/app.py"
click node_explanation "https://github.com/mmahimashree/resume-screener/blob/main/app.py"
click node_chat "https://github.com/mmahimashree/resume-screener/blob/main/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_interface,node_server toneBlue
class node_pdf,node_clean,node_features,node_classifier,node_rolemap toneAmber
class node_explanation,node_chat,node_groq toneMint
class node_vectorizer,node_encoder toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [Resume and results UI](https://github.com/mmahimashree/resume-screener/blob/main/templates/index.html): `templates/index.html`
- [Flask routes](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`

### Resume screening

- [PDF text extraction](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`
- [Text cleanup](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`
- [TF-IDF features](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`
- [Role classifier](https://github.com/mmahimashree/resume-screener/blob/main/model.pkl): `model.pkl`
- [Specific role mapping](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`

### AI career advice

- [Prediction explanation](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`
- [Career Q&A](https://github.com/mmahimashree/resume-screener/blob/main/app.py): `app.py`
- **Groq LLM**

### Model assets

- [TF-IDF vectorizer](https://github.com/mmahimashree/resume-screener/blob/main/tfidf.pkl): `tfidf.pkl`
- [Role encoder](https://github.com/mmahimashree/resume-screener/blob/main/encoder.pkl): `encoder.pkl`

### Other components

- **Resume owner**

## Connections

- Resume owner → Resume and results UI: uploads resume (evidence: `README.md`)
- Resume and results UI → Flask routes: submits PDF (evidence: `README.md`)
- Flask routes → Resume and results UI: renders results (evidence: `app.py`)
- Flask routes → PDF text extraction: extracts text (evidence: `app.py`)
- Flask routes → Text cleanup: cleans text (evidence: `README.md`)
- Flask routes → TF-IDF features: builds features (evidence: `README.md`)
- TF-IDF features → TF-IDF vectorizer: uses (evidence: `README.md`)
- Flask routes → Role classifier: predicts role (evidence: `README.md`)
- Flask routes → Role encoder: decodes label (evidence: `app.py`)
- Flask routes → Specific role mapping: maps role (evidence: `app.py`)
- Flask routes → Prediction explanation: requests explanation (evidence: `app.py`)
- Prediction explanation → Groq LLM: prompts model (evidence: `app.py`)
- Resume owner → Resume and results UI: asks follow-up (evidence: `README.md`)
- Resume and results UI → Career Q&A: sends question (evidence: `README.md`)
- Career Q&A → Groq LLM: requests answer (evidence: `app.py`)
- Career Q&A → Flask routes: reads session (evidence: `app.py`)
