# sresarehumantoo/artex-cc architecture

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

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

## Overview

ARTEX-CC is an autonomous penetration-testing platform that provides MCP tools and a live web UI while leaving test planning and tool choice to Claude Code. The documented workflow starts with an engagement goal, records assets and exploration intent, captures and inspects traffic, logs coverage and findings, proves goals, and generates a report. The graph includes those domain stages and the recording proxy. Source excerpts are partial; edges rely on explicit README statements or shown wiring, and unsampled internals are represented only where the tree and README support them.

Main entry points: [`web/src/pages`](https://github.com/sresarehumantoo/artex-cc/tree/main/web/src/pages) (Engagement views), [`tools`](https://github.com/sresarehumantoo/artex-cc/tree/main/tools) (Pentest tools), [`cmd/artex-cc/main.go`](https://github.com/sresarehumantoo/artex-cc/blob/main/cmd/artex-cc/main.go) (CLI server), [`traffic/traffic.go`](https://github.com/sresarehumantoo/artex-cc/blob/main/traffic/traffic.go) (Recording proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and interfaces"]
  node_cli["CLI server<br/>[main.go]"]
  node_mcp["MCP server<br/>[server.go]"]
  node_toolset["Pentest tools"]
  node_restapi["REST API"]
end

subgraph group_engagement["Engagement workflow"]
  node_engagement[("Engagement state<br/>[store.go]")]
  node_assets["Asset graph<br/>[assets.go]"]
  node_exploration["Exploration tracking"]
  node_coverage["Coverage tracking<br/>[coverage.go]"]
  node_findings["Finding management<br/>[findings.go]"]
  node_ingest["Scan ingestion"]
  node_report["Report generation"]
end

subgraph group_traffic["Traffic and integrations"]
  node_proxy["Recording proxy<br/>[traffic.go]"]
  node_egress["Egress governor<br/>[egress.go]"]
end

subgraph group_persistence["Persistence and reporting"]
  node_evidence[("Evidence store<br/>[evidence.go]")]
end

subgraph group_webui["Web interface"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_webpages["Engagement views"]
  node_webapi["Web API client<br/>[api.ts]"]
  node_webcomponents["Shared UI components"]
  node_webprefs["UI preferences<br/>[preferences.ts]"]
  node_webexport["Export helpers<br/>[export.ts]"]
end

node_claude(("Claude Code"))
node_operator(("Pentest operator"))
node_target(("Authorized target"))
node_postgres[("PostgreSQL")]

node_operator -->|"directs testing"| node_claude
node_claude -->|"calls tools"| node_mcp
node_cli -->|"serves MCP"| node_mcp
node_mcp -->|"dispatches calls"| node_toolset
node_cli -->|"registers tools"| node_toolset
node_operator -->|"starts server"| node_cli
node_toolset -->|"records state"| node_engagement
node_toolset -->|"inserts assets"| node_assets
node_toolset -->|"tracks intent"| node_exploration
node_toolset -->|"records coverage"| node_coverage
node_toolset -->|"records findings"| node_findings
node_toolset -->|"imports scans"| node_ingest
node_toolset -->|"inspects traffic"| node_proxy
node_toolset -->|"generates report"| node_report
node_findings -.->|"binds evidence"| node_evidence
node_target -->|"sends HTTP"| node_proxy
node_proxy -->|"forwards traffic"| node_target
node_proxy -.->|"governs egress"| node_egress
node_engagement -->|"persists state"| node_postgres
node_cli -->|"routes API"| node_restapi
node_operator -->|"views engagement"| node_webapp
node_cli -->|"serves UI"| node_webapp
node_webapp -->|"routes pages"| node_webpages
node_webpages -->|"requests data"| node_webapi
node_webpages -->|"renders views"| node_webcomponents
node_webpages -->|"exports data"| node_webexport
node_webapp -->|"loads preferences"| node_webprefs
node_webapi -.->|"calls endpoints"| node_restapi
node_webpages -->|"shows assets"| node_assets
node_webpages -->|"shows graph"| node_exploration
node_webpages -->|"shows findings"| node_findings
node_webpages -->|"shows coverage"| node_coverage
node_webpages -->|"shows traffic"| node_proxy
node_webpages -->|"shows report"| node_report

click node_cli "https://github.com/sresarehumantoo/artex-cc/blob/main/cmd/artex-cc/main.go"
click node_mcp "https://github.com/sresarehumantoo/artex-cc/blob/main/mcpserver/server.go"
click node_toolset "https://github.com/sresarehumantoo/artex-cc/tree/main/tools"
click node_restapi "https://github.com/sresarehumantoo/artex-cc/tree/main/api"
click node_engagement "https://github.com/sresarehumantoo/artex-cc/blob/main/store/store.go"
click node_assets "https://github.com/sresarehumantoo/artex-cc/blob/main/store/assets.go"
click node_exploration "https://github.com/sresarehumantoo/artex-cc/blob/main/tools/exploration_tools.go"
click node_coverage "https://github.com/sresarehumantoo/artex-cc/blob/main/store/coverage.go"
click node_findings "https://github.com/sresarehumantoo/artex-cc/blob/main/store/findings.go"
click node_ingest "https://github.com/sresarehumantoo/artex-cc/tree/main/ingest"
click node_report "https://github.com/sresarehumantoo/artex-cc/tree/main/report"
click node_proxy "https://github.com/sresarehumantoo/artex-cc/blob/main/traffic/traffic.go"
click node_egress "https://github.com/sresarehumantoo/artex-cc/blob/main/egress/egress.go"
click node_evidence "https://github.com/sresarehumantoo/artex-cc/blob/main/evidence/evidence.go"
click node_webapp "https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/App.tsx"
click node_webpages "https://github.com/sresarehumantoo/artex-cc/tree/main/web/src/pages"
click node_webapi "https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/lib/api.ts"
click node_webcomponents "https://github.com/sresarehumantoo/artex-cc/tree/main/web/src/components"
click node_webprefs "https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/stores/preferences.ts"
click node_webexport "https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/lib/export.ts"

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_cli,node_mcp,node_toolset,node_restapi toneBlue
class node_engagement,node_assets,node_exploration,node_coverage,node_findings,node_ingest,node_report,node_postgres toneAmber
class node_proxy,node_egress toneMint
class node_evidence toneRose
class node_webapp,node_webpages,node_webapi,node_webcomponents,node_webprefs,node_webexport,node_claude,node_operator,node_target toneIndigo
```

## Components

### Entry and interfaces

- [CLI server](https://github.com/sresarehumantoo/artex-cc/blob/main/cmd/artex-cc/main.go): `cmd/artex-cc/main.go`
- [MCP server](https://github.com/sresarehumantoo/artex-cc/blob/main/mcpserver/server.go): `mcpserver/server.go`
- [Pentest tools](https://github.com/sresarehumantoo/artex-cc/tree/main/tools): `tools`
- [REST API](https://github.com/sresarehumantoo/artex-cc/tree/main/api): `api`

### Engagement workflow

- [Engagement state](https://github.com/sresarehumantoo/artex-cc/blob/main/store/store.go): `store/store.go`
- [Asset graph](https://github.com/sresarehumantoo/artex-cc/blob/main/store/assets.go): `store/assets.go`
- [Exploration tracking](https://github.com/sresarehumantoo/artex-cc/blob/main/tools/exploration_tools.go): `tools/exploration_tools.go`
- [Coverage tracking](https://github.com/sresarehumantoo/artex-cc/blob/main/store/coverage.go): `store/coverage.go`
- [Finding management](https://github.com/sresarehumantoo/artex-cc/blob/main/store/findings.go): `store/findings.go`
- [Scan ingestion](https://github.com/sresarehumantoo/artex-cc/tree/main/ingest): `ingest`
- [Report generation](https://github.com/sresarehumantoo/artex-cc/tree/main/report): `report`

### Traffic and integrations

- [Recording proxy](https://github.com/sresarehumantoo/artex-cc/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Egress governor](https://github.com/sresarehumantoo/artex-cc/blob/main/egress/egress.go): `egress/egress.go`

### Persistence and reporting

- [Evidence store](https://github.com/sresarehumantoo/artex-cc/blob/main/evidence/evidence.go): `evidence/evidence.go`

### Web interface

- [Web application](https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Engagement views](https://github.com/sresarehumantoo/artex-cc/tree/main/web/src/pages): `web/src/pages`
- [Web API client](https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/lib/api.ts): `web/src/lib/api.ts`
- [Shared UI components](https://github.com/sresarehumantoo/artex-cc/tree/main/web/src/components): `web/src/components`
- [UI preferences](https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/stores/preferences.ts): `web/src/stores/preferences.ts`
- [Export helpers](https://github.com/sresarehumantoo/artex-cc/blob/main/web/src/lib/export.ts): `web/src/lib/export.ts`

### Other components

- **Claude Code**
- **Pentest operator**
- **Authorized target**
- **PostgreSQL**

## Connections

- Pentest operator → Claude Code: directs testing (evidence: `README.md`)
- Claude Code → MCP server: calls tools (evidence: `README.md`)
- CLI server → MCP server: serves MCP (evidence: `cmd/artex-cc/main.go`)
- MCP server → Pentest tools: dispatches calls (evidence: `mcpserver/server.go`)
- CLI server → Pentest tools: registers tools (evidence: `cmd/artex-cc/main.go`)
- Pentest operator → CLI server: starts server (evidence: `README.md`)
- Pentest tools → Engagement state: records state (evidence: `README.md`)
- Pentest tools → Asset graph: inserts assets (evidence: `README.md`)
- Pentest tools → Exploration tracking: tracks intent (evidence: `README.md`)
- Pentest tools → Coverage tracking: records coverage (evidence: `README.md`)
- Pentest tools → Finding management: records findings (evidence: `README.md`)
- Pentest tools → Scan ingestion: imports scans (evidence: `tools/ingest_tools.go`)
- Pentest tools → Recording proxy: inspects traffic (evidence: `README.md`)
- Pentest tools → Report generation: generates report (evidence: `README.md`)
- Finding management → Evidence store: binds evidence
- Authorized target → Recording proxy: sends HTTP (evidence: `README.md`)
- Recording proxy → Authorized target: forwards traffic (evidence: `README.md`)
- Recording proxy → Egress governor: governs egress
- Engagement state → PostgreSQL: persists state (evidence: `README.md`)
- CLI server → REST API: routes API (evidence: `cmd/artex-cc/main.go`)
- Pentest operator → Web application: views engagement (evidence: `README.md`)
- CLI server → Web application: serves UI (evidence: `cmd/artex-cc/main.go`)
- Web application → Engagement views: routes pages (evidence: `web/src/App.tsx`)
- Engagement views → Web API client: requests data (evidence: `web/src/pages/Activity.tsx`)
- Engagement views → Shared UI components: renders views (evidence: `web/src/pages/Activity.tsx`)
- Engagement views → Export helpers: exports data (evidence: `web/src/pages/Activity.tsx`)
- Web application → UI preferences: loads preferences (evidence: `web/src/App.tsx`)
- Web API client → REST API: calls endpoints
- Engagement views → Asset graph: shows assets (evidence: `README.md`)
- Engagement views → Exploration tracking: shows graph (evidence: `README.md`)
- Engagement views → Finding management: shows findings (evidence: `README.md`)
- Engagement views → Coverage tracking: shows coverage (evidence: `README.md`)
- Engagement views → Recording proxy: shows traffic (evidence: `README.md`)
- Engagement views → Report generation: shows report (evidence: `README.md`)
