# kushal187/h1b-job-searching-tool architecture

> Architecture diagram of the GitHub repository kushal187/h1b-job-searching-tool, 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/kushal187/h1b-job-searching-tool
- Repository: https://github.com/kushal187/h1b-job-searching-tool

## Overview

This is an H1B-focused job search application: it combines SEC Form D and H1B employer data, identifies matching sponsors, finds their ATS boards, and collects and filters open jobs. The CLI pipeline coordinates collection, matching, scraping, and export; a FastAPI web UI lets users browse jobs and companies. The graph preserves the documented database backends and major ATS capabilities. Some pipeline and web internals were not sampled, so only documented or indexed relationships are shown.

Main entry points: [`pipeline.py`](https://github.com/kushal187/h1b-job-searching-tool/blob/main/pipeline.py) (Pipeline CLI), [`db/database.py`](https://github.com/kushal187/h1b-job-searching-tool/blob/main/db/database.py) (Database), [`scrapers/base.py`](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/base.py) (Shared ATS scraper), [`scrapers/workday.py`](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/workday.py) (Workday scraper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Sponsor data"]
  node_sec["SEC filings<br/>[sec_formd.py]"]
  node_h1b["H1B records<br/>[h1b_data.py]"]
  node_database[("Database<br/>[database.py]")]
  node_config["Configuration<br/>[config.py]"]
end

subgraph group_matching["Company matching"]
  node_matcher["Company matcher<br/>[matcher.py]"]
  node_normalizer["Name normalization<br/>[normalize.py]"]
  node_scorer["Company scoring<br/>[scorer.py]"]
  node_pipeline["Pipeline CLI<br/>[pipeline.py]"]
end

subgraph group_scraping["Job discovery"]
  node_workday_discovery["Workday discovery<br/>[workday_urls.py]"]
  node_ats_base["Shared ATS scraper<br/>[base.py]"]
  node_greenhouse["Greenhouse scraper<br/>[greenhouse.py]"]
  node_lever["Lever scraper<br/>[lever.py]"]
  node_ashby["Ashby scraper<br/>[ashby.py]"]
  node_workday["Workday scraper<br/>[workday.py]"]
  node_title_filter["Title filter<br/>[title_filter.py]"]
  node_location_filter["Location filter<br/>[location_filter.py]"]
  node_citizenship_filter["Citizenship filter"]
  node_experience_parser["Experience parser"]
end

subgraph group_delivery["Search and results"]
  node_web_app["Web application<br/>[app.py]"]
  node_templates["Web pages"]
  node_api_entry["Vercel entry<br/>[index.py]"]
end

node_user(("Job seeker"))

node_pipeline -->|"collects filings"| node_sec
node_pipeline -->|"collects H1B data"| node_h1b
node_pipeline -->|"runs matching"| node_matcher
node_matcher -->|"normalizes names"| node_normalizer
node_matcher -->|"upserts matches"| node_database
node_scorer -->|"reads company data"| node_database
node_pipeline -->|"runs scoring"| node_scorer
node_sec -->|"stores filings"| node_database
node_h1b -->|"stores employer data"| node_database
node_sec -->|"uses settings"| node_config
node_h1b -->|"uses settings"| node_config
node_pipeline -->|"discovers boards"| node_workday_discovery
node_pipeline -->|"dispatches scraping"| node_greenhouse
node_pipeline -->|"dispatches scraping"| node_lever
node_pipeline -->|"dispatches scraping"| node_ashby
node_pipeline -->|"dispatches scraping"| node_workday
node_greenhouse -->|"uses shared logic"| node_ats_base
node_lever -->|"uses shared logic"| node_ats_base
node_ashby -->|"uses shared logic"| node_ats_base
node_workday -->|"uses shared logic"| node_ats_base
node_ats_base -->|"upserts jobs"| node_database
node_workday -->|"upserts jobs"| node_database
node_ats_base -->|"checks restrictions"| node_citizenship_filter
node_ats_base -->|"parses experience"| node_experience_parser
node_greenhouse -->|"filters titles"| node_title_filter
node_greenhouse -->|"filters locations"| node_location_filter
node_lever -->|"filters titles"| node_title_filter
node_lever -->|"filters locations"| node_location_filter
node_ashby -->|"filters titles"| node_title_filter
node_ashby -->|"filters locations"| node_location_filter
node_workday -->|"filters titles"| node_title_filter
node_workday -->|"filters locations"| node_location_filter
node_pipeline -->|"exports results"| node_database
node_user -->|"browses jobs"| node_web_app
node_web_app -->|"queries listings"| node_database
node_web_app -->|"renders pages"| node_templates
node_api_entry -->|"loads application"| node_web_app

click node_sec "https://github.com/kushal187/h1b-job-searching-tool/blob/main/collectors/sec_formd.py"
click node_h1b "https://github.com/kushal187/h1b-job-searching-tool/blob/main/collectors/h1b_data.py"
click node_database "https://github.com/kushal187/h1b-job-searching-tool/blob/main/db/database.py"
click node_config "https://github.com/kushal187/h1b-job-searching-tool/blob/main/config.py"
click node_matcher "https://github.com/kushal187/h1b-job-searching-tool/blob/main/matching/matcher.py"
click node_normalizer "https://github.com/kushal187/h1b-job-searching-tool/blob/main/matching/normalize.py"
click node_scorer "https://github.com/kushal187/h1b-job-searching-tool/blob/main/matching/scorer.py"
click node_pipeline "https://github.com/kushal187/h1b-job-searching-tool/blob/main/pipeline.py"
click node_workday_discovery "https://github.com/kushal187/h1b-job-searching-tool/blob/main/collectors/workday_urls.py"
click node_ats_base "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/base.py"
click node_greenhouse "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/greenhouse.py"
click node_lever "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/lever.py"
click node_ashby "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/ashby.py"
click node_workday "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/workday.py"
click node_title_filter "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/title_filter.py"
click node_location_filter "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/location_filter.py"
click node_citizenship_filter "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/citizenship_filter.py"
click node_experience_parser "https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/experience_parser.py"
click node_web_app "https://github.com/kushal187/h1b-job-searching-tool/blob/main/web/app.py"
click node_templates "https://github.com/kushal187/h1b-job-searching-tool/tree/main/web/templates"
click node_api_entry "https://github.com/kushal187/h1b-job-searching-tool/blob/main/api/index.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_sec,node_h1b,node_database,node_config toneBlue
class node_matcher,node_normalizer,node_scorer,node_pipeline toneAmber
class node_workday_discovery,node_ats_base,node_greenhouse,node_lever,node_ashby,node_workday,node_title_filter,node_location_filter,node_citizenship_filter,node_experience_parser toneMint
class node_web_app,node_templates,node_api_entry toneRose
class node_user toneIndigo
```

## Components

### Sponsor data

- [SEC filings](https://github.com/kushal187/h1b-job-searching-tool/blob/main/collectors/sec_formd.py): `collectors/sec_formd.py`
- [H1B records](https://github.com/kushal187/h1b-job-searching-tool/blob/main/collectors/h1b_data.py): `collectors/h1b_data.py`
- [Database](https://github.com/kushal187/h1b-job-searching-tool/blob/main/db/database.py): `db/database.py`
- [Configuration](https://github.com/kushal187/h1b-job-searching-tool/blob/main/config.py): `config.py`

### Company matching

- [Company matcher](https://github.com/kushal187/h1b-job-searching-tool/blob/main/matching/matcher.py): `matching/matcher.py`
- [Name normalization](https://github.com/kushal187/h1b-job-searching-tool/blob/main/matching/normalize.py): `matching/normalize.py`
- [Company scoring](https://github.com/kushal187/h1b-job-searching-tool/blob/main/matching/scorer.py): `matching/scorer.py`
- [Pipeline CLI](https://github.com/kushal187/h1b-job-searching-tool/blob/main/pipeline.py): `pipeline.py`

### Job discovery

- [Workday discovery](https://github.com/kushal187/h1b-job-searching-tool/blob/main/collectors/workday_urls.py): `collectors/workday_urls.py`
- [Shared ATS scraper](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/base.py): `scrapers/base.py`
- [Greenhouse scraper](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/greenhouse.py): `scrapers/greenhouse.py`
- [Lever scraper](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/lever.py): `scrapers/lever.py`
- [Ashby scraper](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/ashby.py): `scrapers/ashby.py`
- [Workday scraper](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/workday.py): `scrapers/workday.py`
- [Title filter](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/title_filter.py): `scrapers/title_filter.py`
- [Location filter](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/location_filter.py): `scrapers/location_filter.py`
- [Citizenship filter](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/citizenship_filter.py): `scrapers/citizenship_filter.py`
- [Experience parser](https://github.com/kushal187/h1b-job-searching-tool/blob/main/scrapers/experience_parser.py): `scrapers/experience_parser.py`

### Search and results

- [Web application](https://github.com/kushal187/h1b-job-searching-tool/blob/main/web/app.py): `web/app.py`
- [Web pages](https://github.com/kushal187/h1b-job-searching-tool/tree/main/web/templates): `web/templates`
- [Vercel entry](https://github.com/kushal187/h1b-job-searching-tool/blob/main/api/index.py): `api/index.py`

### Other components

- **Job seeker**

## Connections

- Pipeline CLI → SEC filings: collects filings (evidence: `README.md`)
- Pipeline CLI → H1B records: collects H1B data (evidence: `README.md`)
- Pipeline CLI → Company matcher: runs matching (evidence: `README.md`)
- Company matcher → Name normalization: normalizes names (evidence: `matching/matcher.py`)
- Company matcher → Database: upserts matches (evidence: `matching/matcher.py`)
- Company scoring → Database: reads company data (evidence: `matching/scorer.py`)
- Pipeline CLI → Company scoring: runs scoring (evidence: `pipeline.py`)
- SEC filings → Database: stores filings (evidence: `collectors/sec_formd.py`)
- H1B records → Database: stores employer data (evidence: `collectors/h1b_data.py`)
- SEC filings → Configuration: uses settings (evidence: `collectors/sec_formd.py`)
- H1B records → Configuration: uses settings (evidence: `collectors/h1b_data.py`)
- Pipeline CLI → Workday discovery: discovers boards (evidence: `README.md`)
- Pipeline CLI → Greenhouse scraper: dispatches scraping (evidence: `pipeline.py`)
- Pipeline CLI → Lever scraper: dispatches scraping (evidence: `pipeline.py`)
- Pipeline CLI → Ashby scraper: dispatches scraping (evidence: `pipeline.py`)
- Pipeline CLI → Workday scraper: dispatches scraping (evidence: `pipeline.py`)
- Greenhouse scraper → Shared ATS scraper: uses shared logic (evidence: `scrapers/greenhouse.py`)
- Lever scraper → Shared ATS scraper: uses shared logic (evidence: `scrapers/lever.py`)
- Ashby scraper → Shared ATS scraper: uses shared logic (evidence: `scrapers/ashby.py`)
- Workday scraper → Shared ATS scraper: uses shared logic (evidence: `scrapers/workday.py`)
- Shared ATS scraper → Database: upserts jobs (evidence: `scrapers/base.py`)
- Workday scraper → Database: upserts jobs (evidence: `scrapers/workday.py`)
- Shared ATS scraper → Citizenship filter: checks restrictions (evidence: `scrapers/base.py`)
- Shared ATS scraper → Experience parser: parses experience (evidence: `scrapers/base.py`)
- Greenhouse scraper → Title filter: filters titles (evidence: `scrapers/greenhouse.py`)
- Greenhouse scraper → Location filter: filters locations (evidence: `scrapers/greenhouse.py`)
- Lever scraper → Title filter: filters titles (evidence: `scrapers/lever.py`)
- Lever scraper → Location filter: filters locations (evidence: `scrapers/lever.py`)
- Ashby scraper → Title filter: filters titles (evidence: `scrapers/ashby.py`)
- Ashby scraper → Location filter: filters locations (evidence: `scrapers/ashby.py`)
- Workday scraper → Title filter: filters titles (evidence: `scrapers/workday.py`)
- Workday scraper → Location filter: filters locations (evidence: `scrapers/workday.py`)
- Pipeline CLI → Database: exports results (evidence: `README.md`)
- Job seeker → Web application: browses jobs (evidence: `README.md`)
- Web application → Database: queries listings (evidence: `web/app.py`)
- Web application → Web pages: renders pages (evidence: `web/app.py`)
- Vercel entry → Web application: loads application (evidence: `api/index.py`)
