# akashkanabur/kasparro-ai-akashkanabur architecture

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

- Interactive diagram: https://gitdiagram.com/akashkanabur/kasparro-ai-akashkanabur
- Repository: https://github.com/akashkanabur/kasparro-ai-akashkanabur

## Overview

This is an AI-assisted resume screening and ranking system. A recruiter supplies a folder of PDF resumes; the CLI runs batch screening, extracts candidate details, rejects candidates missing required Python or AI evidence, assesses eligible resumes with an LLM (falling back to deterministic scoring), enriches them with public GitHub data, and saves ranked JSON for the dashboard. The graph shows the documented dashboard and external integrations; internal call relationships are based on the pipeline excerpt and SOURCE INDEX. The frontend’s specific data-loading behavior was not excerpted.

Main entry points: [`src/screening/pipeline.py`](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/pipeline.py) (Batch Pipeline), [`src/screening/eligibility.py`](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/eligibility.py) (Eligibility Filter), [`src/llm/evaluator.py`](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/llm/evaluator.py) (LLM Assessment), [`src/github/client.py`](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/github/client.py) (GitHub Enrichment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Results"]
  node_cli["Screening CLI<br/>[main.py]"]
  node_pipeline["Batch Pipeline<br/>[pipeline.py]"]
  node_results["Ranked Results<br/>[results.json]"]
  node_dashboard["Recruiter Dashboard<br/>[app.js]"]
end

subgraph group_resume["Resume Processing"]
  node_pdfs["PDF Resumes"]
  node_pdfparser["PDF Text Extraction<br/>[pdf_parser.py]"]
  node_extractor["Candidate Extraction"]
  node_eligibility["Eligibility Filter<br/>[eligibility.py]"]
end

subgraph group_assessment["Assessment and Enrichment"]
  node_evaluator["LLM Assessment<br/>[evaluator.py]"]
  node_fallback["Fallback Scoring<br/>[pipeline.py]"]
  node_llm_service{{"LLM Provider"}}
  node_github_client["GitHub Enrichment<br/>[client.py]"]
  node_github_service{{"GitHub API"}}
end

subgraph group_contracts["Data Contracts"]
  node_scoring["Scoring Contracts<br/>[scoring.py]"]
  node_candidate_model["Candidate Contract<br/>[candidate.py]"]
  node_eligibility_model["Eligibility Contract<br/>[eligibility.py]"]
  node_github_model["GitHub Contract<br/>[github.py]"]
  node_result_model["Result Contracts<br/>[result.py]"]
end

node_recruiter(("Recruiter"))

node_recruiter -->|"runs screening"| node_cli
node_cli -->|"runs batch"| node_pipeline
node_pdfs -->|"provides PDFs"| node_pipeline
node_pipeline -->|"extracts text"| node_pdfparser
node_pipeline -->|"extracts candidates"| node_extractor
node_pipeline -->|"checks eligibility"| node_eligibility
node_pipeline -->|"evaluates eligible"| node_evaluator
node_pipeline -->|"uses on failure"| node_fallback
node_evaluator -->|"requests assessment"| node_llm_service
node_pipeline -->|"enriches candidate"| node_github_client
node_github_client -->|"fetches profile/repos"| node_github_service
node_extractor -->|"creates candidate"| node_candidate_model
node_eligibility -->|"reads candidate"| node_candidate_model
node_eligibility -->|"returns decision"| node_eligibility_model
node_evaluator -->|"validates assessment"| node_scoring
node_github_client -->|"returns assessment"| node_github_model
node_pipeline -->|"builds batch output"| node_result_model
node_pipeline -->|"writes ranked JSON"| node_results
node_results -->|"displays results"| node_dashboard
node_recruiter -->|"views shortlist"| node_dashboard

click node_cli "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/main.py"
click node_pipeline "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/pipeline.py"
click node_results "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/output/results.json"
click node_dashboard "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/frontend/app.js"
click node_pdfs "https://github.com/akashkanabur/kasparro-ai-akashkanabur/tree/main/resume_dataset_50%20(1)/resumes"
click node_pdfparser "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/ingestion/pdf_parser.py"
click node_extractor "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/extraction/candidate_extractor.py"
click node_eligibility "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/eligibility.py"
click node_evaluator "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/llm/evaluator.py"
click node_fallback "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/pipeline.py"
click node_github_client "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/github/client.py"
click node_scoring "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/scoring.py"
click node_candidate_model "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/candidate.py"
click node_eligibility_model "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/eligibility.py"
click node_github_model "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/github.py"
click node_result_model "https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/result.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_cli,node_pipeline,node_results,node_dashboard toneBlue
class node_pdfs,node_pdfparser,node_extractor,node_eligibility toneAmber
class node_evaluator,node_fallback,node_llm_service,node_github_client,node_github_service toneMint
class node_scoring,node_candidate_model,node_eligibility_model,node_github_model,node_result_model toneRose
class node_recruiter toneIndigo
```

## Components

### Entry and Results

- [Screening CLI](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/main.py): `main.py`
- [Batch Pipeline](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/pipeline.py): `src/screening/pipeline.py`
- [Ranked Results](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/output/results.json): `output/results.json`
- [Recruiter Dashboard](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/frontend/app.js): `frontend/app.js`

### Resume Processing

- [PDF Resumes](https://github.com/akashkanabur/kasparro-ai-akashkanabur/tree/main/resume_dataset_50%20(1)/resumes): `resume_dataset_50 (1)/resumes`
- [PDF Text Extraction](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/ingestion/pdf_parser.py): `src/ingestion/pdf_parser.py`
- [Candidate Extraction](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/extraction/candidate_extractor.py): `src/extraction/candidate_extractor.py`
- [Eligibility Filter](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/eligibility.py): `src/screening/eligibility.py`

### Assessment and Enrichment

- [LLM Assessment](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/llm/evaluator.py): `src/llm/evaluator.py`
- [Fallback Scoring](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/screening/pipeline.py): `src/screening/pipeline.py`
- **LLM Provider**
- [GitHub Enrichment](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/github/client.py): `src/github/client.py`
- **GitHub API**

### Data Contracts

- [Scoring Contracts](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/scoring.py): `src/models/scoring.py`
- [Candidate Contract](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/candidate.py): `src/models/candidate.py`
- [Eligibility Contract](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/eligibility.py): `src/models/eligibility.py`
- [GitHub Contract](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/github.py): `src/models/github.py`
- [Result Contracts](https://github.com/akashkanabur/kasparro-ai-akashkanabur/blob/main/src/models/result.py): `src/models/result.py`

### Other components

- **Recruiter**

## Connections

- Recruiter → Screening CLI: runs screening (evidence: `README.md`)
- Screening CLI → Batch Pipeline: runs batch (evidence: `main.py`)
- PDF Resumes → Batch Pipeline: provides PDFs (evidence: `README.md`)
- Batch Pipeline → PDF Text Extraction: extracts text (evidence: `src/screening/pipeline.py`)
- Batch Pipeline → Candidate Extraction: extracts candidates (evidence: `src/screening/pipeline.py`)
- Batch Pipeline → Eligibility Filter: checks eligibility (evidence: `src/screening/pipeline.py`)
- Batch Pipeline → LLM Assessment: evaluates eligible (evidence: `src/screening/pipeline.py`)
- Batch Pipeline → Fallback Scoring: uses on failure (evidence: `src/screening/pipeline.py`)
- LLM Assessment → LLM Provider: requests assessment (evidence: `src/llm/evaluator.py`)
- Batch Pipeline → GitHub Enrichment: enriches candidate (evidence: `src/screening/pipeline.py`)
- GitHub Enrichment → GitHub API: fetches profile/repos (evidence: `src/github/client.py`)
- Candidate Extraction → Candidate Contract: creates candidate (evidence: `src/extraction/candidate_extractor.py`)
- Eligibility Filter → Candidate Contract: reads candidate (evidence: `src/screening/eligibility.py`)
- Eligibility Filter → Eligibility Contract: returns decision (evidence: `src/screening/eligibility.py`)
- LLM Assessment → Scoring Contracts: validates assessment (evidence: `src/llm/evaluator.py`)
- GitHub Enrichment → GitHub Contract: returns assessment (evidence: `src/github/client.py`)
- Batch Pipeline → Result Contracts: builds batch output (evidence: `src/screening/pipeline.py`)
- Batch Pipeline → Ranked Results: writes ranked JSON (evidence: `README.md`)
- Ranked Results → Recruiter Dashboard: displays results (evidence: `README.md`)
- Recruiter → Recruiter Dashboard: views shortlist (evidence: `README.md`)
