# baptchau/ats-go architecture

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

- Interactive diagram: https://gitdiagram.com/baptchau/ats-go
- Repository: https://github.com/baptchau/ats-go

## Overview

ats-go is a small HTTP resume-parsing service: a client uploads a PDF, DOCX, or TXT file and receives normalized text plus heuristically extracted candidate fields as JSON. The documented workflow is owned by the server entry point and upload handler, which dispatches parsing, builds the response model, and serializes success or error responses. The parser has distinct format extraction, normalization, and field-detection stages. The README also documents health checks and a built-in skills taxonomy. The graph follows excerpted calls; no persistence or third-party runtime services are shown.

Main entry points: [`internal/parser/parser.go`](https://github.com/baptchau/ats-go/blob/master/internal/parser/parser.go) (Format dispatch), [`internal/api/handler.go`](https://github.com/baptchau/ats-go/blob/master/internal/api/handler.go) (Routes and upload), [`main.go`](https://github.com/baptchau/ats-go/blob/master/main.go) (HTTP server), [`internal/parser/extract.go`](https://github.com/baptchau/ats-go/blob/master/internal/parser/extract.go) (Field extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP service"]
  node_server["HTTP server<br/>[main.go]"]
  node_routes["Routes and upload<br/>[handler.go]"]
end

subgraph group_parsing["Resume parsing"]
  node_parser["Format dispatch<br/>[parser.go]"]
  node_pdf["PDF extraction<br/>[pdf.go]"]
  node_docx["DOCX extraction<br/>[docx.go]"]
  node_normalization["Text normalization<br/>[parser.go]"]
  node_fields["Field extraction<br/>[extract.go]"]
  node_skills["Skills taxonomy<br/>[skills.go]"]
  node_skillsdata["Skills data<br/>[skills.json]"]
end

subgraph group_schema["Response model"]
  node_resume["Resume payload<br/>[resume.go]"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_server
node_server -->|"registers routes"| node_routes
node_client -->|"uploads resume"| node_routes
node_routes -->|"parses upload"| node_parser
node_parser -->|"extracts PDF"| node_pdf
node_parser -->|"extracts DOCX"| node_docx
node_parser -->|"normalizes text"| node_normalization
node_parser -->|"extracts fields"| node_fields
node_fields -->|"detects skills"| node_skills
node_skills -->|"loads taxonomy"| node_skillsdata
node_parser -->|"builds payload"| node_resume
node_routes -->|"returns JSON"| node_client

click node_server "https://github.com/baptchau/ats-go/blob/master/main.go"
click node_routes "https://github.com/baptchau/ats-go/blob/master/internal/api/handler.go"
click node_parser "https://github.com/baptchau/ats-go/blob/master/internal/parser/parser.go"
click node_pdf "https://github.com/baptchau/ats-go/blob/master/internal/parser/pdf.go"
click node_docx "https://github.com/baptchau/ats-go/blob/master/internal/parser/docx.go"
click node_normalization "https://github.com/baptchau/ats-go/blob/master/internal/parser/parser.go"
click node_fields "https://github.com/baptchau/ats-go/blob/master/internal/parser/extract.go"
click node_skills "https://github.com/baptchau/ats-go/blob/master/internal/parser/skills.go"
click node_skillsdata "https://github.com/baptchau/ats-go/blob/master/internal/parser/data/skills.json"
click node_resume "https://github.com/baptchau/ats-go/blob/master/internal/model/resume.go"

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_server,node_routes,node_client toneBlue
class node_parser,node_pdf,node_docx,node_normalization,node_fields,node_skills,node_skillsdata toneAmber
class node_resume toneMint
```

## Components

### HTTP service

- [HTTP server](https://github.com/baptchau/ats-go/blob/master/main.go): `main.go`
- [Routes and upload](https://github.com/baptchau/ats-go/blob/master/internal/api/handler.go): `internal/api/handler.go`

### Resume parsing

- [Format dispatch](https://github.com/baptchau/ats-go/blob/master/internal/parser/parser.go): `internal/parser/parser.go`
- [PDF extraction](https://github.com/baptchau/ats-go/blob/master/internal/parser/pdf.go): `internal/parser/pdf.go`
- [DOCX extraction](https://github.com/baptchau/ats-go/blob/master/internal/parser/docx.go): `internal/parser/docx.go`
- [Text normalization](https://github.com/baptchau/ats-go/blob/master/internal/parser/parser.go): `internal/parser/parser.go`
- [Field extraction](https://github.com/baptchau/ats-go/blob/master/internal/parser/extract.go): `internal/parser/extract.go`
- [Skills taxonomy](https://github.com/baptchau/ats-go/blob/master/internal/parser/skills.go): `internal/parser/skills.go`
- [Skills data](https://github.com/baptchau/ats-go/blob/master/internal/parser/data/skills.json): `internal/parser/data/skills.json`

### Response model

- [Resume payload](https://github.com/baptchau/ats-go/blob/master/internal/model/resume.go): `internal/model/resume.go`

### Other components

- **API client**

## Connections

- API client → HTTP server: sends requests (evidence: `README.md`)
- HTTP server → Routes and upload: registers routes (evidence: `main.go`)
- API client → Routes and upload: uploads resume (evidence: `README.md`)
- Routes and upload → Format dispatch: parses upload (evidence: `internal/api/handler.go`)
- Format dispatch → PDF extraction: extracts PDF (evidence: `internal/parser/parser.go`)
- Format dispatch → DOCX extraction: extracts DOCX (evidence: `internal/parser/parser.go`)
- Format dispatch → Text normalization: normalizes text (evidence: `internal/parser/parser.go`)
- Format dispatch → Field extraction: extracts fields (evidence: `internal/parser/parser.go`)
- Field extraction → Skills taxonomy: detects skills (evidence: `internal/parser/extract.go`)
- Skills taxonomy → Skills data: loads taxonomy (evidence: `internal/parser/skills.go`)
- Format dispatch → Resume payload: builds payload (evidence: `internal/parser/parser.go`)
- Routes and upload → API client: returns JSON (evidence: `internal/api/handler.go`)
