# muxuejc/artex_ruoji6 architecture

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

- Interactive diagram: https://gitdiagram.com/muxuejc/artex_ruoji6
- Repository: https://github.com/muxuejc/artex_ruoji6

## Overview

ARTEX is an AI-assisted autonomous penetration-testing system: users configure targets and goals, run and monitor exploration tasks, review assets and findings, and steer work through chat or approvals. The backend combines task orchestration, agent execution, interception controls, recorded traffic, and persistent data; the Next.js UI exposes those workflows and operational settings. The README documents additional integrations such as ScopeSentry synchronization, MCP, notifications, and online updates. Some backend wiring is unsampled, so the graph omits uncertain call relationships.

Main entry points: [`server/server.go`](https://github.com/muxuejc/artex_ruoji6/blob/main/server/server.go) (HTTP API), [`web/src/app/(main)/layout.tsx`](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/layout.tsx) (Web interface), [`server/engine.go`](https://github.com/muxuejc/artex_ruoji6/blob/main/server/engine.go) (Task engine), [`server/manager.go`](https://github.com/muxuejc/artex_ruoji6/blob/main/server/manager.go) (Task manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Backend runtime"]
  node_entry["Process entry<br/>[main.go]"]
  node_api["HTTP API<br/>[server.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_store[("Application data")]
end

subgraph group_exploration["Exploration workflow"]
  node_engine["Task engine<br/>[engine.go]"]
  node_worker["Agent worker<br/>[worker.go]"]
  node_planner["Goal planner<br/>[planner.go]"]
end

subgraph group_evidence["Evidence and review"]
  node_asset["Asset enrichment<br/>[enrich.go]"]
  node_traffic[("Traffic recorder<br/>[traffic.go]")]
  node_evidence_store[("Evidence store<br/>[store.go]")]
  node_findings["Finding reports<br/>[findings.go]"]
end

subgraph group_integrations["Integrations"]
  node_intercept["Command approvals<br/>[intercept.go]"]
  node_llm_record[("LLM records<br/>[llmrec.go]")]
  node_mcp["MCP services<br/>[mcp_server.go]"]
  node_notify["Notifications<br/>[notify.go]"]
end

subgraph group_frontend["Web interface"]
  node_web["Web interface<br/>[layout.tsx]"]
  node_tasks_ui["Task workspace<br/>[page.tsx]"]
  node_chat_ui["Chat controls<br/>[page.tsx]"]
  node_findings_ui["Findings review<br/>[page.tsx]"]
  node_traffic_ui["Traffic review<br/>[page.tsx]"]
  node_settings_ui["System settings<br/>[page.tsx]"]
  node_schedules_ui["Schedules<br/>[page.tsx]"]
  node_skills_ui["Skills manager<br/>[page.tsx]"]
end

node_user(("Operator"))

node_user -.->|"uses"| node_web
node_entry -->|"creates manager"| node_manager
node_manager -->|"starts recorder"| node_traffic
node_web -.->|"opens tasks"| node_tasks_ui
node_web -.->|"opens chat"| node_chat_ui
node_web -.->|"opens findings"| node_findings_ui
node_web -.->|"opens traffic"| node_traffic_ui
node_web -.->|"opens settings"| node_settings_ui
node_web -.->|"opens schedules"| node_schedules_ui
node_web -.->|"opens skills"| node_skills_ui
node_tasks_ui -.->|"requests tasks"| node_api
node_chat_ui -.->|"sends messages"| node_api
node_findings_ui -.->|"requests findings"| node_api
node_traffic_ui -.->|"requests traffic"| node_api
node_settings_ui -.->|"updates settings"| node_api
node_schedules_ui -.->|"manages schedules"| node_api
node_skills_ui -.->|"manages skills"| node_api
node_api -.->|"dispatches work"| node_engine
node_engine -->|"reads task state"| node_manager
node_engine -.->|"runs planning"| node_planner
node_engine -->|"runs worker"| node_worker
node_worker -.->|"reads and writes"| node_store
node_engine -.->|"gates tool calls"| node_intercept
node_manager -.->|"persists state"| node_store
node_manager -.->|"enriches assets"| node_asset
node_api -.->|"serves reports"| node_findings
node_api -.->|"serves exchanges"| node_traffic
node_traffic -.->|"supports evidence"| node_evidence_store
node_api -.->|"exposes records"| node_llm_record
node_api -.->|"serves MCP"| node_mcp
node_api -.->|"configures delivery"| node_notify

click node_entry "https://github.com/muxuejc/artex_ruoji6/blob/main/cmd/artex/main.go"
click node_api "https://github.com/muxuejc/artex_ruoji6/blob/main/server/server.go"
click node_manager "https://github.com/muxuejc/artex_ruoji6/blob/main/server/manager.go"
click node_engine "https://github.com/muxuejc/artex_ruoji6/blob/main/server/engine.go"
click node_worker "https://github.com/muxuejc/artex_ruoji6/blob/main/agent/worker.go"
click node_planner "https://github.com/muxuejc/artex_ruoji6/blob/main/agent/planner.go"
click node_store "https://github.com/muxuejc/artex_ruoji6/tree/main/db"
click node_asset "https://github.com/muxuejc/artex_ruoji6/blob/main/enrich/enrich.go"
click node_traffic "https://github.com/muxuejc/artex_ruoji6/blob/main/traffic/traffic.go"
click node_evidence_store "https://github.com/muxuejc/artex_ruoji6/blob/main/evidence/store.go"
click node_findings "https://github.com/muxuejc/artex_ruoji6/blob/main/report/findings.go"
click node_intercept "https://github.com/muxuejc/artex_ruoji6/blob/main/intercept/intercept.go"
click node_llm_record "https://github.com/muxuejc/artex_ruoji6/blob/main/llmrec/llmrec.go"
click node_mcp "https://github.com/muxuejc/artex_ruoji6/blob/main/server/mcp_server.go"
click node_notify "https://github.com/muxuejc/artex_ruoji6/blob/main/notify/notify.go"
click node_web "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/layout.tsx"
click node_tasks_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/tasks/page.tsx"
click node_chat_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/chat/page.tsx"
click node_findings_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/findings/page.tsx"
click node_traffic_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/traffic/page.tsx"
click node_settings_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/system/settings/page.tsx"
click node_schedules_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/schedules/page.tsx"
click node_skills_ui "https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/system/skills/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_store toneBlue
class node_engine,node_worker,node_planner toneAmber
class node_asset,node_traffic,node_evidence_store,node_findings toneMint
class node_intercept,node_llm_record,node_mcp,node_notify toneRose
class node_web,node_tasks_ui,node_chat_ui,node_findings_ui,node_traffic_ui,node_settings_ui,node_schedules_ui,node_skills_ui,node_user toneIndigo
```

## Components

### Backend runtime

- [Process entry](https://github.com/muxuejc/artex_ruoji6/blob/main/cmd/artex/main.go): `cmd/artex/main.go`
- [HTTP API](https://github.com/muxuejc/artex_ruoji6/blob/main/server/server.go): `server/server.go`
- [Task manager](https://github.com/muxuejc/artex_ruoji6/blob/main/server/manager.go): `server/manager.go`
- [Application data](https://github.com/muxuejc/artex_ruoji6/tree/main/db): `db`

### Exploration workflow

- [Task engine](https://github.com/muxuejc/artex_ruoji6/blob/main/server/engine.go): `server/engine.go`
- [Agent worker](https://github.com/muxuejc/artex_ruoji6/blob/main/agent/worker.go): `agent/worker.go`
- [Goal planner](https://github.com/muxuejc/artex_ruoji6/blob/main/agent/planner.go): `agent/planner.go`

### Evidence and review

- [Asset enrichment](https://github.com/muxuejc/artex_ruoji6/blob/main/enrich/enrich.go): `enrich/enrich.go`
- [Traffic recorder](https://github.com/muxuejc/artex_ruoji6/blob/main/traffic/traffic.go): `traffic/traffic.go`
- [Evidence store](https://github.com/muxuejc/artex_ruoji6/blob/main/evidence/store.go): `evidence/store.go`
- [Finding reports](https://github.com/muxuejc/artex_ruoji6/blob/main/report/findings.go): `report/findings.go`

### Integrations

- [Command approvals](https://github.com/muxuejc/artex_ruoji6/blob/main/intercept/intercept.go): `intercept/intercept.go`
- [LLM records](https://github.com/muxuejc/artex_ruoji6/blob/main/llmrec/llmrec.go): `llmrec/llmrec.go`
- [MCP services](https://github.com/muxuejc/artex_ruoji6/blob/main/server/mcp_server.go): `server/mcp_server.go`
- [Notifications](https://github.com/muxuejc/artex_ruoji6/blob/main/notify/notify.go): `notify/notify.go`

### Web interface

- [Web interface](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/layout.tsx): `web/src/app/(main)/layout.tsx`
- [Task workspace](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/tasks/page.tsx): `web/src/app/(main)/function/tasks/page.tsx`
- [Chat controls](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/chat/page.tsx): `web/src/app/(main)/chat/page.tsx`
- [Findings review](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/findings/page.tsx): `web/src/app/(main)/function/findings/page.tsx`
- [Traffic review](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/traffic/page.tsx): `web/src/app/(main)/function/traffic/page.tsx`
- [System settings](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/system/settings/page.tsx): `web/src/app/(main)/system/settings/page.tsx`
- [Schedules](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/function/schedules/page.tsx): `web/src/app/(main)/function/schedules/page.tsx`
- [Skills manager](https://github.com/muxuejc/artex_ruoji6/blob/main/web/src/app/(main)/system/skills/page.tsx): `web/src/app/(main)/system/skills/page.tsx`

### Other components

- **Operator**

## Connections

- Operator → Web interface: uses (evidence: `README.md`)
- Process entry → Task manager: creates manager (evidence: `cmd/artex/main.go`)
- Task manager → Traffic recorder: starts recorder (evidence: `server/manager.go`)
- Web interface → Task workspace: opens tasks
- Web interface → Chat controls: opens chat
- Web interface → Findings review: opens findings
- Web interface → Traffic review: opens traffic
- Web interface → System settings: opens settings
- Web interface → Schedules: opens schedules
- Web interface → Skills manager: opens skills
- Task workspace → HTTP API: requests tasks
- Chat controls → HTTP API: sends messages
- Findings review → HTTP API: requests findings
- Traffic review → HTTP API: requests traffic
- System settings → HTTP API: updates settings
- Schedules → HTTP API: manages schedules
- Skills manager → HTTP API: manages skills
- HTTP API → Task engine: dispatches work
- Task engine → Task manager: reads task state (evidence: `server/engine.go`)
- Task engine → Goal planner: runs planning
- Task engine → Agent worker: runs worker (evidence: `server/engine.go`)
- Agent worker → Application data: reads and writes (evidence: `agent/worker.go`)
- Task engine → Command approvals: gates tool calls
- Task manager → Application data: persists state (evidence: `server/manager.go`)
- Task manager → Asset enrichment: enriches assets
- HTTP API → Finding reports: serves reports
- HTTP API → Traffic recorder: serves exchanges
- Traffic recorder → Evidence store: supports evidence
- HTTP API → LLM records: exposes records
- HTTP API → MCP services: serves MCP
- HTTP API → Notifications: configures delivery
