# hiteshshaw/auditforge architecture

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

- Interactive diagram: https://gitdiagram.com/hiteshshaw/auditforge
- Repository: https://github.com/hiteshshaw/auditforge

## Overview

Full Security Assessment Tool scans a source tree and a running application, produces scoped vulnerability findings, and presents them in a dashboard with export and AI-copilot features. The main workflow is dashboard or API request → scan orchestration → source checks and live HTTP probes → findings and report. The README documents all seven assessment scopes; the excerpt shows only portions of their implementation, so the scope stages are represented without claiming unshown internal call paths. Optional target selection and AI integration are separate branches.

Main entry points: [`server.js`](https://github.com/hiteshshaw/auditforge/blob/main/server.js) (Scan Orchestrator), [`public/dashboard.html`](https://github.com/hiteshshaw/auditforge/blob/main/public/dashboard.html) (Dashboard), [`public/index.html`](https://github.com/hiteshshaw/auditforge/blob/main/public/index.html) (Web Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scan["Assessment"]
  node_orchestrator["Scan Orchestrator<br/>[server.js]"]
  node_source["Source Audit<br/>[server.js]"]
  node_auth["Auth &amp; Sessions<br/>[server.js]"]
  node_access["Access Control<br/>[server.js]"]
  node_input["Input &amp; Data<br/>[server.js]"]
  node_api_security["API Security<br/>[server.js]"]
  node_client["Client Controls<br/>[server.js]"]
  node_transport["Secure Transport<br/>[server.js]"]
  node_privacy["Storage &amp; Privacy<br/>[server.js]"]
end

subgraph group_results["Findings &amp; Reports"]
  node_findings["Findings &amp; Regression<br/>[server.js]"]
  node_report["Report Export<br/>[server.js]"]
end

subgraph group_interface["User Interface"]
  node_dashboard["Dashboard<br/>[dashboard.html]"]
  node_landing["Web Entry<br/>[index.html]"]
  node_api["HTTP API<br/>[server.js]"]
end

subgraph group_integrations["Targets &amp; AI"]
  node_target["Assessed Application"]
  node_custom["Custom Target<br/>[server.js]"]
  node_copilot["AI Copilot<br/>[server.js]"]
end

node_user(("User"))
node_groq["Groq API"]

node_user -->|"opens"| node_dashboard
node_user -->|"opens"| node_landing
node_dashboard -->|"requests scans"| node_api
node_api -->|"runs scan"| node_orchestrator
node_orchestrator -->|"audits source"| node_source
node_orchestrator -->|"assesses scope"| node_auth
node_orchestrator -->|"assesses scope"| node_access
node_orchestrator -->|"assesses scope"| node_input
node_orchestrator -->|"assesses scope"| node_api_security
node_orchestrator -->|"assesses scope"| node_client
node_orchestrator -->|"assesses scope"| node_transport
node_orchestrator -->|"assesses scope"| node_privacy
node_orchestrator -->|"probes HTTP"| node_target
node_orchestrator -.->|"collects findings"| node_findings
node_findings -->|"exports results"| node_report
node_user -->|"selects target"| node_custom
node_custom -->|"starts scan"| node_orchestrator
node_dashboard -->|"opens chat"| node_copilot
node_copilot -->|"requests scan data"| node_orchestrator
node_copilot -.->|"uses AI service"| node_groq

click node_dashboard "https://github.com/hiteshshaw/auditforge/blob/main/public/dashboard.html"
click node_landing "https://github.com/hiteshshaw/auditforge/blob/main/public/index.html"
click node_api "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_orchestrator "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_source "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_auth "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_access "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_input "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_api_security "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_client "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_transport "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_privacy "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_findings "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_report "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_custom "https://github.com/hiteshshaw/auditforge/blob/main/server.js"
click node_copilot "https://github.com/hiteshshaw/auditforge/blob/main/server.js"

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_orchestrator,node_source,node_auth,node_access,node_input,node_api_security,node_client,node_transport,node_privacy,node_user toneBlue
class node_findings,node_report toneAmber
class node_dashboard,node_landing,node_api,node_groq toneMint
class node_target,node_custom,node_copilot toneRose
```

## Components

### Assessment

- [Scan Orchestrator](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Source Audit](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Auth & Sessions](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Access Control](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Input & Data](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [API Security](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Client Controls](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Secure Transport](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Storage & Privacy](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`

### Findings & Reports

- [Findings & Regression](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [Report Export](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`

### User Interface

- [Dashboard](https://github.com/hiteshshaw/auditforge/blob/main/public/dashboard.html): `public/dashboard.html`
- [Web Entry](https://github.com/hiteshshaw/auditforge/blob/main/public/index.html): `public/index.html`
- [HTTP API](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`

### Targets & AI

- **Assessed Application**
- [Custom Target](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`
- [AI Copilot](https://github.com/hiteshshaw/auditforge/blob/main/server.js): `server.js`

### Other components

- **User**
- **Groq API**

## Connections

- User → Dashboard: opens (evidence: `README.md`)
- User → Web Entry: opens (evidence: `README.md`)
- Dashboard → HTTP API: requests scans (evidence: `README.md`)
- HTTP API → Scan Orchestrator: runs scan (evidence: `server.js`)
- Scan Orchestrator → Source Audit: audits source (evidence: `README.md`)
- Scan Orchestrator → Auth & Sessions: assesses scope (evidence: `README.md`)
- Scan Orchestrator → Access Control: assesses scope (evidence: `README.md`)
- Scan Orchestrator → Input & Data: assesses scope (evidence: `README.md`)
- Scan Orchestrator → API Security: assesses scope (evidence: `README.md`)
- Scan Orchestrator → Client Controls: assesses scope (evidence: `README.md`)
- Scan Orchestrator → Secure Transport: assesses scope (evidence: `README.md`)
- Scan Orchestrator → Storage & Privacy: assesses scope (evidence: `README.md`)
- Scan Orchestrator → Assessed Application: probes HTTP (evidence: `server.js`)
- Scan Orchestrator → Findings & Regression: collects findings (evidence: `server.js`)
- Findings & Regression → Report Export: exports results (evidence: `README.md`)
- User → Custom Target: selects target (evidence: `server.js`)
- Custom Target → Scan Orchestrator: starts scan (evidence: `server.js`)
- Dashboard → AI Copilot: opens chat (evidence: `README.md`)
- AI Copilot → Scan Orchestrator: requests scan data (evidence: `server.js`)
- AI Copilot → Groq API: uses AI service
