# rupesh91206/autohire architecture

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

- Interactive diagram: https://gitdiagram.com/rupesh91206/autohire
- Repository: https://github.com/rupesh91206/autohire

## Overview

AutoHire automates resume screening: it fetches Gmail attachments, extracts candidate details and resume text, checks duplicates, scores unique resumes against a job description, and stores evaluations. The report and notification stages read that stored state to produce an Excel workbook, email it to HR, and send candidates status messages. The all-in-one runner invokes these stages in sequence. Edges reflect the shown calls and data access; documented capabilities are retained, but unsampled implementation details are not inferred.

Main entry points: [`main.py`](https://github.com/rupesh91206/autohire/blob/main/main.py) (Resume Intake), [`run_all.py`](https://github.com/rupesh91206/autohire/blob/main/run_all.py) (Workflow Runner), [`exl.py`](https://github.com/rupesh91206/autohire/blob/main/exl.py) (Excel Reporting), [`emailer.py`](https://github.com/rupesh91206/autohire/blob/main/emailer.py) (HR Report Email)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Resume Intake"]
  node_runner["Workflow Runner<br/>[run_all.py]"]
  node_intake_worker["Resume Intake<br/>[main.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_resume_text["Resume Text Extraction<br/>[jd.py]"]
  node_jd_file["Job Description<br/>[jd.docx]"]
  node_matcher["JD Matcher<br/>[jd.py]"]
  node_duplicate_check["Duplicate Check<br/>[duplicate.py]"]
end

subgraph group_storage["Evaluation Storage"]
  node_mongo[("MongoDB")]
end

subgraph group_delivery["Reports &amp; Notifications"]
  node_reporter["Excel Reporting<br/>[exl.py]"]
  node_report_file["Candidate Report"]
  node_report_email["HR Report Email<br/>[emailer.py]"]
  node_candidate_email["Candidate Status Email<br/>[reply.py]"]
end

node_gmail(("Gmail Inbox"))
node_hr(("HR Recipient"))
node_candidate(("Candidate"))
node_smtp["Gmail SMTP"]

node_runner -->|"fetches resumes"| node_intake_worker
node_gmail -->|"provides attachments"| node_intake_worker
node_intake_worker -->|"extracts text"| node_resume_text
node_intake_worker -->|"checks candidate"| node_duplicate_check
node_duplicate_check -->|"checks and records duplicates"| node_mongo
node_intake_worker -->|"reads JD"| node_jd_file
node_intake_worker -->|"requests score"| node_matcher
node_matcher -->|"extracts JD text"| node_jd_file
node_intake_worker -->|"stores evaluations"| node_mongo
node_runner -->|"generates report"| node_reporter
node_reporter -->|"reads evaluations"| node_mongo
node_reporter -->|"writes workbook"| node_report_file
node_runner -->|"sends report"| node_report_email
node_report_email -->|"attaches workbook"| node_report_file
node_report_email -->|"sends email"| node_smtp
node_smtp -->|"delivers report"| node_hr
node_runner -->|"sends statuses"| node_candidate_email
node_candidate_email -->|"reads and updates status"| node_mongo
node_candidate_email -->|"sends email"| node_smtp
node_smtp -->|"delivers status"| node_candidate

click node_runner "https://github.com/rupesh91206/autohire/blob/main/run_all.py"
click node_intake_worker "https://github.com/rupesh91206/autohire/blob/main/main.py"
click node_resume_text "https://github.com/rupesh91206/autohire/blob/main/jd.py"
click node_jd_file "https://github.com/rupesh91206/autohire/blob/main/downloads/jd.docx"
click node_matcher "https://github.com/rupesh91206/autohire/blob/main/jd.py"
click node_duplicate_check "https://github.com/rupesh91206/autohire/blob/main/duplicate.py"
click node_reporter "https://github.com/rupesh91206/autohire/blob/main/exl.py"
click node_report_file "https://github.com/rupesh91206/autohire/blob/main/Candidate_Report.xlsx"
click node_report_email "https://github.com/rupesh91206/autohire/blob/main/emailer.py"
click node_candidate_email "https://github.com/rupesh91206/autohire/blob/main/reply.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_runner,node_intake_worker toneBlue
class node_resume_text,node_jd_file,node_matcher,node_duplicate_check toneAmber
class node_mongo toneMint
class node_reporter,node_report_file,node_report_email,node_candidate_email toneRose
class node_gmail,node_hr,node_candidate,node_smtp toneIndigo
```

## Components

### Resume Intake

- [Workflow Runner](https://github.com/rupesh91206/autohire/blob/main/run_all.py): `run_all.py`
- [Resume Intake](https://github.com/rupesh91206/autohire/blob/main/main.py): `main.py`

### Evaluation

- [Resume Text Extraction](https://github.com/rupesh91206/autohire/blob/main/jd.py): `jd.py`
- [Job Description](https://github.com/rupesh91206/autohire/blob/main/downloads/jd.docx): `downloads/jd.docx`
- [JD Matcher](https://github.com/rupesh91206/autohire/blob/main/jd.py): `jd.py`
- [Duplicate Check](https://github.com/rupesh91206/autohire/blob/main/duplicate.py): `duplicate.py`

### Evaluation Storage

- **MongoDB**

### Reports & Notifications

- [Excel Reporting](https://github.com/rupesh91206/autohire/blob/main/exl.py): `exl.py`
- [Candidate Report](https://github.com/rupesh91206/autohire/blob/main/Candidate_Report.xlsx): `Candidate_Report.xlsx`
- [HR Report Email](https://github.com/rupesh91206/autohire/blob/main/emailer.py): `emailer.py`
- [Candidate Status Email](https://github.com/rupesh91206/autohire/blob/main/reply.py): `reply.py`

### Other components

- **Gmail Inbox**
- **HR Recipient**
- **Candidate**
- **Gmail SMTP**

## Connections

- Workflow Runner → Resume Intake: fetches resumes (evidence: `run_all.py`)
- Gmail Inbox → Resume Intake: provides attachments (evidence: `main.py`)
- Resume Intake → Resume Text Extraction: extracts text (evidence: `main.py`)
- Resume Intake → Duplicate Check: checks candidate (evidence: `main.py`)
- Duplicate Check → MongoDB: checks and records duplicates (evidence: `duplicate.py`)
- Resume Intake → Job Description: reads JD
- Resume Intake → JD Matcher: requests score (evidence: `main.py`)
- JD Matcher → Job Description: extracts JD text (evidence: `jd.py`)
- Resume Intake → MongoDB: stores evaluations (evidence: `main.py`)
- Workflow Runner → Excel Reporting: generates report (evidence: `run_all.py`)
- Excel Reporting → MongoDB: reads evaluations (evidence: `exl.py`)
- Excel Reporting → Candidate Report: writes workbook (evidence: `exl.py`)
- Workflow Runner → HR Report Email: sends report (evidence: `run_all.py`)
- HR Report Email → Candidate Report: attaches workbook (evidence: `emailer.py`)
- HR Report Email → Gmail SMTP: sends email (evidence: `emailer.py`)
- Gmail SMTP → HR Recipient: delivers report
- Workflow Runner → Candidate Status Email: sends statuses (evidence: `run_all.py`)
- Candidate Status Email → MongoDB: reads and updates status (evidence: `reply.py`)
- Candidate Status Email → Gmail SMTP: sends email (evidence: `reply.py`)
- Gmail SMTP → Candidate: delivers status
