# arunava-27/vapt-toolkit architecture

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

- Interactive diagram: https://gitdiagram.com/arunava-27/vapt-toolkit
- Repository: https://github.com/arunava-27/vapt-toolkit

## Overview

VAPT Toolkit is a vulnerability-assessment platform with a React dashboard, REST API, scan execution, persistence, and reporting. The main user workflow is to manage a project and targets, configure and run a scan, monitor results, then review or export a report. Reconnaissance, port discovery, CVE correlation, and web testing are distinct scan stages; the web scanner orchestrator coordinates specialized probes. The graph includes README-documented capabilities whose detailed wiring was not excerpted; those relationships are omitted or marked unverified where appropriate.

Main entry points: [`server/services/scan_service.py`](https://github.com/arunava-27/vapt-toolkit/blob/master/server/services/scan_service.py) (Scan execution), [`server/main.py`](https://github.com/arunava-27/vapt-toolkit/blob/master/server/main.py) (FastAPI app), [`main.py`](https://github.com/arunava-27/vapt-toolkit/blob/master/main.py) (CLI entry point), [`frontend/src/App.jsx`](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/App.jsx) (Dashboard app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard"]
  node_app["Dashboard app<br/>[App.jsx]"]
  node_scanpage["Scan workflow<br/>[ScanPage.jsx]"]
  node_scanstate["Scan state<br/>[ScanContext.jsx]"]
  node_projectpages["Project views<br/>[ProjectsPage.jsx]"]
  node_projectdetail["Project results"]
  node_resultviews["Results dashboard"]
end

subgraph group_api["API and Services"]
  node_server["FastAPI app<br/>[main.py]"]
  node_scanroutes["Scan endpoints<br/>[scan.py]"]
  node_projectroutes["Project endpoints<br/>[projects.py]"]
  node_reportroutes["Report endpoints<br/>[reports.py]"]
  node_bulkroutes["Bulk scan endpoints<br/>[bulk.py]"]
  node_webhookroutes["Webhook endpoints<br/>[webhooks.py]"]
  node_scanservice["Scan execution<br/>[scan_service.py]"]
end

subgraph group_scanning["Assessment"]
  node_recon["Reconnaissance<br/>[recon.py]"]
  node_ports["Port scanning<br/>[port_scanner.py]"]
  node_cves["CVE correlation<br/>[cve_scanner.py]"]
  node_webscan["Web scanning<br/>[web_scanner.py]"]
  node_weborchestrator["Web probe orchestration"]
  node_webtests["Specialized web tests"]
  node_scope["Target scope<br/>[scope_manager.py]"]
end

subgraph group_output["Persistence and Reporting"]
  node_database[("Scan database<br/>[database.py]")]
  node_templateengine["Report templates<br/>[template_engine.py]"]
  node_reportformats["Report exports"]
end

node_user(("Security user"))
node_cli["CLI entry point<br/>[main.py]"]
node_external(("External webhook consumers"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_scanpage
node_app -->|"routes to"| node_projectpages
node_app -->|"routes to"| node_projectdetail
node_scanpage -->|"uses state"| node_scanstate
node_projectdetail -->|"renders"| node_resultviews
node_app -.->|"calls REST API"| node_server
node_server -->|"registers"| node_scanroutes
node_server -->|"registers"| node_projectroutes
node_server -->|"registers"| node_reportroutes
node_server -->|"registers"| node_bulkroutes
node_server -->|"registers"| node_webhookroutes
node_scanroutes -.->|"dispatches to"| node_scanservice
node_scanservice -->|"runs"| node_ports
node_scanservice -->|"runs"| node_cves
node_scanservice -.->|"invokes"| node_recon
node_scanservice -.->|"invokes"| node_webscan
node_webscan -.->|"delegates to"| node_weborchestrator
node_weborchestrator -->|"coordinates probes"| node_webtests
node_scanservice -.->|"uses scope"| node_scope
node_scanservice -.->|"persists results"| node_database
node_projectroutes -.->|"reads projects"| node_database
node_reportroutes -.->|"uses exporters"| node_reportformats
node_reportroutes -.->|"uses templates"| node_templateengine
node_templateengine -->|"reads and writes"| node_database
node_cli -->|"runs"| node_recon
node_cli -->|"runs"| node_ports
node_cli -->|"correlates"| node_cves
node_cli -->|"runs"| node_webscan
node_cli -->|"generates HTML"| node_reportformats
node_external -.->|"receives events"| node_webhookroutes

click node_app "https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/App.jsx"
click node_scanpage "https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/pages/ScanPage.jsx"
click node_scanstate "https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/context/ScanContext.jsx"
click node_projectpages "https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/pages/ProjectsPage.jsx"
click node_projectdetail "https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/pages/ProjectDetailPage.jsx"
click node_resultviews "https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/components/ResultsDashboard.jsx"
click node_server "https://github.com/arunava-27/vapt-toolkit/blob/master/server/main.py"
click node_scanroutes "https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/scan.py"
click node_projectroutes "https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/projects.py"
click node_reportroutes "https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/reports.py"
click node_bulkroutes "https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/bulk.py"
click node_webhookroutes "https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/webhooks.py"
click node_scanservice "https://github.com/arunava-27/vapt-toolkit/blob/master/server/services/scan_service.py"
click node_recon "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/recon.py"
click node_ports "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/port_scanner.py"
click node_cves "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/cve_scanner.py"
click node_webscan "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/web_scanner.py"
click node_weborchestrator "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/web/web_scanner_orchestrator.py"
click node_webtests "https://github.com/arunava-27/vapt-toolkit/tree/master/scanner/web"
click node_scope "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/scope_manager.py"
click node_database "https://github.com/arunava-27/vapt-toolkit/blob/master/database.py"
click node_templateengine "https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/reporters/template_engine.py"
click node_reportformats "https://github.com/arunava-27/vapt-toolkit/tree/master/scanner/reporters"
click node_cli "https://github.com/arunava-27/vapt-toolkit/blob/master/main.py"

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_app,node_scanpage,node_scanstate,node_projectpages,node_projectdetail,node_resultviews,node_user toneBlue
class node_server,node_scanroutes,node_projectroutes,node_reportroutes,node_bulkroutes,node_webhookroutes,node_scanservice toneAmber
class node_recon,node_ports,node_cves,node_webscan,node_weborchestrator,node_webtests,node_scope,node_external toneMint
class node_database,node_templateengine,node_reportformats toneRose
class node_cli toneTeal
```

## Components

### Dashboard

- [Dashboard app](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Scan workflow](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/pages/ScanPage.jsx): `frontend/src/pages/ScanPage.jsx`
- [Scan state](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/context/ScanContext.jsx): `frontend/src/context/ScanContext.jsx`
- [Project views](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/pages/ProjectsPage.jsx): `frontend/src/pages/ProjectsPage.jsx`
- [Project results](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/pages/ProjectDetailPage.jsx): `frontend/src/pages/ProjectDetailPage.jsx`
- [Results dashboard](https://github.com/arunava-27/vapt-toolkit/blob/master/frontend/src/components/ResultsDashboard.jsx): `frontend/src/components/ResultsDashboard.jsx`

### API and Services

- [FastAPI app](https://github.com/arunava-27/vapt-toolkit/blob/master/server/main.py): `server/main.py`
- [Scan endpoints](https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/scan.py): `server/routes/scan.py`
- [Project endpoints](https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/projects.py): `server/routes/projects.py`
- [Report endpoints](https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/reports.py): `server/routes/reports.py`
- [Bulk scan endpoints](https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/bulk.py): `server/routes/bulk.py`
- [Webhook endpoints](https://github.com/arunava-27/vapt-toolkit/blob/master/server/routes/webhooks.py): `server/routes/webhooks.py`
- [Scan execution](https://github.com/arunava-27/vapt-toolkit/blob/master/server/services/scan_service.py): `server/services/scan_service.py`

### Assessment

- [Reconnaissance](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/recon.py): `scanner/recon.py`
- [Port scanning](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/port_scanner.py): `scanner/port_scanner.py`
- [CVE correlation](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/cve_scanner.py): `scanner/cve_scanner.py`
- [Web scanning](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/web_scanner.py): `scanner/web_scanner.py`
- [Web probe orchestration](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/web/web_scanner_orchestrator.py): `scanner/web/web_scanner_orchestrator.py`
- [Specialized web tests](https://github.com/arunava-27/vapt-toolkit/tree/master/scanner/web): `scanner/web`
- [Target scope](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/scope_manager.py): `scanner/scope_manager.py`

### Persistence and Reporting

- [Scan database](https://github.com/arunava-27/vapt-toolkit/blob/master/database.py): `database.py`
- [Report templates](https://github.com/arunava-27/vapt-toolkit/blob/master/scanner/reporters/template_engine.py): `scanner/reporters/template_engine.py`
- [Report exports](https://github.com/arunava-27/vapt-toolkit/tree/master/scanner/reporters): `scanner/reporters`

### Other components

- **Security user**
- [CLI entry point](https://github.com/arunava-27/vapt-toolkit/blob/master/main.py): `main.py`
- **External webhook consumers**

## Connections

- Security user → Dashboard app: uses
- Dashboard app → Scan workflow: routes to (evidence: `frontend/src/App.jsx`)
- Dashboard app → Project views: routes to (evidence: `frontend/src/App.jsx`)
- Dashboard app → Project results: routes to (evidence: `frontend/src/App.jsx`)
- Scan workflow → Scan state: uses state (evidence: `frontend/src/pages/ScanPage.jsx`)
- Project results → Results dashboard: renders (evidence: `frontend/src/pages/ProjectDetailPage.jsx`)
- Dashboard app → FastAPI app: calls REST API
- FastAPI app → Scan endpoints: registers (evidence: `server/main.py`)
- FastAPI app → Project endpoints: registers (evidence: `server/main.py`)
- FastAPI app → Report endpoints: registers (evidence: `server/main.py`)
- FastAPI app → Bulk scan endpoints: registers (evidence: `server/main.py`)
- FastAPI app → Webhook endpoints: registers (evidence: `server/main.py`)
- Scan endpoints → Scan execution: dispatches to
- Scan execution → Port scanning: runs (evidence: `server/services/scan_service.py`)
- Scan execution → CVE correlation: runs (evidence: `server/services/scan_service.py`)
- Scan execution → Reconnaissance: invokes (evidence: `server/services/scan_service.py`)
- Scan execution → Web scanning: invokes (evidence: `server/services/scan_service.py`)
- Web scanning → Web probe orchestration: delegates to
- Web probe orchestration → Specialized web tests: coordinates probes (evidence: `scanner/web/web_scanner_orchestrator.py`)
- Scan execution → Target scope: uses scope
- Scan execution → Scan database: persists results (evidence: `server/services/scan_service.py`)
- Project endpoints → Scan database: reads projects
- Report endpoints → Report exports: uses exporters (evidence: `server/routes/reports.py`)
- Report endpoints → Report templates: uses templates (evidence: `server/routes/reports.py`)
- Report templates → Scan database: reads and writes (evidence: `scanner/reporters/template_engine.py`)
- CLI entry point → Reconnaissance: runs (evidence: `main.py`)
- CLI entry point → Port scanning: runs (evidence: `main.py`)
- CLI entry point → CVE correlation: correlates (evidence: `main.py`)
- CLI entry point → Web scanning: runs (evidence: `main.py`)
- CLI entry point → Report exports: generates HTML (evidence: `main.py`)
- External webhook consumers → Webhook endpoints: receives events
