Architecture of baarai/artex
baarai/artex is 875 source files holding 8,506 symbols across 24 modules, written mainly in Go, TypeScript, JavaScript. The largest module is web, with 202 files, and 3 files are entry points into the dependency graph.
How artex fits together
The command cmd/artex/main.go starts the program, and server/server.go sets up HTTP routing, JWT authentication and server-sent events, with a Manager that owns tasks, engines and database stores. For each task, an engine runs a planner loop alongside worker goroutines that claim intents and execute them. The agent directory builds each agent's tools and prompt, and agent/tools.go exposes the two graphs to the language model as tools it can call. The db package, including db/exploration.go, reads and writes the PostgreSQL records for tasks, assets, findings and model settings. The evidence package stores captured traffic through its Store type, so a finding can point to the request and response that prove it. Outbound HTTP requests from the server, agent, enrich and traffic packages pass through the egress package, which controls their pacing and route.
Largest modules
- web: 202 files and 54,316 lines of code
- server: 185 files and 45,962 lines of code
- db: 144 files and 36,607 lines of code
- agent: 109 files and 15,105 lines of code
- intercept: 42 files and 9,281 lines of code
- traffic: 28 files and 9,265 lines of code
- notify: 27 files and 4,040 lines of code
- scripts: 16 files and 1,481 lines of code
Languages
By file count: Go 578 files, TypeScript 193 files, JavaScript 13 files, Python 12 files, Shell 12 files, Dockerfile 1 file.
Documentation
Repowise documents artex in 693 pages generated from the source, 43 of them written explanations of the repository and its modules.
More on artex: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos