Overview
Source layout
cmd/highvolt-server/
├── main.go — startup, HTTP routing, TLS, shutdown
├── submit.go — POST /submit handler
├── query.go — POST /query handler
├── jwt.go — authentication token issuance and middleware
├── ratelimit.go — per-IP rate limiting for /auth/token
├── haproxy.go — optional HAProxy TCP health agent
├── reload.go — config/debug reload monitor
├── signal.go — OS signal handler
├── log.go — HTTP request logger middleware
├── auth/
│ └── jwt_pat.go — PAT → JWT exchange for JSONAir
├── config/
│ ├── config.go — config fetch, parse, and hot-reload
│ └── env.go — environment variable loading
├── db/
│ └── opensearch.go — OpenSearch index and search
├── debug/
│ └── debug.go — debug flag management
├── helpers/
│ ├── helpers.go — MIME type classification
│ └── sanity.go — JSON payload validation
├── llm/
│ └── llm.go — LLM submission (OpenAI-compatible)
├── models/
│ ├── config.go — config structs
│ └── env.go — environment structs
├── processors/
│ ├── submit_data.go — dispatch to per-type processor
│ ├── pdf.go — PDF → PNG → LLM
│ ├── office.go — Office → PDF → PNG → LLM
│ └── archive.go — archive extraction and per-file analysis
└── queue/
├── queue.go — in-memory bounded channel queue
├── worker.go — goroutine worker pool
└── dowork.go — per-item work dispatchStartup sequence
Last updated