# 0xdun0/rovex architecture

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

- Interactive diagram: https://gitdiagram.com/0xdun0/rovex
- Repository: https://github.com/0xdun0/rovex

## Overview

Rovex is a local-first pentest reporting and vulnerability-management platform. The main user journey is to create a pentest or writeup project, edit its sectional Markdown report, manage findings and CVSS severity, then publish or export the report. The app also provides project, evidence, client, theme, and documentation areas, plus an MCP endpoint for agent-driven report authoring. The graph uses README capability descriptions and the sampled routes and handlers; several UI-to-service connections are not shown because their call sites were not sampled.

Main entry points: [`src/app/report/9a4f2c1b8e7d3a6e/[id]/page.tsx`](https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/%5Bid%5D/page.tsx) (Project report), [`src/app/api/mcp/route.ts`](https://github.com/0xdun0/rovex/blob/main/src/app/api/mcp/route.ts) (MCP HTTP endpoint), [`src/app/report/page.tsx`](https://github.com/0xdun0/rovex/blob/main/src/app/report/page.tsx) (Workspace dashboard), [`src/app/report/9a4f2c1b8e7d3a6e/page.tsx`](https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/page.tsx) (Project management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Reporting workspace"]
  node_dashboard["Workspace dashboard<br/>[page.tsx]"]
  node_projects["Project management<br/>[page.tsx]"]
  node_themes["Theme studio"]
  node_documentation["Documentation hub<br/>[page.tsx]"]
end

subgraph group_authoring["Report authoring"]
  node_project["Project report<br/>[page.tsx]"]
  node_editor["Markdown editor"]
  node_preview["Report preview"]
  node_findings["Finding management<br/>[page.tsx]"]
  node_cvss["CVSS engine<br/>[cvss.ts]"]
  node_export["Report exporters<br/>[report-docx.ts]"]
end

subgraph group_runtime["Local services"]
  node_statecontext["App data context<br/>[data-context.tsx]"]
  node_stateapi["State API<br/>[route.ts]"]
  node_statefile["State file access<br/>[state-file.ts]"]
  node_localstate[("Local state")]
  node_userapi["User preferences API<br/>[route.ts]"]
  node_variablesapi["Variables API<br/>[route.ts]"]
end

subgraph group_integrations["AI and extensions"]
  node_mcproute["MCP HTTP endpoint<br/>[route.ts]"]
  node_toolhandlers["MCP tool handlers<br/>[handlers.ts]"]
  node_skills["MCP playbooks<br/>[skills.ts]"]
  node_linkpreview["Link preview API<br/>[route.ts]"]
end

node_operator(("Pentest operator"))
node_mcpclient(("MCP client"))
node_externalweb(("Public websites"))

node_operator -->|"opens workspace"| node_dashboard
node_dashboard -->|"opens projects"| node_projects
node_projects -->|"opens report"| node_project
node_project -->|"edits sections"| node_editor
node_editor -->|"renders Markdown"| node_preview
node_project -->|"manages findings"| node_findings
node_findings -->|"calculates severity"| node_cvss
node_project -->|"exports report"| node_export
node_statecontext -->|"requests state"| node_stateapi
node_stateapi -->|"reads or writes"| node_localstate
node_userapi -->|"persists user data"| node_localstate
node_variablesapi -->|"persists variables"| node_localstate
node_mcpclient -->|"sends JSON-RPC"| node_mcproute
node_mcproute -->|"dispatches tools"| node_toolhandlers
node_mcproute -->|"serves prompts"| node_skills
node_toolhandlers -->|"reads or writes"| node_statefile
node_statefile -->|"reads or writes"| node_localstate
node_operator -->|"customizes appearance"| node_themes
node_operator -->|"reads guidance"| node_documentation
node_operator -->|"requests preview"| node_linkpreview
node_linkpreview -.->|"fetches metadata"| node_externalweb

click node_dashboard "https://github.com/0xdun0/rovex/blob/main/src/app/report/page.tsx"
click node_projects "https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/page.tsx"
click node_project "https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/%5Bid%5D/page.tsx"
click node_editor "https://github.com/0xdun0/rovex/blob/main/src/components/section-markdown-editor.tsx"
click node_preview "https://github.com/0xdun0/rovex/blob/main/src/components/markdown-preview.tsx"
click node_findings "https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/%5Bid%5D/findings/%5BfindingId%5D/page.tsx"
click node_cvss "https://github.com/0xdun0/rovex/blob/main/src/lib/cvss.ts"
click node_export "https://github.com/0xdun0/rovex/blob/main/src/lib/report-docx.ts"
click node_statecontext "https://github.com/0xdun0/rovex/blob/main/src/context/data-context.tsx"
click node_stateapi "https://github.com/0xdun0/rovex/blob/main/src/app/api/state/route.ts"
click node_statefile "https://github.com/0xdun0/rovex/blob/main/src/lib/server/state-file.ts"
click node_userapi "https://github.com/0xdun0/rovex/blob/main/src/app/api/user/route.ts"
click node_variablesapi "https://github.com/0xdun0/rovex/blob/main/src/app/api/variables/route.ts"
click node_mcproute "https://github.com/0xdun0/rovex/blob/main/src/app/api/mcp/route.ts"
click node_toolhandlers "https://github.com/0xdun0/rovex/blob/main/src/lib/mcp/handlers.ts"
click node_skills "https://github.com/0xdun0/rovex/blob/main/src/lib/mcp/skills.ts"
click node_themes "https://github.com/0xdun0/rovex/blob/main/src/components/theme-studio/theme-config-dialog.tsx"
click node_documentation "https://github.com/0xdun0/rovex/blob/main/src/app/report/e3b8a1c9f4d27e5a/page.tsx"
click node_linkpreview "https://github.com/0xdun0/rovex/blob/main/src/app/api/link-preview/route.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_dashboard,node_projects,node_themes,node_documentation,node_mcpclient toneBlue
class node_project,node_editor,node_preview,node_findings,node_cvss,node_export toneAmber
class node_statecontext,node_stateapi,node_statefile,node_localstate,node_userapi,node_variablesapi toneMint
class node_mcproute,node_toolhandlers,node_skills,node_linkpreview toneRose
class node_operator,node_externalweb toneIndigo
```

## Components

### Reporting workspace

- [Workspace dashboard](https://github.com/0xdun0/rovex/blob/main/src/app/report/page.tsx): `src/app/report/page.tsx`
- [Project management](https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/page.tsx): `src/app/report/9a4f2c1b8e7d3a6e/page.tsx`
- [Theme studio](https://github.com/0xdun0/rovex/blob/main/src/components/theme-studio/theme-config-dialog.tsx): `src/components/theme-studio/theme-config-dialog.tsx`
- [Documentation hub](https://github.com/0xdun0/rovex/blob/main/src/app/report/e3b8a1c9f4d27e5a/page.tsx): `src/app/report/e3b8a1c9f4d27e5a/page.tsx`

### Report authoring

- [Project report](https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/%5Bid%5D/page.tsx): `src/app/report/9a4f2c1b8e7d3a6e/[id]/page.tsx`
- [Markdown editor](https://github.com/0xdun0/rovex/blob/main/src/components/section-markdown-editor.tsx): `src/components/section-markdown-editor.tsx`
- [Report preview](https://github.com/0xdun0/rovex/blob/main/src/components/markdown-preview.tsx): `src/components/markdown-preview.tsx`
- [Finding management](https://github.com/0xdun0/rovex/blob/main/src/app/report/9a4f2c1b8e7d3a6e/%5Bid%5D/findings/%5BfindingId%5D/page.tsx): `src/app/report/9a4f2c1b8e7d3a6e/[id]/findings/[findingId]/page.tsx`
- [CVSS engine](https://github.com/0xdun0/rovex/blob/main/src/lib/cvss.ts): `src/lib/cvss.ts`
- [Report exporters](https://github.com/0xdun0/rovex/blob/main/src/lib/report-docx.ts): `src/lib/report-docx.ts`

### Local services

- [App data context](https://github.com/0xdun0/rovex/blob/main/src/context/data-context.tsx): `src/context/data-context.tsx`
- [State API](https://github.com/0xdun0/rovex/blob/main/src/app/api/state/route.ts): `src/app/api/state/route.ts`
- [State file access](https://github.com/0xdun0/rovex/blob/main/src/lib/server/state-file.ts): `src/lib/server/state-file.ts`
- **Local state**
- [User preferences API](https://github.com/0xdun0/rovex/blob/main/src/app/api/user/route.ts): `src/app/api/user/route.ts`
- [Variables API](https://github.com/0xdun0/rovex/blob/main/src/app/api/variables/route.ts): `src/app/api/variables/route.ts`

### AI and extensions

- [MCP HTTP endpoint](https://github.com/0xdun0/rovex/blob/main/src/app/api/mcp/route.ts): `src/app/api/mcp/route.ts`
- [MCP tool handlers](https://github.com/0xdun0/rovex/blob/main/src/lib/mcp/handlers.ts): `src/lib/mcp/handlers.ts`
- [MCP playbooks](https://github.com/0xdun0/rovex/blob/main/src/lib/mcp/skills.ts): `src/lib/mcp/skills.ts`
- [Link preview API](https://github.com/0xdun0/rovex/blob/main/src/app/api/link-preview/route.ts): `src/app/api/link-preview/route.ts`

### Other components

- **Pentest operator**
- **MCP client**
- **Public websites**

## Connections

- Pentest operator → Workspace dashboard: opens workspace
- Workspace dashboard → Project management: opens projects
- Project management → Project report: opens report
- Project report → Markdown editor: edits sections
- Markdown editor → Report preview: renders Markdown
- Project report → Finding management: manages findings
- Finding management → CVSS engine: calculates severity
- Project report → Report exporters: exports report
- App data context → State API: requests state
- State API → Local state: reads or writes
- User preferences API → Local state: persists user data
- Variables API → Local state: persists variables
- MCP client → MCP HTTP endpoint: sends JSON-RPC
- MCP HTTP endpoint → MCP tool handlers: dispatches tools
- MCP HTTP endpoint → MCP playbooks: serves prompts
- MCP tool handlers → State file access: reads or writes
- State file access → Local state: reads or writes
- Pentest operator → Theme studio: customizes appearance
- Pentest operator → Documentation hub: reads guidance
- Pentest operator → Link preview API: requests preview
- Link preview API → Public websites: fetches metadata
