# ksaifstack/searchtern-listings architecture

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

- Interactive diagram: https://gitdiagram.com/ksaifstack/searchtern-listings
- Repository: https://github.com/ksaifstack/searchtern-listings

## Overview

SearchTern is an internship and new-grad listings aggregator. Its principal workflow collects ATS, board-probe, and community-feed postings, filters and deduplicates them, enriches listings, and publishes browsable and machine-readable feeds. The repository also includes coverage/health reporting and an MCP query interface. Relationships are limited to README statements and SOURCE INDEX references; excerpts do not expose the full orchestration, so some internal links are omitted.

Main entry points: [`Listings/generate_listings.py`](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/generate_listings.py) (Ingestion orchestrator), [`Listings/publish.py`](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/publish.py) (Feed publication), [`Listings/readme_generation.py`](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/readme_generation.py) (Listing pages), [`Listings/feed_manifest.py`](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/feed_manifest.py) (Feed manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Listing collection"]
  node_ats["ATS scrapers"]
  node_board_probes["Board probes<br/>[board_scheduler.py]"]
  node_markdown_feeds["Community feeds"]
  node_other_sources["Other source adapters"]
  node_generator["Ingestion orchestrator"]
end

subgraph group_processing["Listing processing"]
  node_classification["Role classification<br/>[classify.py]"]
  node_canonicalization["Canonical identity<br/>[canonical.py]"]
  node_deduplication["Listing deduplication<br/>[dedup.py]"]
  node_enrichment["Listing enrichment<br/>[enrich.py]"]
  node_visa_data["H-1B enrichment<br/>[h1b_enrich.py]"]
  node_snapshots[("Source snapshots<br/>[snapshots.py]")]
  node_freshness_health["Source health<br/>[source_health.py]"]
end

subgraph group_publication["Publication and reporting"]
  node_feed_manifest["Feed manifest<br/>[feed_manifest.py]"]
  node_readme_generation["Listing pages"]
  node_publish["Feed publication<br/>[publish.py]"]
  node_coverage["Coverage reporting<br/>[coverage.py]"]
end

subgraph group_access["Search and access"]
  node_mcp["MCP query server<br/>[searchtern_mcp.py]"]
end

node_students(("Students"))
node_agents(("Agents"))
node_feed_users(("Feed consumers"))

node_ats -->|"provides postings"| node_generator
node_board_probes -->|"provides postings"| node_generator
node_markdown_feeds -->|"provides postings"| node_generator
node_other_sources -.->|"provides postings"| node_generator
node_generator -->|"classifies roles"| node_classification
node_generator -->|"deduplicates rows"| node_deduplication
node_generator -->|"uses identity rules"| node_canonicalization
node_generator -->|"enriches listings"| node_enrichment
node_generator -->|"adds H-1B data"| node_visa_data
node_generator -->|"uses snapshots"| node_snapshots
node_generator -->|"checks freshness"| node_freshness_health
node_generator -.->|"publishes results"| node_publish
node_publish -->|"generates pages"| node_readme_generation
node_readme_generation -->|"prepares manifest"| node_feed_manifest
node_publish -->|"reads snapshots"| node_snapshots
node_publish -->|"deduplicates rows"| node_deduplication
node_readme_generation -.->|"builds coverage"| node_coverage
node_students -->|"browses listings"| node_readme_generation
node_agents -->|"queries listings"| node_mcp
node_mcp -.->|"returns results"| node_feed_users
node_feed_manifest -->|"describes feeds"| node_feed_users
node_publish -->|"delivers feeds"| node_feed_users

click node_board_probes "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/board_scheduler.py"
click node_markdown_feeds "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/markdown_sources.py"
click node_other_sources "https://github.com/ksaifstack/searchtern-listings/tree/main/Listings"
click node_generator "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/generate_listings.py"
click node_classification "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/classify.py"
click node_canonicalization "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/canonical.py"
click node_deduplication "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/dedup.py"
click node_enrichment "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/enrich.py"
click node_visa_data "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/h1b_enrich.py"
click node_snapshots "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/snapshots.py"
click node_freshness_health "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/source_health.py"
click node_feed_manifest "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/feed_manifest.py"
click node_readme_generation "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/readme_generation.py"
click node_publish "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/publish.py"
click node_coverage "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/coverage.py"
click node_mcp "https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/searchtern_mcp.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_ats,node_board_probes,node_markdown_feeds,node_other_sources,node_generator toneBlue
class node_classification,node_canonicalization,node_deduplication,node_enrichment,node_visa_data,node_snapshots,node_freshness_health toneAmber
class node_feed_manifest,node_readme_generation,node_publish,node_coverage toneMint
class node_mcp toneRose
class node_students,node_agents,node_feed_users toneIndigo
```

## Components

### Listing collection

- **ATS scrapers**
- [Board probes](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/board_scheduler.py): `Listings/board_scheduler.py`
- [Community feeds](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/markdown_sources.py): `Listings/markdown_sources.py`
- [Other source adapters](https://github.com/ksaifstack/searchtern-listings/tree/main/Listings): `Listings`
- [Ingestion orchestrator](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/generate_listings.py): `Listings/generate_listings.py`

### Listing processing

- [Role classification](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/classify.py): `Listings/classify.py`
- [Canonical identity](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/canonical.py): `Listings/canonical.py`
- [Listing deduplication](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/dedup.py): `Listings/dedup.py`
- [Listing enrichment](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/enrich.py): `Listings/enrich.py`
- [H-1B enrichment](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/h1b_enrich.py): `Listings/h1b_enrich.py`
- [Source snapshots](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/snapshots.py): `Listings/snapshots.py`
- [Source health](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/source_health.py): `Listings/source_health.py`

### Publication and reporting

- [Feed manifest](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/feed_manifest.py): `Listings/feed_manifest.py`
- [Listing pages](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/readme_generation.py): `Listings/readme_generation.py`
- [Feed publication](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/publish.py): `Listings/publish.py`
- [Coverage reporting](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/coverage.py): `Listings/coverage.py`

### Search and access

- [MCP query server](https://github.com/ksaifstack/searchtern-listings/blob/main/Listings/searchtern_mcp.py): `Listings/searchtern_mcp.py`

### Other components

- **Students**
- **Agents**
- **Feed consumers**

## Connections

- ATS scrapers → Ingestion orchestrator: provides postings
- Board probes → Ingestion orchestrator: provides postings (evidence: `Listings/generate_listings.py`)
- Community feeds → Ingestion orchestrator: provides postings (evidence: `Listings/generate_listings.py`)
- Other source adapters → Ingestion orchestrator: provides postings (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Role classification: classifies roles (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Listing deduplication: deduplicates rows (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Canonical identity: uses identity rules (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Listing enrichment: enriches listings (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → H-1B enrichment: adds H-1B data (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Source snapshots: uses snapshots (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Source health: checks freshness (evidence: `Listings/generate_listings.py`)
- Ingestion orchestrator → Feed publication: publishes results (evidence: `Listings/generate_listings.py`)
- Feed publication → Listing pages: generates pages (evidence: `Listings/publish.py`)
- Listing pages → Feed manifest: prepares manifest (evidence: `Listings/readme_generation.py`)
- Feed publication → Source snapshots: reads snapshots (evidence: `Listings/publish.py`)
- Feed publication → Listing deduplication: deduplicates rows (evidence: `Listings/publish.py`)
- Listing pages → Coverage reporting: builds coverage (evidence: `Listings/readme_generation.py`)
- Students → Listing pages: browses listings
- Agents → MCP query server: queries listings
- MCP query server → Feed consumers: returns results
- Feed manifest → Feed consumers: describes feeds
- Feed publication → Feed consumers: delivers feeds
