# adedigbaoluwad1/jobhunt architecture

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

- Interactive diagram: https://gitdiagram.com/adedigbaoluwad1/jobhunt
- Repository: https://github.com/adedigbaoluwad1/jobhunt

## Overview

jobhunt is a single-user CLI that gathers job postings, filters and deduplicates them, scores qualifying matches, and prepares fact-checked tailored CVs; it leaves application submission to the user. Its central workflow runs through SyncService, which coordinates source fetching, normalization, filtering, persistence, and extraction. Other CLI commands support browsing, status tracking, statistics, and CV preparation. Local configuration and SQLite-backed job data are core state. Source adapters and LLM providers are documented capabilities; unsampled implementation details are represented at their supported directory paths, and uncertain calls are omitted.

Main entry points: [`src/jobs/sync.service.ts`](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/sync.service.ts) (Sync coordinator), [`src/cv/tailor.service.ts`](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/tailor.service.ts) (CV tailoring), [`src/db/jobs.repository.ts`](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/db/jobs.repository.ts) (Jobs repository), [`src/jobs/extractor.service.ts`](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/extractor.service.ts) (Match extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_commands["CLI commands"]
  node_listing["Browse and track<br/>[list.command.ts]"]
  node_status["Status and statistics<br/>[status.command.ts]"]
end

subgraph group_jobs["Job discovery"]
  node_sync["Sync coordinator<br/>[sync.service.ts]"]
  node_sources["Source registry<br/>[sources.service.ts]"]
  node_adapters["Job source adapters"]
  node_normalize["Normalize and dedupe<br/>[normalize.ts]"]
  node_filter["Rule filtering<br/>[filter.service.ts]"]
end

subgraph group_intelligence["Scoring and tailoring"]
  node_extractor["Match extraction"]
  node_llm["LLM router<br/>[llm.service.ts]"]
  node_providers["LLM providers"]
  node_tailor["CV tailoring<br/>[tailor.service.ts]"]
  node_mastercv["Master CV"]
  node_validator["Fact validator"]
  node_renderer["CV renderer<br/>[render.service.ts]"]
end

subgraph group_state["Local state"]
  node_config["Configuration<br/>[config.service.ts]"]
  node_repository["Jobs repository<br/>[jobs.repository.ts]"]
  node_database[("SQLite database<br/>[prisma.service.ts]")]
end

node_user(("User"))
node_llm_services["LLM services"]

node_user -->|"runs commands"| node_commands
node_commands -->|"starts sync"| node_sync
node_sync -->|"loads settings"| node_config
node_sync -->|"gets sources"| node_sources
node_sources -->|"registers adapters"| node_adapters
node_sync -->|"fetches postings"| node_adapters
node_sync -->|"normalizes postings"| node_normalize
node_sync -->|"evaluates rules"| node_filter
node_sync -->|"upserts and tracks"| node_repository
node_sync -->|"extracts matches"| node_extractor
node_extractor -->|"loads and saves results"| node_repository
node_extractor -->|"requests scoring"| node_llm
node_llm -->|"routes model calls"| node_providers
node_providers -.->|"calls model services"| node_llm_services
node_commands -->|"starts tailoring"| node_tailor
node_tailor -->|"loads source CV"| node_mastercv
node_tailor -->|"ensures extraction"| node_extractor
node_tailor -->|"requests tailored CV"| node_llm
node_tailor -->|"validates content"| node_validator
node_tailor -->|"renders document"| node_renderer
node_listing -->|"reads job records"| node_repository
node_user -->|"browses postings"| node_listing
node_user -->|"tracks applications"| node_status
node_repository -->|"queries and persists"| node_database
node_sync -->|"records run stats"| node_repository

click node_commands "https://github.com/adedigbaoluwad1/jobhunt/tree/main/src/commands"
click node_sync "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/sync.service.ts"
click node_sources "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/sources/sources.service.ts"
click node_adapters "https://github.com/adedigbaoluwad1/jobhunt/tree/main/src/sources"
click node_normalize "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/normalize.ts"
click node_filter "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/filter.service.ts"
click node_extractor "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/extractor.service.ts"
click node_llm "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/llm/llm.service.ts"
click node_providers "https://github.com/adedigbaoluwad1/jobhunt/tree/main/src/llm"
click node_tailor "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/tailor.service.ts"
click node_mastercv "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/master-cv.service.ts"
click node_validator "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/tailor.validator.ts"
click node_renderer "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/render.service.ts"
click node_config "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/config/config.service.ts"
click node_repository "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/db/jobs.repository.ts"
click node_database "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/db/prisma.service.ts"
click node_listing "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/commands/list.command.ts"
click node_status "https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/commands/status.command.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_commands,node_listing,node_status,node_user toneBlue
class node_sync,node_sources,node_adapters,node_normalize,node_filter toneAmber
class node_extractor,node_llm,node_providers,node_tailor,node_mastercv,node_validator,node_renderer toneMint
class node_config,node_repository,node_database toneRose
class node_llm_services toneIndigo
```

## Components

### CLI workflows

- [CLI commands](https://github.com/adedigbaoluwad1/jobhunt/tree/main/src/commands): `src/commands`
- [Browse and track](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/commands/list.command.ts): `src/commands/list.command.ts`
- [Status and statistics](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/commands/status.command.ts): `src/commands/status.command.ts`

### Job discovery

- [Sync coordinator](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/sync.service.ts): `src/jobs/sync.service.ts`
- [Source registry](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/sources/sources.service.ts): `src/sources/sources.service.ts`
- [Job source adapters](https://github.com/adedigbaoluwad1/jobhunt/tree/main/src/sources): `src/sources`
- [Normalize and dedupe](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/normalize.ts): `src/jobs/normalize.ts`
- [Rule filtering](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/filter.service.ts): `src/jobs/filter.service.ts`

### Scoring and tailoring

- [Match extraction](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/jobs/extractor.service.ts): `src/jobs/extractor.service.ts`
- [LLM router](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/llm/llm.service.ts): `src/llm/llm.service.ts`
- [LLM providers](https://github.com/adedigbaoluwad1/jobhunt/tree/main/src/llm): `src/llm`
- [CV tailoring](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/tailor.service.ts): `src/cv/tailor.service.ts`
- [Master CV](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/master-cv.service.ts): `src/cv/master-cv.service.ts`
- [Fact validator](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/tailor.validator.ts): `src/cv/tailor.validator.ts`
- [CV renderer](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/cv/render.service.ts): `src/cv/render.service.ts`

### Local state

- [Configuration](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/config/config.service.ts): `src/config/config.service.ts`
- [Jobs repository](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/db/jobs.repository.ts): `src/db/jobs.repository.ts`
- [SQLite database](https://github.com/adedigbaoluwad1/jobhunt/blob/main/src/db/prisma.service.ts): `src/db/prisma.service.ts`

### Other components

- **User**
- **LLM services**

## Connections

- User → CLI commands: runs commands
- CLI commands → Sync coordinator: starts sync (evidence: `src/commands/sync.command.ts`)
- Sync coordinator → Configuration: loads settings (evidence: `src/jobs/sync.service.ts`)
- Sync coordinator → Source registry: gets sources (evidence: `src/jobs/sync.service.ts`)
- Source registry → Job source adapters: registers adapters (evidence: `src/sources/sources.service.ts`)
- Sync coordinator → Job source adapters: fetches postings (evidence: `src/jobs/sync.service.ts`)
- Sync coordinator → Normalize and dedupe: normalizes postings (evidence: `src/jobs/sync.service.ts`)
- Sync coordinator → Rule filtering: evaluates rules (evidence: `src/jobs/sync.service.ts`)
- Sync coordinator → Jobs repository: upserts and tracks (evidence: `src/jobs/sync.service.ts`)
- Sync coordinator → Match extraction: extracts matches (evidence: `src/jobs/sync.service.ts`)
- Match extraction → Jobs repository: loads and saves results (evidence: `src/jobs/extractor.service.ts`)
- Match extraction → LLM router: requests scoring (evidence: `src/jobs/extractor.service.ts`)
- LLM router → LLM providers: routes model calls (evidence: `src/llm/llm.service.ts`)
- LLM providers → LLM services: calls model services
- CLI commands → CV tailoring: starts tailoring (evidence: `src/cv/tailor.service.ts`)
- CV tailoring → Master CV: loads source CV (evidence: `src/cv/tailor.service.ts`)
- CV tailoring → Match extraction: ensures extraction (evidence: `src/cv/tailor.service.ts`)
- CV tailoring → LLM router: requests tailored CV (evidence: `src/cv/tailor.service.ts`)
- CV tailoring → Fact validator: validates content (evidence: `src/cv/tailor.service.ts`)
- CV tailoring → CV renderer: renders document (evidence: `src/cv/tailor.service.ts`)
- Browse and track → Jobs repository: reads job records (evidence: `src/commands/list.command.ts`)
- User → Browse and track: browses postings (evidence: `README.md`)
- User → Status and statistics: tracks applications (evidence: `README.md`)
- Jobs repository → SQLite database: queries and persists (evidence: `src/db/jobs.repository.ts`)
- Sync coordinator → Jobs repository: records run stats (evidence: `src/jobs/sync.service.ts`)
