# jiwoochris/artex-ko architecture

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

- Interactive diagram: https://gitdiagram.com/jiwoochris/artex-ko
- Repository: https://github.com/jiwoochris/artex-ko

## Overview

ARTEX is a Go backend and Next.js interface for autonomous, multi-agent penetration testing: users configure and launch scoped tasks, agents plan and execute tool-driven exploration, and the system records assets, findings, traffic and evidence for review and reporting. The graph emphasizes the documented task-to-result flow and major review capabilities. Source excerpts establish key runtime calls; some feature links are documented by the README, while unsampled subsystem wiring is left unasserted.

Main entry points: [`server/server.go`](https://github.com/jiwoochris/artex-ko/blob/main/server/server.go) (HTTP API), [`server/manager.go`](https://github.com/jiwoochris/artex-ko/blob/main/server/manager.go) (Task manager), [`server/engine.go`](https://github.com/jiwoochris/artex-ko/blob/main/server/engine.go) (Task engine), [`agent/worker.go`](https://github.com/jiwoochris/artex-ko/blob/main/agent/worker.go) (Worker agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Task runtime"]
  node_entry["Backend startup<br/>[main.go]"]
  node_api["HTTP API<br/>[server.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_engine["Task engine<br/>[engine.go]"]
  node_worker["Worker agent<br/>[worker.go]"]
  node_planner["Planner agent<br/>[planner.go]"]
  node_agenttools["Agent tools<br/>[tools.go]"]
  node_llmpool["LLM providers<br/>[pool.go]"]
end

subgraph group_data["Exploration data"]
  node_pg[("PostgreSQL data<br/>[db.go]")]
  node_traffic[("Traffic capture<br/>[traffic.go]")]
  node_evidence[("Finding evidence<br/>[store.go]")]
  node_llmrec[("LLM records<br/>[llmrec.go]")]
end

subgraph group_review["Review and reporting"]
  node_intercept["Command review<br/>[intercept.go]"]
  node_guard["Execution guard<br/>[guard.go]"]
  node_enrich["Asset enrichment<br/>[enrich.go]"]
  node_reports["Finding reports<br/>[report.go]"]
end

subgraph group_interface["User interface"]
  node_web["Web application<br/>[page.tsx]"]
  node_findings["Finding review<br/>[page.tsx]"]
  node_trafficui["Traffic review<br/>[page.tsx]"]
end

node_user(("Operator"))

node_user -->|"uses"| node_web
node_web -.->|"requests data"| node_api
node_entry -->|"creates"| node_manager
node_entry -->|"serves"| node_api
node_manager -->|"opens"| node_pg
node_manager -->|"starts proxy"| node_traffic
node_api -->|"routes tasks"| node_engine
node_engine -->|"reads tasks"| node_manager
node_engine -->|"runs intents"| node_worker
node_engine -.->|"runs planner"| node_planner
node_worker -->|"invokes tools"| node_agenttools
node_worker -->|"gates calls"| node_guard
node_engine -.->|"coordinates review"| node_intercept
node_worker -->|"records discoveries"| node_pg
node_agenttools -->|"reads exchanges"| node_traffic
node_manager -->|"configures agents"| node_enrich
node_manager -.->|"configures providers"| node_llmpool
node_llmpool -.->|"records calls"| node_llmrec
node_llmrec -->|"stores usage"| node_pg
node_evidence -->|"snapshots exchanges"| node_traffic
node_api -.->|"serves reports"| node_reports
node_api -.->|"provides findings"| node_findings
node_api -.->|"provides traffic"| node_trafficui
node_web -.->|"navigates to"| node_findings

click node_entry "https://github.com/jiwoochris/artex-ko/blob/main/cmd/artex/main.go"
click node_api "https://github.com/jiwoochris/artex-ko/blob/main/server/server.go"
click node_manager "https://github.com/jiwoochris/artex-ko/blob/main/server/manager.go"
click node_engine "https://github.com/jiwoochris/artex-ko/blob/main/server/engine.go"
click node_worker "https://github.com/jiwoochris/artex-ko/blob/main/agent/worker.go"
click node_planner "https://github.com/jiwoochris/artex-ko/blob/main/agent/planner.go"
click node_agenttools "https://github.com/jiwoochris/artex-ko/blob/main/agent/tools.go"
click node_llmpool "https://github.com/jiwoochris/artex-ko/blob/main/llmpool/pool.go"
click node_pg "https://github.com/jiwoochris/artex-ko/blob/main/db/db.go"
click node_traffic "https://github.com/jiwoochris/artex-ko/blob/main/traffic/traffic.go"
click node_evidence "https://github.com/jiwoochris/artex-ko/blob/main/evidence/store.go"
click node_llmrec "https://github.com/jiwoochris/artex-ko/blob/main/llmrec/llmrec.go"
click node_intercept "https://github.com/jiwoochris/artex-ko/blob/main/intercept/intercept.go"
click node_guard "https://github.com/jiwoochris/artex-ko/blob/main/guard/guard.go"
click node_enrich "https://github.com/jiwoochris/artex-ko/blob/main/enrich/enrich.go"
click node_reports "https://github.com/jiwoochris/artex-ko/blob/main/report/report.go"
click node_web "https://github.com/jiwoochris/artex-ko/blob/main/web/src/app/(main)/dashboard/page.tsx"
click node_findings "https://github.com/jiwoochris/artex-ko/blob/main/web/src/app/(main)/function/findings/page.tsx"
click node_trafficui "https://github.com/jiwoochris/artex-ko/blob/main/web/src/app/(main)/function/traffic/page.tsx"

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_entry,node_api,node_manager,node_engine,node_worker,node_planner,node_agenttools,node_llmpool toneBlue
class node_pg,node_traffic,node_evidence,node_llmrec toneAmber
class node_intercept,node_guard,node_enrich,node_reports toneMint
class node_web,node_findings,node_trafficui toneRose
class node_user toneIndigo
```

## Components

### Task runtime

- [Backend startup](https://github.com/jiwoochris/artex-ko/blob/main/cmd/artex/main.go): `cmd/artex/main.go`
- [HTTP API](https://github.com/jiwoochris/artex-ko/blob/main/server/server.go): `server/server.go`
- [Task manager](https://github.com/jiwoochris/artex-ko/blob/main/server/manager.go): `server/manager.go`
- [Task engine](https://github.com/jiwoochris/artex-ko/blob/main/server/engine.go): `server/engine.go`
- [Worker agent](https://github.com/jiwoochris/artex-ko/blob/main/agent/worker.go): `agent/worker.go`
- [Planner agent](https://github.com/jiwoochris/artex-ko/blob/main/agent/planner.go): `agent/planner.go`
- [Agent tools](https://github.com/jiwoochris/artex-ko/blob/main/agent/tools.go): `agent/tools.go`
- [LLM providers](https://github.com/jiwoochris/artex-ko/blob/main/llmpool/pool.go): `llmpool/pool.go`

### Exploration data

- [PostgreSQL data](https://github.com/jiwoochris/artex-ko/blob/main/db/db.go): `db/db.go`
- [Traffic capture](https://github.com/jiwoochris/artex-ko/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Finding evidence](https://github.com/jiwoochris/artex-ko/blob/main/evidence/store.go): `evidence/store.go`
- [LLM records](https://github.com/jiwoochris/artex-ko/blob/main/llmrec/llmrec.go): `llmrec/llmrec.go`

### Review and reporting

- [Command review](https://github.com/jiwoochris/artex-ko/blob/main/intercept/intercept.go): `intercept/intercept.go`
- [Execution guard](https://github.com/jiwoochris/artex-ko/blob/main/guard/guard.go): `guard/guard.go`
- [Asset enrichment](https://github.com/jiwoochris/artex-ko/blob/main/enrich/enrich.go): `enrich/enrich.go`
- [Finding reports](https://github.com/jiwoochris/artex-ko/blob/main/report/report.go): `report/report.go`

### User interface

- [Web application](https://github.com/jiwoochris/artex-ko/blob/main/web/src/app/(main)/dashboard/page.tsx): `web/src/app/(main)/dashboard/page.tsx`
- [Finding review](https://github.com/jiwoochris/artex-ko/blob/main/web/src/app/(main)/function/findings/page.tsx): `web/src/app/(main)/function/findings/page.tsx`
- [Traffic review](https://github.com/jiwoochris/artex-ko/blob/main/web/src/app/(main)/function/traffic/page.tsx): `web/src/app/(main)/function/traffic/page.tsx`

### Other components

- **Operator**

## Connections

- Operator → Web application: uses (evidence: `README.md`)
- Web application → HTTP API: requests data (evidence: `README.md`)
- Backend startup → Task manager: creates (evidence: `cmd/artex/main.go`)
- Backend startup → HTTP API: serves (evidence: `cmd/artex/main.go`)
- Task manager → PostgreSQL data: opens (evidence: `server/manager.go`)
- Task manager → Traffic capture: starts proxy (evidence: `server/manager.go`)
- HTTP API → Task engine: routes tasks (evidence: `server/server.go`)
- Task engine → Task manager: reads tasks (evidence: `server/engine.go`)
- Task engine → Worker agent: runs intents (evidence: `server/engine.go`)
- Task engine → Planner agent: runs planner
- Worker agent → Agent tools: invokes tools (evidence: `agent/worker.go`)
- Worker agent → Execution guard: gates calls (evidence: `agent/worker.go`)
- Task engine → Command review: coordinates review
- Worker agent → PostgreSQL data: records discoveries (evidence: `agent/worker.go`)
- Agent tools → Traffic capture: reads exchanges (evidence: `traffic/traffic.go`)
- Task manager → Asset enrichment: configures agents (evidence: `server/manager.go`)
- Task manager → LLM providers: configures providers
- LLM providers → LLM records: records calls
- LLM records → PostgreSQL data: stores usage (evidence: `llmrec/llmrec.go`)
- Finding evidence → Traffic capture: snapshots exchanges (evidence: `evidence/store.go`)
- HTTP API → Finding reports: serves reports
- HTTP API → Finding review: provides findings (evidence: `README.md`)
- HTTP API → Traffic review: provides traffic (evidence: `README.md`)
- Web application → Finding review: navigates to
