# krissh007/job-search-agent architecture

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

- Interactive diagram: https://gitdiagram.com/krissh007/job-search-agent
- Repository: https://github.com/krissh007/job-search-agent

## Overview

Job Search Agent discovers jobs from configured sources, scores them against an evidence-based candidate profile, and stores results in SQLite for review and export. Its broader workflow includes freshness-filtered daily Excel leads and a guarded, human-controlled application preparation and tracking process. The graph includes documented capabilities whose implementations were not sampled; those relationships are cited to the README. Source-level edges are limited to relationships visible in excerpts or the SOURCE INDEX.

Main entry points: [`src/main.py`](https://github.com/krissh007/job-search-agent/blob/main/src/main.py) (Search runner), [`src/pipelines`](https://github.com/krissh007/job-search-agent/tree/main/src/pipelines) (Discovery pipeline), [`src/database.py`](https://github.com/krissh007/job-search-agent/blob/main/src/database.py) (SQLite database), [`src/application_assistant.py`](https://github.com/krissh007/job-search-agent/blob/main/src/application_assistant.py) (Apply assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and matching"]
  node_search["Search runner<br/>[main.py]"]
  node_pipeline["Discovery pipeline"]
  node_naukri["Naukri source<br/>[naukri_source.py]"]
  node_indeed["Indeed source<br/>[indeed_source.py]"]
  node_sourcebase["Source interface<br/>[base_source.py]"]
  node_jobmodel["Job records<br/>[models.py]"]
  node_profile["Candidate profile<br/>[resume_profile.py]"]
  node_matcher["Explainable matching<br/>[job_matcher.py]"]
  node_normalizer["Job normalization<br/>[normalizer.py]"]
end

subgraph group_state["Configuration and storage"]
  node_config["Configuration loader<br/>[config_manager.py]"]
  node_settings["Search settings<br/>[settings.yaml]"]
  node_matchingrules["Matching rules"]
  node_database[("SQLite database<br/>[database.py]")]
  node_storage["Job file storage<br/>[storage.py]"]
end

subgraph group_leads["Freshness and reporting"]
  node_freshness["Freshness rules<br/>[freshness.py]"]
  node_excel["Excel exports<br/>[export_excel.py]"]
  node_csv["CSV export<br/>[export_csv.py]"]
  node_matchreport["Match report<br/>[match_report.py]"]
end

subgraph group_applications["Application review"]
  node_assistant["Apply assistant"]
  node_queue["Application preparation"]
  node_tracking["Application tracking"]
  node_reviewserver["Review server"]
end

node_candidate(("Job seeker"))
node_browser["Authenticated browser"]
node_reviewer(("Human reviewer"))

node_candidate -->|"starts search"| node_search
node_search -->|"loads settings"| node_config
node_config -.->|"reads"| node_settings
node_search -.->|"runs discovery"| node_pipeline
node_pipeline -.->|"searches"| node_naukri
node_pipeline -.->|"searches"| node_indeed
node_naukri -->|"implements"| node_sourcebase
node_indeed -->|"implements"| node_sourcebase
node_naukri -->|"returns jobs"| node_jobmodel
node_indeed -->|"uses jobs"| node_jobmodel
node_search -->|"loads profile"| node_profile
node_search -->|"scores jobs"| node_matcher
node_matcher -->|"uses evidence"| node_profile
node_matcher -.->|"applies rules"| node_matchingrules
node_pipeline -.->|"normalizes jobs"| node_normalizer
node_search -->|"stores results"| node_storage
node_search -.->|"records jobs"| node_database
node_database -->|"maps records"| node_jobmodel
node_pipeline -->|"filters leads"| node_freshness
node_freshness -->|"selects windows"| node_excel
node_database -->|"reads jobs"| node_excel
node_pipeline -->|"exports daily leads"| node_excel
node_database -.->|"exports records"| node_csv
node_database -->|"reads matches"| node_matchreport
node_pipeline -->|"prepares leads"| node_queue
node_queue -->|"uses assistant"| node_assistant
node_assistant -->|"fills known fields"| node_browser
node_reviewer -->|"confirms submission"| node_assistant
node_assistant -->|"presents review"| node_reviewer
node_queue -.->|"creates review link"| node_reviewserver
node_reviewserver -->|"reads tracked status"| node_database
node_reviewserver -->|"accepts answers"| node_reviewer
node_database -.->|"tracks status"| node_tracking

click node_search "https://github.com/krissh007/job-search-agent/blob/main/src/main.py"
click node_pipeline "https://github.com/krissh007/job-search-agent/tree/main/src/pipelines"
click node_naukri "https://github.com/krissh007/job-search-agent/blob/main/src/sources/naukri_source.py"
click node_indeed "https://github.com/krissh007/job-search-agent/blob/main/src/sources/indeed_source.py"
click node_sourcebase "https://github.com/krissh007/job-search-agent/blob/main/src/sources/base_source.py"
click node_jobmodel "https://github.com/krissh007/job-search-agent/blob/main/src/models.py"
click node_profile "https://github.com/krissh007/job-search-agent/blob/main/src/resume_profile.py"
click node_matcher "https://github.com/krissh007/job-search-agent/blob/main/src/matching/job_matcher.py"
click node_normalizer "https://github.com/krissh007/job-search-agent/blob/main/src/normalizer.py"
click node_config "https://github.com/krissh007/job-search-agent/blob/main/src/config_manager.py"
click node_settings "https://github.com/krissh007/job-search-agent/blob/main/config/settings.yaml"
click node_matchingrules "https://github.com/krissh007/job-search-agent/blob/main/config/matching_rules.yaml"
click node_database "https://github.com/krissh007/job-search-agent/blob/main/src/database.py"
click node_storage "https://github.com/krissh007/job-search-agent/blob/main/src/storage.py"
click node_freshness "https://github.com/krissh007/job-search-agent/blob/main/src/freshness.py"
click node_excel "https://github.com/krissh007/job-search-agent/blob/main/src/reports/export_excel.py"
click node_csv "https://github.com/krissh007/job-search-agent/blob/main/src/reports/export_csv.py"
click node_matchreport "https://github.com/krissh007/job-search-agent/blob/main/src/reports/match_report.py"
click node_assistant "https://github.com/krissh007/job-search-agent/blob/main/src/application_assistant.py"
click node_queue "https://github.com/krissh007/job-search-agent/blob/main/src/application_queue.py"
click node_tracking "https://github.com/krissh007/job-search-agent/blob/main/src/application_tracking.py"
click node_reviewserver "https://github.com/krissh007/job-search-agent/blob/main/src/application_review_server.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_search,node_pipeline,node_naukri,node_indeed,node_sourcebase,node_jobmodel,node_profile,node_matcher,node_normalizer,node_browser,node_reviewer toneBlue
class node_config,node_settings,node_matchingrules,node_database,node_storage toneAmber
class node_freshness,node_excel,node_csv,node_matchreport toneMint
class node_assistant,node_queue,node_tracking,node_reviewserver toneRose
class node_candidate toneIndigo
```

## Components

### Discovery and matching

- [Search runner](https://github.com/krissh007/job-search-agent/blob/main/src/main.py): `src/main.py`
- [Discovery pipeline](https://github.com/krissh007/job-search-agent/tree/main/src/pipelines): `src/pipelines`
- [Naukri source](https://github.com/krissh007/job-search-agent/blob/main/src/sources/naukri_source.py): `src/sources/naukri_source.py`
- [Indeed source](https://github.com/krissh007/job-search-agent/blob/main/src/sources/indeed_source.py): `src/sources/indeed_source.py`
- [Source interface](https://github.com/krissh007/job-search-agent/blob/main/src/sources/base_source.py): `src/sources/base_source.py`
- [Job records](https://github.com/krissh007/job-search-agent/blob/main/src/models.py): `src/models.py`
- [Candidate profile](https://github.com/krissh007/job-search-agent/blob/main/src/resume_profile.py): `src/resume_profile.py`
- [Explainable matching](https://github.com/krissh007/job-search-agent/blob/main/src/matching/job_matcher.py): `src/matching/job_matcher.py`
- [Job normalization](https://github.com/krissh007/job-search-agent/blob/main/src/normalizer.py): `src/normalizer.py`

### Configuration and storage

- [Configuration loader](https://github.com/krissh007/job-search-agent/blob/main/src/config_manager.py): `src/config_manager.py`
- [Search settings](https://github.com/krissh007/job-search-agent/blob/main/config/settings.yaml): `config/settings.yaml`
- [Matching rules](https://github.com/krissh007/job-search-agent/blob/main/config/matching_rules.yaml): `config/matching_rules.yaml`
- [SQLite database](https://github.com/krissh007/job-search-agent/blob/main/src/database.py): `src/database.py`
- [Job file storage](https://github.com/krissh007/job-search-agent/blob/main/src/storage.py): `src/storage.py`

### Freshness and reporting

- [Freshness rules](https://github.com/krissh007/job-search-agent/blob/main/src/freshness.py): `src/freshness.py`
- [Excel exports](https://github.com/krissh007/job-search-agent/blob/main/src/reports/export_excel.py): `src/reports/export_excel.py`
- [CSV export](https://github.com/krissh007/job-search-agent/blob/main/src/reports/export_csv.py): `src/reports/export_csv.py`
- [Match report](https://github.com/krissh007/job-search-agent/blob/main/src/reports/match_report.py): `src/reports/match_report.py`

### Application review

- [Apply assistant](https://github.com/krissh007/job-search-agent/blob/main/src/application_assistant.py): `src/application_assistant.py`
- [Application preparation](https://github.com/krissh007/job-search-agent/blob/main/src/application_queue.py): `src/application_queue.py`
- [Application tracking](https://github.com/krissh007/job-search-agent/blob/main/src/application_tracking.py): `src/application_tracking.py`
- [Review server](https://github.com/krissh007/job-search-agent/blob/main/src/application_review_server.py): `src/application_review_server.py`

### Other components

- **Job seeker**
- **Authenticated browser**
- **Human reviewer**

## Connections

- Job seeker → Search runner: starts search (evidence: `README.md`)
- Search runner → Configuration loader: loads settings (evidence: `src/main.py`)
- Configuration loader → Search settings: reads
- Search runner → Discovery pipeline: runs discovery (evidence: `README.md`)
- Discovery pipeline → Naukri source: searches (evidence: `README.md`)
- Discovery pipeline → Indeed source: searches (evidence: `README.md`)
- Naukri source → Source interface: implements (evidence: `src/sources/naukri_source.py`)
- Indeed source → Source interface: implements (evidence: `src/sources/indeed_source.py`)
- Naukri source → Job records: returns jobs (evidence: `src/sources/naukri_source.py`)
- Indeed source → Job records: uses jobs (evidence: `src/sources/indeed_source.py`)
- Search runner → Candidate profile: loads profile (evidence: `src/main.py`)
- Search runner → Explainable matching: scores jobs (evidence: `src/main.py`)
- Explainable matching → Candidate profile: uses evidence (evidence: `src/matching/job_matcher.py`)
- Explainable matching → Matching rules: applies rules
- Discovery pipeline → Job normalization: normalizes jobs
- Search runner → Job file storage: stores results (evidence: `src/main.py`)
- Search runner → SQLite database: records jobs (evidence: `README.md`)
- SQLite database → Job records: maps records (evidence: `src/database.py`)
- Discovery pipeline → Freshness rules: filters leads (evidence: `README.md`)
- Freshness rules → Excel exports: selects windows (evidence: `src/reports/export_excel.py`)
- SQLite database → Excel exports: reads jobs (evidence: `src/reports/export_excel.py`)
- Discovery pipeline → Excel exports: exports daily leads (evidence: `README.md`)
- SQLite database → CSV export: exports records
- SQLite database → Match report: reads matches (evidence: `src/reports/match_report.py`)
- Discovery pipeline → Application preparation: prepares leads (evidence: `README.md`)
- Application preparation → Apply assistant: uses assistant (evidence: `src/application_queue.py`)
- Apply assistant → Authenticated browser: fills known fields (evidence: `README.md`)
- Human reviewer → Apply assistant: confirms submission (evidence: `README.md`)
- Apply assistant → Human reviewer: presents review (evidence: `README.md`)
- Application preparation → Review server: creates review link (evidence: `README.md`)
- Review server → SQLite database: reads tracked status (evidence: `src/application_review_server.py`)
- Review server → Human reviewer: accepts answers (evidence: `README.md`)
- SQLite database → Application tracking: tracks status (evidence: `README.md`)
