# santosh1664/rejekt-ai architecture

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

- Interactive diagram: https://gitdiagram.com/santosh1664/rejekt-ai
- Repository: https://github.com/santosh1664/rejekt-ai

## Overview

Rejekt.ai is an invite-only job-search app whose main workflow scans employer career pages into PostgreSQL, matches jobs to a user profile, tailors and scores a resume, and tracks or automates applications. The graph also preserves board discovery, account/admin access, PDF output, and browser-based form filling. The README documents the product-level workflow; source excerpts and the SOURCE INDEX support selected implementation links. Several internal API and tailoring details are unsampled, so those links rely on README evidence rather than claims of source inspection.

Main entry points: [`api/server.mjs`](https://github.com/santosh1664/rejekt-ai/blob/main/api/server.mjs) (Application API), [`lib/resume-tailor.mjs`](https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-tailor.mjs) (Resume tailoring), [`autoapply/engine.mjs`](https://github.com/santosh1664/rejekt-ai/blob/main/autoapply/engine.mjs) (Auto-apply lanes), [`scanner/worker.mjs`](https://github.com/santosh1664/rejekt-ai/blob/main/scanner/worker.mjs) (Board ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Job discovery"]
  node_harvester["Board discovery"]
  node_scanner["Scan orchestration<br/>[orchestrator.mjs]"]
  node_scanworker["Board ingestion<br/>[worker.mjs]"]
  node_providers["ATS providers"]
end

subgraph group_matching["Matching"]
  node_matcher["Job matching<br/>[recommend.mjs]"]
  node_keyword["Keyword search<br/>[keyword-search.mjs]"]
  node_matchstore["Saved matches<br/>[persisted.mjs]"]
end

subgraph group_resume["Resume tailoring"]
  node_profile["Resume profile"]
  node_resumeextract["Resume extraction<br/>[resume-extract.mjs]"]
  node_tailor["Resume tailoring<br/>[resume-tailor.mjs]"]
  node_llm["Model access<br/>[llm.mjs]"]
  node_atsscore["ATS scoring<br/>[ats-score.mjs]"]
  node_render["PDF rendering<br/>[resume-render.mjs]"]
end

subgraph group_apply["Application workflow"]
  node_applications["Application tracker<br/>[applications.mjs]"]
  node_autoapply["Auto-apply lanes<br/>[engine.mjs]"]
  node_browserworker["Browser form worker<br/>[page.py]"]
  node_gmail["Gmail codes<br/>[gmail.mjs]"]
end

subgraph group_platform["Web and persistence"]
  node_jobsdb[("Job data<br/>[db.mjs]")]
  node_web["Web app<br/>[server.mjs]"]
  node_api["Application API<br/>[server.mjs]"]
  node_auth["Accounts and access<br/>[auth.mjs]"]
end

node_user(("Job seeker"))
node_boards["Employer boards"]
node_modelservice{{"Hosted model"}}

node_user -->|"uses"| node_web
node_web -->|"routes requests"| node_api
node_web -->|"authenticates"| node_auth
node_api -->|"queries"| node_jobsdb
node_api -->|"manages profiles"| node_profile
node_harvester -->|"supplies boards"| node_scanner
node_boards -->|"provides postings"| node_scanworker
node_scanner -->|"dispatches companies"| node_scanworker
node_scanworker -->|"fetches postings"| node_providers
node_scanworker -->|"stores postings"| node_jobsdb
node_scanner -->|"records scan state"| node_jobsdb
node_jobsdb -->|"supplies jobs"| node_matcher
node_api -->|"requests recommendations"| node_matcher
node_api -->|"loads saved search"| node_keyword
node_api -->|"uses persisted matches"| node_matchstore
node_user -->|"uploads resume"| node_profile
node_api -->|"extracts uploaded resume"| node_resumeextract
node_user -->|"requests tailoring"| node_api
node_api -->|"requests rewrite"| node_tailor
node_tailor -->|"requests rewriting"| node_llm
node_llm -->|"sends prompt"| node_modelservice
node_tailor -->|"scores result"| node_atsscore
node_tailor -->|"renders resume"| node_render
node_user -->|"tracks applications"| node_applications
node_api -->|"records applications"| node_applications
node_api -->|"runs lanes"| node_autoapply
node_autoapply -->|"queues application"| node_applications
node_autoapply -->|"fills forms"| node_browserworker
node_browserworker -->|"requests CAPTCHA help"| node_user
node_autoapply -.->|"reads verification codes"| node_gmail

click node_harvester "https://github.com/santosh1664/rejekt-ai/tree/main/harvester"
click node_scanner "https://github.com/santosh1664/rejekt-ai/blob/main/scanner/orchestrator.mjs"
click node_scanworker "https://github.com/santosh1664/rejekt-ai/blob/main/scanner/worker.mjs"
click node_providers "https://github.com/santosh1664/rejekt-ai/tree/main/providers"
click node_jobsdb "https://github.com/santosh1664/rejekt-ai/blob/main/lib/db.mjs"
click node_profile "https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-profiles.mjs"
click node_web "https://github.com/santosh1664/rejekt-ai/blob/main/server.mjs"
click node_api "https://github.com/santosh1664/rejekt-ai/blob/main/api/server.mjs"
click node_auth "https://github.com/santosh1664/rejekt-ai/blob/main/lib/auth.mjs"
click node_matcher "https://github.com/santosh1664/rejekt-ai/blob/main/matching/recommend.mjs"
click node_keyword "https://github.com/santosh1664/rejekt-ai/blob/main/matching/keyword-search.mjs"
click node_matchstore "https://github.com/santosh1664/rejekt-ai/blob/main/matching/persisted.mjs"
click node_resumeextract "https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-extract.mjs"
click node_tailor "https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-tailor.mjs"
click node_llm "https://github.com/santosh1664/rejekt-ai/blob/main/lib/llm.mjs"
click node_atsscore "https://github.com/santosh1664/rejekt-ai/blob/main/lib/ats-score.mjs"
click node_render "https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-render.mjs"
click node_applications "https://github.com/santosh1664/rejekt-ai/blob/main/lib/applications.mjs"
click node_autoapply "https://github.com/santosh1664/rejekt-ai/blob/main/autoapply/engine.mjs"
click node_browserworker "https://github.com/santosh1664/rejekt-ai/blob/main/autoapply/sb_worker/page.py"
click node_gmail "https://github.com/santosh1664/rejekt-ai/blob/main/lib/gmail.mjs"

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_harvester,node_scanner,node_scanworker,node_providers toneBlue
class node_matcher,node_keyword,node_matchstore toneAmber
class node_profile,node_resumeextract,node_tailor,node_llm,node_atsscore,node_render toneMint
class node_applications,node_autoapply,node_browserworker,node_gmail toneRose
class node_jobsdb,node_web,node_api,node_auth,node_user,node_boards,node_modelservice toneIndigo
```

## Components

### Job discovery

- [Board discovery](https://github.com/santosh1664/rejekt-ai/tree/main/harvester): `harvester`
- [Scan orchestration](https://github.com/santosh1664/rejekt-ai/blob/main/scanner/orchestrator.mjs): `scanner/orchestrator.mjs`
- [Board ingestion](https://github.com/santosh1664/rejekt-ai/blob/main/scanner/worker.mjs): `scanner/worker.mjs`
- [ATS providers](https://github.com/santosh1664/rejekt-ai/tree/main/providers): `providers`

### Matching

- [Job matching](https://github.com/santosh1664/rejekt-ai/blob/main/matching/recommend.mjs): `matching/recommend.mjs`
- [Keyword search](https://github.com/santosh1664/rejekt-ai/blob/main/matching/keyword-search.mjs): `matching/keyword-search.mjs`
- [Saved matches](https://github.com/santosh1664/rejekt-ai/blob/main/matching/persisted.mjs): `matching/persisted.mjs`

### Resume tailoring

- [Resume profile](https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-profiles.mjs): `lib/resume-profiles.mjs`
- [Resume extraction](https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-extract.mjs): `lib/resume-extract.mjs`
- [Resume tailoring](https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-tailor.mjs): `lib/resume-tailor.mjs`
- [Model access](https://github.com/santosh1664/rejekt-ai/blob/main/lib/llm.mjs): `lib/llm.mjs`
- [ATS scoring](https://github.com/santosh1664/rejekt-ai/blob/main/lib/ats-score.mjs): `lib/ats-score.mjs`
- [PDF rendering](https://github.com/santosh1664/rejekt-ai/blob/main/lib/resume-render.mjs): `lib/resume-render.mjs`

### Application workflow

- [Application tracker](https://github.com/santosh1664/rejekt-ai/blob/main/lib/applications.mjs): `lib/applications.mjs`
- [Auto-apply lanes](https://github.com/santosh1664/rejekt-ai/blob/main/autoapply/engine.mjs): `autoapply/engine.mjs`
- [Browser form worker](https://github.com/santosh1664/rejekt-ai/blob/main/autoapply/sb_worker/page.py): `autoapply/sb_worker/page.py`
- [Gmail codes](https://github.com/santosh1664/rejekt-ai/blob/main/lib/gmail.mjs): `lib/gmail.mjs`

### Web and persistence

- [Job data](https://github.com/santosh1664/rejekt-ai/blob/main/lib/db.mjs): `lib/db.mjs`
- [Web app](https://github.com/santosh1664/rejekt-ai/blob/main/server.mjs): `server.mjs`
- [Application API](https://github.com/santosh1664/rejekt-ai/blob/main/api/server.mjs): `api/server.mjs`
- [Accounts and access](https://github.com/santosh1664/rejekt-ai/blob/main/lib/auth.mjs): `lib/auth.mjs`

### Other components

- **Job seeker**
- **Employer boards**
- **Hosted model**

## Connections

- Job seeker → Web app: uses
- Web app → Application API: routes requests (evidence: `server.mjs`)
- Web app → Accounts and access: authenticates (evidence: `server.mjs`)
- Application API → Job data: queries (evidence: `api/server.mjs`)
- Application API → Resume profile: manages profiles (evidence: `api/server.mjs`)
- Board discovery → Scan orchestration: supplies boards
- Employer boards → Board ingestion: provides postings
- Scan orchestration → Board ingestion: dispatches companies (evidence: `scanner/orchestrator.mjs`)
- Board ingestion → ATS providers: fetches postings (evidence: `scanner/worker.mjs`)
- Board ingestion → Job data: stores postings (evidence: `scanner/worker.mjs`)
- Scan orchestration → Job data: records scan state (evidence: `scanner/orchestrator.mjs`)
- Job data → Job matching: supplies jobs
- Application API → Job matching: requests recommendations (evidence: `api/server.mjs`)
- Application API → Keyword search: loads saved search (evidence: `api/server.mjs`)
- Application API → Saved matches: uses persisted matches (evidence: `api/server.mjs`)
- Job seeker → Resume profile: uploads resume
- Application API → Resume extraction: extracts uploaded resume (evidence: `api/server.mjs`)
- Job seeker → Application API: requests tailoring
- Application API → Resume tailoring: requests rewrite (evidence: `api/server.mjs`)
- Resume tailoring → Model access: requests rewriting
- Model access → Hosted model: sends prompt (evidence: `lib/llm.mjs`)
- Resume tailoring → ATS scoring: scores result
- Resume tailoring → PDF rendering: renders resume
- Job seeker → Application tracker: tracks applications
- Application API → Application tracker: records applications (evidence: `api/server.mjs`)
- Application API → Auto-apply lanes: runs lanes (evidence: `api/server.mjs`)
- Auto-apply lanes → Application tracker: queues application (evidence: `autoapply/engine.mjs`)
- Auto-apply lanes → Browser form worker: fills forms
- Browser form worker → Job seeker: requests CAPTCHA help
- Auto-apply lanes → Gmail codes: reads verification codes (evidence: `autoapply/engine.mjs`)
