# developiq-ai/jobs_db architecture

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

- Interactive diagram: https://gitdiagram.com/developiq-ai/jobs_db
- Repository: https://github.com/developiq-ai/jobs_db

## Overview

jobs_db is a hiring.cafe job-data pipeline with a shared scraper framework and an output validator. Its main workflow scrapes and normalizes job postings into JSONL, validates scraper-package outputs, and loads the jobs dataset into Supabase for read-only public access. The README documents the loader and public API; the sampled scraper and validator sources show configuration and validation responsibilities. Other scraper variants and some output-writing details were not inspected.

Main entry points: [`data_in_progress/jobs/hiring_cafe/scraper.ts`](https://github.com/developiq-ai/jobs_db/blob/main/data_in_progress/jobs/hiring_cafe/scraper.ts) (Job scraper), [`validator/index.ts`](https://github.com/developiq-ai/jobs_db/blob/main/validator/index.ts) (Validation entry), [`validator/validators/leads-jsonl.ts`](https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/leads-jsonl.ts) (JSONL record check), [`template/scraper.ts`](https://github.com/developiq-ai/jobs_db/blob/main/template/scraper.ts) (Scraper template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Job collection"]
  node_job_scraper["Job scraper<br/>[scraper.ts]"]
end

subgraph group_framework["Scraper framework"]
  node_source_config["Source configuration<br/>[source-config.ts]"]
  node_scraper_template["Scraper template<br/>[scraper.ts]"]
  node_output_helpers["Output helpers<br/>[source-config.ts]"]
end

subgraph group_quality["Output quality"]
  node_validator_cli["Validation entry<br/>[index.ts]"]
  node_folder_check["Folder structure check"]
  node_yaml_check["Source YAML check<br/>[source-yaml.ts]"]
  node_jsonl_check["JSONL record check<br/>[leads-jsonl.ts]"]
  node_key_check["Primary key check<br/>[primary-key.ts]"]
  node_run_check["Run metadata check<br/>[run-json.ts]"]
end

subgraph group_serving["Data serving"]
  node_supabase_loader["Jobs data loader"]
  node_jobs_db[("Jobs table")]
end

node_operator(("Pipeline operator"))
node_hiring_cafe["hiring.cafe"]
node_api_reader(("API consumer"))

node_operator -->|"starts scrape"| node_job_scraper
node_job_scraper -->|"fetches postings"| node_hiring_cafe
node_job_scraper -->|"loads config"| node_source_config
node_job_scraper -->|"uses output helpers"| node_output_helpers
node_scraper_template -->|"loads config"| node_source_config
node_scraper_template -->|"uses output helpers"| node_output_helpers
node_job_scraper -->|"produces loader input"| node_supabase_loader
node_operator -->|"runs validation"| node_validator_cli
node_validator_cli -->|"runs check"| node_folder_check
node_validator_cli -->|"runs check"| node_yaml_check
node_validator_cli -->|"runs check"| node_jsonl_check
node_validator_cli -->|"runs check"| node_run_check
node_jsonl_check -->|"loads config"| node_yaml_check
node_jsonl_check -->|"checks key format"| node_key_check
node_supabase_loader -->|"upserts jobs"| node_jobs_db
node_api_reader -->|"reads jobs"| node_jobs_db

click node_job_scraper "https://github.com/developiq-ai/jobs_db/blob/main/data_in_progress/jobs/hiring_cafe/scraper.ts"
click node_source_config "https://github.com/developiq-ai/jobs_db/blob/main/lib/source-config.ts"
click node_scraper_template "https://github.com/developiq-ai/jobs_db/blob/main/template/scraper.ts"
click node_output_helpers "https://github.com/developiq-ai/jobs_db/blob/main/lib/source-config.ts"
click node_validator_cli "https://github.com/developiq-ai/jobs_db/blob/main/validator/index.ts"
click node_folder_check "https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/folder-structure.ts"
click node_yaml_check "https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/source-yaml.ts"
click node_jsonl_check "https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/leads-jsonl.ts"
click node_key_check "https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/primary-key.ts"
click node_run_check "https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/run-json.ts"
click node_supabase_loader "https://github.com/developiq-ai/jobs_db/blob/main/data_in_progress/jobs/hiring_cafe/load-to-supabase.ts"

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_job_scraper toneBlue
class node_source_config,node_scraper_template,node_output_helpers toneAmber
class node_validator_cli,node_folder_check,node_yaml_check,node_jsonl_check,node_key_check,node_run_check,node_api_reader toneMint
class node_supabase_loader,node_jobs_db toneRose
class node_operator,node_hiring_cafe toneIndigo
```

## Components

### Job collection

- [Job scraper](https://github.com/developiq-ai/jobs_db/blob/main/data_in_progress/jobs/hiring_cafe/scraper.ts): `data_in_progress/jobs/hiring_cafe/scraper.ts`

### Scraper framework

- [Source configuration](https://github.com/developiq-ai/jobs_db/blob/main/lib/source-config.ts): `lib/source-config.ts`
- [Scraper template](https://github.com/developiq-ai/jobs_db/blob/main/template/scraper.ts): `template/scraper.ts`
- [Output helpers](https://github.com/developiq-ai/jobs_db/blob/main/lib/source-config.ts): `lib/source-config.ts`

### Output quality

- [Validation entry](https://github.com/developiq-ai/jobs_db/blob/main/validator/index.ts): `validator/index.ts`
- [Folder structure check](https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/folder-structure.ts): `validator/validators/folder-structure.ts`
- [Source YAML check](https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/source-yaml.ts): `validator/validators/source-yaml.ts`
- [JSONL record check](https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/leads-jsonl.ts): `validator/validators/leads-jsonl.ts`
- [Primary key check](https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/primary-key.ts): `validator/validators/primary-key.ts`
- [Run metadata check](https://github.com/developiq-ai/jobs_db/blob/main/validator/validators/run-json.ts): `validator/validators/run-json.ts`

### Data serving

- [Jobs data loader](https://github.com/developiq-ai/jobs_db/blob/main/data_in_progress/jobs/hiring_cafe/load-to-supabase.ts): `data_in_progress/jobs/hiring_cafe/load-to-supabase.ts`
- **Jobs table**

### Other components

- **Pipeline operator**
- **hiring.cafe**
- **API consumer**

## Connections

- Pipeline operator → Job scraper: starts scrape (evidence: `README.md`)
- Job scraper → hiring.cafe: fetches postings (evidence: `README.md`)
- Job scraper → Source configuration: loads config (evidence: `data_in_progress/jobs/hiring_cafe/scraper.ts`)
- Job scraper → Output helpers: uses output helpers (evidence: `data_in_progress/jobs/hiring_cafe/scraper.ts`)
- Scraper template → Source configuration: loads config (evidence: `template/scraper.ts`)
- Scraper template → Output helpers: uses output helpers (evidence: `template/scraper.ts`)
- Job scraper → Jobs data loader: produces loader input (evidence: `README.md`)
- Pipeline operator → Validation entry: runs validation (evidence: `README.md`)
- Validation entry → Folder structure check: runs check (evidence: `validator/index.ts`)
- Validation entry → Source YAML check: runs check (evidence: `validator/index.ts`)
- Validation entry → JSONL record check: runs check (evidence: `validator/index.ts`)
- Validation entry → Run metadata check: runs check (evidence: `validator/index.ts`)
- JSONL record check → Source YAML check: loads config (evidence: `validator/validators/leads-jsonl.ts`)
- JSONL record check → Primary key check: checks key format (evidence: `validator/validators/leads-jsonl.ts`)
- Jobs data loader → Jobs table: upserts jobs (evidence: `README.md`)
- API consumer → Jobs table: reads jobs (evidence: `README.md`)
