# kecoje/hr-agi-tool architecture

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

- Interactive diagram: https://gitdiagram.com/kecoje/hr-agi-tool
- Repository: https://github.com/kecoje/hr-agi-tool

## Overview

HR-AGI-Tool is a candidate-screening demo: a user supplies a CV PDF and job position, the server extracts CV text and profile links, optionally gathers GitHub activity, requests an AI assessment, and returns structured results. The README also describes candidate profiling, skill matching, and preliminary interviews, but the sampled runtime does not show separate implementations for those capabilities. The frontend directory is not sampled, so its connection to the server is unverified.

Main entry points: [`server.ts`](https://github.com/kecoje/hr-agi-tool/blob/master/server.ts) (HTTP server), [`hr-helper`](https://github.com/kecoje/hr-agi-tool/tree/master/hr-helper) (Web client), [`src/github.ts`](https://github.com/kecoje/hr-agi-tool/blob/master/src/github.ts) (GitHub scraper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Candidate Intake"]
  node_client["Web client"]
  node_server["HTTP server<br/>[server.ts]"]
end

subgraph group_processing["Candidate Processing"]
  node_pdf["PDF extraction<br/>[server.ts]"]
  node_profile_links["Profile links<br/>[server.ts]"]
  node_github_scraper["GitHub scraper<br/>[github.ts]"]
end

subgraph group_assessment["Assessment"]
  node_openai["AI assessment"]
  node_report["Candidate results<br/>[server.ts]"]
end

node_user(("HR user"))
node_github["GitHub"]

node_user -.->|"provides CV"| node_client
node_client -.->|"submits evaluation"| node_server
node_server -->|"serves static files"| node_client
node_server -->|"parses PDF"| node_pdf
node_server -->|"extracts links"| node_profile_links
node_server -->|"scrapes profile"| node_github_scraper
node_github_scraper -->|"reads profile"| node_github
node_server -->|"requests assessment"| node_openai
node_server -->|"returns results"| node_report
node_openai -->|"supplies assessment"| node_report

click node_client "https://github.com/kecoje/hr-agi-tool/tree/master/hr-helper"
click node_server "https://github.com/kecoje/hr-agi-tool/blob/master/server.ts"
click node_pdf "https://github.com/kecoje/hr-agi-tool/blob/master/server.ts"
click node_profile_links "https://github.com/kecoje/hr-agi-tool/blob/master/server.ts"
click node_github_scraper "https://github.com/kecoje/hr-agi-tool/blob/master/src/github.ts"
click node_report "https://github.com/kecoje/hr-agi-tool/blob/master/server.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_client,node_server,node_user toneBlue
class node_pdf,node_profile_links,node_github_scraper toneAmber
class node_openai,node_report toneMint
class node_github toneIndigo
```

## Components

### Candidate Intake

- [Web client](https://github.com/kecoje/hr-agi-tool/tree/master/hr-helper): `hr-helper`
- [HTTP server](https://github.com/kecoje/hr-agi-tool/blob/master/server.ts): `server.ts`

### Candidate Processing

- [PDF extraction](https://github.com/kecoje/hr-agi-tool/blob/master/server.ts): `server.ts`
- [Profile links](https://github.com/kecoje/hr-agi-tool/blob/master/server.ts): `server.ts`
- [GitHub scraper](https://github.com/kecoje/hr-agi-tool/blob/master/src/github.ts): `src/github.ts`

### Assessment

- **AI assessment**
- [Candidate results](https://github.com/kecoje/hr-agi-tool/blob/master/server.ts): `server.ts`

### Other components

- **HR user**
- **GitHub**

## Connections

- HR user → Web client: provides CV (evidence: `README.md`)
- Web client → HTTP server: submits evaluation
- HTTP server → Web client: serves static files (evidence: `server.ts`)
- HTTP server → PDF extraction: parses PDF (evidence: `server.ts`)
- HTTP server → Profile links: extracts links (evidence: `server.ts`)
- HTTP server → GitHub scraper: scrapes profile (evidence: `server.ts`)
- GitHub scraper → GitHub: reads profile (evidence: `src/github.ts`)
- HTTP server → AI assessment: requests assessment (evidence: `server.ts`)
- HTTP server → Candidate results: returns results (evidence: `server.ts`)
- AI assessment → Candidate results: supplies assessment (evidence: `server.ts`)
