# hongvincent/artex architecture

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

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

## Overview

ARTEX is an AI-assisted autonomous penetration-testing system with a Go backend and Next.js interface. A user configures a task and scope, then the server’s event-driven engine coordinates planning and worker execution; resulting exploration state, assets, findings, and captured traffic are available for review. The README also documents asset synchronization, human approval, notifications, and LLM configuration. Backend links are based on the supplied source index and excerpts; some capability links are documented in the README, while unsampled implementation details are not inferred.

Main entry points: [`server/server.go`](https://github.com/hongvincent/artex/blob/english-ui/server/server.go) (HTTP API), [`agent/worker.go`](https://github.com/hongvincent/artex/blob/english-ui/agent/worker.go) (Agent worker), [`server/manager.go`](https://github.com/hongvincent/artex/blob/english-ui/server/manager.go) (Task manager), [`db`](https://github.com/hongvincent/artex/tree/english-ui/db) (Task and asset data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Task orchestration"]
  node_runtime["Application startup<br/>[main.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_engine["Execution engine<br/>[engine.go]"]
end

subgraph group_testing["Penetration testing"]
  node_planner["Task planner<br/>[planner.go]"]
  node_worker["Agent worker<br/>[worker.go]"]
  node_tools["Agent tools<br/>[tools.go]"]
  node_guard["Action guard<br/>[guard.go]"]
  node_intercept["Approval intercept<br/>[intercept.go]"]
end

subgraph group_records["Evidence and records"]
  node_db[("Task and asset data")]
  node_traffic[("Traffic capture<br/>[traffic.go]")]
  node_evidence[("Finding evidence<br/>[store.go]")]
  node_llmrec["LLM call records<br/>[llmrec.go]"]
  node_report["Finding reports<br/>[findings.go]"]
end

subgraph group_product["User interface and integrations"]
  node_frontend["Web interface<br/>[page.tsx]"]
  node_api["HTTP API<br/>[server.go]"]
  node_scope["ScopeSentry"]
  node_notifications["Notification channels<br/>[notify.go]"]
end

node_user(("User"))

node_user -->|"configures tasks"| node_frontend
node_frontend -->|"uses API"| node_api
node_runtime -->|"creates"| node_manager
node_runtime -->|"serves"| node_api
node_api -->|"controls tasks"| node_engine
node_api -->|"resolves tasks"| node_manager
node_engine -->|"runs planning"| node_planner
node_engine -->|"runs work"| node_worker
node_worker -->|"invokes tools"| node_tools
node_worker -->|"records results"| node_db
node_worker -->|"gates actions"| node_intercept
node_guard -->|"checks approvals"| node_intercept
node_manager -->|"starts proxy"| node_traffic
node_traffic -->|"indexes exchanges"| node_db
node_evidence -->|"preserves snapshots"| node_traffic
node_evidence -->|"stores bindings"| node_db
node_llmrec -->|"records usage"| node_db
node_api -->|"serves findings"| node_report
node_frontend -.->|"syncs assets"| node_scope
node_manager -->|"configures checks"| node_guard
node_api -.->|"manages delivery"| node_notifications

click node_frontend "https://github.com/hongvincent/artex/blob/english-ui/web/src/app/(main)/dashboard/page.tsx"
click node_api "https://github.com/hongvincent/artex/blob/english-ui/server/server.go"
click node_runtime "https://github.com/hongvincent/artex/blob/english-ui/cmd/artex/main.go"
click node_manager "https://github.com/hongvincent/artex/blob/english-ui/server/manager.go"
click node_engine "https://github.com/hongvincent/artex/blob/english-ui/server/engine.go"
click node_planner "https://github.com/hongvincent/artex/blob/english-ui/agent/planner.go"
click node_worker "https://github.com/hongvincent/artex/blob/english-ui/agent/worker.go"
click node_tools "https://github.com/hongvincent/artex/blob/english-ui/agent/tools.go"
click node_guard "https://github.com/hongvincent/artex/blob/english-ui/guard/guard.go"
click node_intercept "https://github.com/hongvincent/artex/blob/english-ui/intercept/intercept.go"
click node_db "https://github.com/hongvincent/artex/tree/english-ui/db"
click node_traffic "https://github.com/hongvincent/artex/blob/english-ui/traffic/traffic.go"
click node_evidence "https://github.com/hongvincent/artex/blob/english-ui/evidence/store.go"
click node_llmrec "https://github.com/hongvincent/artex/blob/english-ui/llmrec/llmrec.go"
click node_report "https://github.com/hongvincent/artex/blob/english-ui/report/findings.go"
click node_notifications "https://github.com/hongvincent/artex/blob/english-ui/notify/notify.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_runtime,node_manager,node_engine,node_user toneBlue
class node_planner,node_worker,node_tools,node_guard,node_intercept toneAmber
class node_db,node_traffic,node_evidence,node_llmrec,node_report toneMint
class node_frontend,node_api,node_scope,node_notifications toneRose
```

## Components

### Task orchestration

- [Application startup](https://github.com/hongvincent/artex/blob/english-ui/cmd/artex/main.go): `cmd/artex/main.go`
- [Task manager](https://github.com/hongvincent/artex/blob/english-ui/server/manager.go): `server/manager.go`
- [Execution engine](https://github.com/hongvincent/artex/blob/english-ui/server/engine.go): `server/engine.go`

### Penetration testing

- [Task planner](https://github.com/hongvincent/artex/blob/english-ui/agent/planner.go): `agent/planner.go`
- [Agent worker](https://github.com/hongvincent/artex/blob/english-ui/agent/worker.go): `agent/worker.go`
- [Agent tools](https://github.com/hongvincent/artex/blob/english-ui/agent/tools.go): `agent/tools.go`
- [Action guard](https://github.com/hongvincent/artex/blob/english-ui/guard/guard.go): `guard/guard.go`
- [Approval intercept](https://github.com/hongvincent/artex/blob/english-ui/intercept/intercept.go): `intercept/intercept.go`

### Evidence and records

- [Task and asset data](https://github.com/hongvincent/artex/tree/english-ui/db): `db`
- [Traffic capture](https://github.com/hongvincent/artex/blob/english-ui/traffic/traffic.go): `traffic/traffic.go`
- [Finding evidence](https://github.com/hongvincent/artex/blob/english-ui/evidence/store.go): `evidence/store.go`
- [LLM call records](https://github.com/hongvincent/artex/blob/english-ui/llmrec/llmrec.go): `llmrec/llmrec.go`
- [Finding reports](https://github.com/hongvincent/artex/blob/english-ui/report/findings.go): `report/findings.go`

### User interface and integrations

- [Web interface](https://github.com/hongvincent/artex/blob/english-ui/web/src/app/(main)/dashboard/page.tsx): `web/src/app/(main)/dashboard/page.tsx`
- [HTTP API](https://github.com/hongvincent/artex/blob/english-ui/server/server.go): `server/server.go`
- **ScopeSentry**
- [Notification channels](https://github.com/hongvincent/artex/blob/english-ui/notify/notify.go): `notify/notify.go`

### Other components

- **User**

## Connections

- User → Web interface: configures tasks
- Web interface → HTTP API: uses API
- Application startup → Task manager: creates (evidence: `cmd/artex/main.go`)
- Application startup → HTTP API: serves (evidence: `cmd/artex/main.go`)
- HTTP API → Execution engine: controls tasks (evidence: `server/server.go`)
- HTTP API → Task manager: resolves tasks (evidence: `server/server.go`)
- Execution engine → Task planner: runs planning
- Execution engine → Agent worker: runs work (evidence: `server/engine.go`)
- Agent worker → Agent tools: invokes tools (evidence: `agent/worker.go`)
- Agent worker → Task and asset data: records results (evidence: `agent/worker.go`)
- Agent worker → Approval intercept: gates actions (evidence: `agent/worker.go`)
- Action guard → Approval intercept: checks approvals (evidence: `guard/guard.go`)
- Task manager → Traffic capture: starts proxy (evidence: `server/manager.go`)
- Traffic capture → Task and asset data: indexes exchanges (evidence: `traffic/traffic.go`)
- Finding evidence → Traffic capture: preserves snapshots (evidence: `evidence/store.go`)
- Finding evidence → Task and asset data: stores bindings (evidence: `evidence/store.go`)
- LLM call records → Task and asset data: records usage (evidence: `llmrec/llmrec.go`)
- HTTP API → Finding reports: serves findings (evidence: `server/server.go`)
- Web interface → ScopeSentry: syncs assets
- Task manager → Action guard: configures checks (evidence: `server/manager.go`)
- HTTP API → Notification channels: manages delivery
