# threat-finder/cyberguardai architecture

> Architecture diagram of the GitHub repository threat-finder/cyberguardai, 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/threat-finder/cyberguardai
- Repository: https://github.com/threat-finder/cyberguardai

## Overview

Cyber Guard is a web-based security assessment platform. An operator signs in, configures a target and scan profile, and starts an assessment; the application sends requests to its Express API, which performs the scan and can use Gemini for remediation analysis. Results support dashboard and finding views, historical scans, threat visualization, and report export. The graph reflects the shown API calls and imports; several capabilities are represented by their component paths, but their runtime wiring was not excerpted.

Main entry points: [`src/App.tsx`](https://github.com/threat-finder/cyberguardai/blob/main/src/App.tsx) (App controller), [`server.ts`](https://github.com/threat-finder/cyberguardai/blob/main/server.ts) (Express API), [`src/components/screens/NewScanScreen.tsx`](https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/NewScanScreen.tsx) (Scan configuration), [`src/components/screens/DashboardScreen.tsx`](https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/DashboardScreen.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Operator interface"]
  node_app["App controller<br/>[App.tsx]"]
  node_login["Sign-in<br/>[LoginScreen.tsx]"]
  node_scanform["Scan configuration<br/>[NewScanScreen.tsx]"]
  node_dashboard["Dashboard"]
  node_history["Scan history<br/>[HistoryScreen.tsx]"]
  node_charts["Realtime charts<br/>[RealtimeCharts.tsx]"]
  node_health["API health"]
end

subgraph group_assessment["Assessment and analysis"]
  node_api["Express API<br/>[server.ts]"]
  node_scanengine["Website assessment<br/>[server.ts]"]
end

subgraph group_insight["Findings and response"]
  node_results["Findings and CVE audit<br/>[ResultsScreen.tsx]"]
  node_cve["CVE mapping<br/>[cveMapping.ts]"]
  node_heatmap["Threat scoring<br/>[threatHeatmap.ts]"]
  node_radar["Threat visualization<br/>[ThreatRadarMap.tsx]"]
  node_airesponse["AI remediation"]
  node_annotations["Scan annotations"]
  node_alerts["Alert thresholds"]
end

subgraph group_reporting["Reporting"]
  node_reportmodal["Report export<br/>[ReportingModal.tsx]"]
  node_template["HTML report template<br/>[reportTemplate.ts]"]
end

node_operator(("Operator"))
node_gemini["Gemini AI"]

node_operator -->|"signs in"| node_login
node_operator -->|"configures scan"| node_scanform
node_scanform -->|"starts scan"| node_app
node_app -->|"requests metrics"| node_api
node_app -->|"submits scan"| node_api
node_api -.->|"assesses target"| node_scanengine
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_results
node_app -->|"renders"| node_history
node_results -->|"maps findings"| node_cve
node_dashboard -->|"maps findings"| node_cve
node_reportmodal -->|"generates HTML"| node_template
node_api -->|"generates HTML"| node_template
node_api -->|"requests analysis"| node_gemini

click node_app "https://github.com/threat-finder/cyberguardai/blob/main/src/App.tsx"
click node_login "https://github.com/threat-finder/cyberguardai/blob/main/src/components/LoginScreen.tsx"
click node_scanform "https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/NewScanScreen.tsx"
click node_api "https://github.com/threat-finder/cyberguardai/blob/main/server.ts"
click node_scanengine "https://github.com/threat-finder/cyberguardai/blob/main/server.ts"
click node_dashboard "https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/DashboardScreen.tsx"
click node_results "https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/ResultsScreen.tsx"
click node_history "https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/HistoryScreen.tsx"
click node_cve "https://github.com/threat-finder/cyberguardai/blob/main/src/utils/cveMapping.ts"
click node_heatmap "https://github.com/threat-finder/cyberguardai/blob/main/src/utils/threatHeatmap.ts"
click node_radar "https://github.com/threat-finder/cyberguardai/blob/main/src/components/ThreatRadarMap.tsx"
click node_airesponse "https://github.com/threat-finder/cyberguardai/blob/main/src/components/AiRemediationPanel.tsx"
click node_annotations "https://github.com/threat-finder/cyberguardai/blob/main/src/components/ScanAnnotationsModal.tsx"
click node_alerts "https://github.com/threat-finder/cyberguardai/blob/main/src/components/AlertThresholdModal.tsx"
click node_reportmodal "https://github.com/threat-finder/cyberguardai/blob/main/src/components/ReportingModal.tsx"
click node_template "https://github.com/threat-finder/cyberguardai/blob/main/src/utils/reportTemplate.ts"
click node_charts "https://github.com/threat-finder/cyberguardai/blob/main/src/components/RealtimeCharts.tsx"
click node_health "https://github.com/threat-finder/cyberguardai/blob/main/src/components/ApiHealthIndicator.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_app,node_login,node_scanform,node_dashboard,node_history,node_charts,node_health toneBlue
class node_api,node_scanengine toneAmber
class node_results,node_cve,node_heatmap,node_radar,node_airesponse,node_annotations,node_alerts toneMint
class node_reportmodal,node_template toneRose
class node_operator,node_gemini toneIndigo
```

## Components

### Operator interface

- [App controller](https://github.com/threat-finder/cyberguardai/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in](https://github.com/threat-finder/cyberguardai/blob/main/src/components/LoginScreen.tsx): `src/components/LoginScreen.tsx`
- [Scan configuration](https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/NewScanScreen.tsx): `src/components/screens/NewScanScreen.tsx`
- [Dashboard](https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/DashboardScreen.tsx): `src/components/screens/DashboardScreen.tsx`
- [Scan history](https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/HistoryScreen.tsx): `src/components/screens/HistoryScreen.tsx`
- [Realtime charts](https://github.com/threat-finder/cyberguardai/blob/main/src/components/RealtimeCharts.tsx): `src/components/RealtimeCharts.tsx`
- [API health](https://github.com/threat-finder/cyberguardai/blob/main/src/components/ApiHealthIndicator.tsx): `src/components/ApiHealthIndicator.tsx`

### Assessment and analysis

- [Express API](https://github.com/threat-finder/cyberguardai/blob/main/server.ts): `server.ts`
- [Website assessment](https://github.com/threat-finder/cyberguardai/blob/main/server.ts): `server.ts`

### Findings and response

- [Findings and CVE audit](https://github.com/threat-finder/cyberguardai/blob/main/src/components/screens/ResultsScreen.tsx): `src/components/screens/ResultsScreen.tsx`
- [CVE mapping](https://github.com/threat-finder/cyberguardai/blob/main/src/utils/cveMapping.ts): `src/utils/cveMapping.ts`
- [Threat scoring](https://github.com/threat-finder/cyberguardai/blob/main/src/utils/threatHeatmap.ts): `src/utils/threatHeatmap.ts`
- [Threat visualization](https://github.com/threat-finder/cyberguardai/blob/main/src/components/ThreatRadarMap.tsx): `src/components/ThreatRadarMap.tsx`
- [AI remediation](https://github.com/threat-finder/cyberguardai/blob/main/src/components/AiRemediationPanel.tsx): `src/components/AiRemediationPanel.tsx`
- [Scan annotations](https://github.com/threat-finder/cyberguardai/blob/main/src/components/ScanAnnotationsModal.tsx): `src/components/ScanAnnotationsModal.tsx`
- [Alert thresholds](https://github.com/threat-finder/cyberguardai/blob/main/src/components/AlertThresholdModal.tsx): `src/components/AlertThresholdModal.tsx`

### Reporting

- [Report export](https://github.com/threat-finder/cyberguardai/blob/main/src/components/ReportingModal.tsx): `src/components/ReportingModal.tsx`
- [HTML report template](https://github.com/threat-finder/cyberguardai/blob/main/src/utils/reportTemplate.ts): `src/utils/reportTemplate.ts`

### Other components

- **Operator**
- **Gemini AI**

## Connections

- Operator → Sign-in: signs in
- Operator → Scan configuration: configures scan (evidence: `src/components/screens/NewScanScreen.tsx`)
- Scan configuration → App controller: starts scan (evidence: `src/App.tsx`)
- App controller → Express API: requests metrics (evidence: `src/App.tsx`)
- App controller → Express API: submits scan (evidence: `src/App.tsx`)
- Express API → Website assessment: assesses target (evidence: `server.ts`)
- App controller → Dashboard: renders (evidence: `src/App.tsx`)
- App controller → Findings and CVE audit: renders (evidence: `src/App.tsx`)
- App controller → Scan history: renders (evidence: `src/App.tsx`)
- Findings and CVE audit → CVE mapping: maps findings (evidence: `src/components/screens/ResultsScreen.tsx`)
- Dashboard → CVE mapping: maps findings (evidence: `src/components/screens/DashboardScreen.tsx`)
- Report export → HTML report template: generates HTML (evidence: `src/components/ReportingModal.tsx`)
- Express API → HTML report template: generates HTML (evidence: `server.ts`)
- Express API → Gemini AI: requests analysis (evidence: `server.ts`)
