# orgalorg7/argus architecture

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

- Interactive diagram: https://gitdiagram.com/orgalorg7/argus
- Repository: https://github.com/orgalorg7/argus

## Overview

This is an authorized web-security assessment platform. Users sign in, create a workspace, register a target and its allowed scope, start a scan, then review evidence-backed findings and reports. The worker coordinates persisted scan stages: scope validation, discovery and crawling, passive scanning, evidence collection, normalization/correlation, optional Qwen analysis, and reporting. The README documents the end-to-end stages; sampled worker code confirms orchestration, discovery, normalization, and correlation, but not every stage implementation or transition.

Main entry points: [`apps/worker/src/main.ts`](https://github.com/orgalorg7/argus/blob/main/apps/worker/src/main.ts) (Scan Orchestrator), [`apps/api/src/app.module.ts`](https://github.com/orgalorg7/argus/blob/main/apps/api/src/app.module.ts) (Platform API), [`apps/worker/src/day2-workers.ts`](https://github.com/orgalorg7/argus/blob/main/apps/worker/src/day2-workers.ts) (Discovery Workers), [`apps/worker/src/day4-workers.ts`](https://github.com/orgalorg7/argus/blob/main/apps/worker/src/day4-workers.ts) (Analysis Workers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["User Console and API"]
  node_web["Assessment Dashboard"]
  node_web_api["Web API Routes"]
  node_api["Platform API<br/>[app.module.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_workspaces["Workspace Management"]
  node_targets["Target and Scope Setup"]
  node_scans["Scan Management"]
  node_providers["Qwen Provider Setup"]
  node_audit["Audit Records"]
end

subgraph group_orchestration["Scan Orchestration"]
  node_orchestrator["Scan Orchestrator<br/>[main.ts]"]
  node_discovery["Discovery Workers<br/>[day2-workers.ts]"]
  node_analysis_workers["Analysis Workers<br/>[day4-workers.ts]"]
end

subgraph group_assessment["Assessment Engines"]
  node_scope["Scope Engine<br/>[scope-engine.ts]"]
  node_crawler["Web Crawler<br/>[crawler.ts]"]
  node_api_discovery["API Surface Discovery<br/>[index.ts]"]
  node_fingerprinter["Technology Fingerprinting<br/>[index.ts]"]
  node_scanners["Deterministic Scanners<br/>[index.ts]"]
  node_finding["Finding Normalization<br/>[index.ts]"]
  node_correlation["Finding Correlation<br/>[index.ts]"]
  node_ai["Qwen Analysis<br/>[index.ts]"]
  node_reports["Report Engine<br/>[index.ts]"]
end

subgraph group_persistence["Evidence and Persistence"]
  node_database[("Platform Database")]
  node_evidence["Evidence Engine<br/>[index.ts]"]
end

node_user(("Workspace User"))

node_user -->|"uses"| node_web
node_web -.->|"requests"| node_web_api
node_web_api -.->|"forwards requests"| node_api
node_api -.->|"authenticates"| node_auth
node_api -->|"manages"| node_workspaces
node_api -->|"manages"| node_targets
node_api -->|"manages"| node_scans
node_api -->|"configures"| node_providers
node_api -->|"serves"| node_audit
node_workspaces -.->|"reads and writes"| node_database
node_targets -.->|"persists scope"| node_database
node_scans -.->|"persists scan data"| node_database
node_scans -->|"starts scan"| node_orchestrator
node_orchestrator -->|"loads scan and updates stages"| node_database
node_orchestrator -->|"validates target"| node_scope
node_orchestrator -->|"starts workers"| node_discovery
node_discovery -->|"guards requests"| node_scope
node_discovery -->|"crawls target"| node_crawler
node_discovery -->|"extracts surfaces"| node_api_discovery
node_discovery -->|"fingerprints pages"| node_fingerprinter
node_orchestrator -->|"starts workers"| node_analysis_workers
node_analysis_workers -->|"normalizes observations"| node_finding
node_analysis_workers -->|"correlates findings"| node_correlation
node_analysis_workers -->|"analyzes findings"| node_ai
node_analysis_workers -->|"persists findings and analyses"| node_database
node_orchestrator -.->|"runs deterministic scanners"| node_scanners
node_orchestrator -.->|"persists observations"| node_evidence
node_orchestrator -.->|"renders reports"| node_reports
node_reports -.->|"serves report content"| node_scans
node_providers -.->|"configures provider"| node_ai

click node_web "https://github.com/orgalorg7/argus/tree/main/apps/web/app"
click node_web_api "https://github.com/orgalorg7/argus/tree/main/apps/web/app/api"
click node_api "https://github.com/orgalorg7/argus/blob/main/apps/api/src/app.module.ts"
click node_auth "https://github.com/orgalorg7/argus/blob/main/apps/api/src/auth/auth.service.ts"
click node_workspaces "https://github.com/orgalorg7/argus/blob/main/apps/api/src/workspaces/workspaces.controller.ts"
click node_targets "https://github.com/orgalorg7/argus/blob/main/apps/api/src/targets/targets.controller.ts"
click node_scans "https://github.com/orgalorg7/argus/blob/main/apps/api/src/scans/scans.controller.ts"
click node_providers "https://github.com/orgalorg7/argus/blob/main/apps/api/src/model-providers/model-providers.controller.ts"
click node_audit "https://github.com/orgalorg7/argus/blob/main/apps/api/src/audit/audit.controller.ts"
click node_orchestrator "https://github.com/orgalorg7/argus/blob/main/apps/worker/src/main.ts"
click node_discovery "https://github.com/orgalorg7/argus/blob/main/apps/worker/src/day2-workers.ts"
click node_analysis_workers "https://github.com/orgalorg7/argus/blob/main/apps/worker/src/day4-workers.ts"
click node_database "https://github.com/orgalorg7/argus/tree/main/packages/database"
click node_scope "https://github.com/orgalorg7/argus/blob/main/services/scope-engine/src/scope-engine.ts"
click node_crawler "https://github.com/orgalorg7/argus/blob/main/services/crawler/src/crawler.ts"
click node_api_discovery "https://github.com/orgalorg7/argus/blob/main/services/api-discovery/src/index.ts"
click node_fingerprinter "https://github.com/orgalorg7/argus/blob/main/services/technology-fingerprinter/src/index.ts"
click node_scanners "https://github.com/orgalorg7/argus/blob/main/services/scanner-http/src/index.ts"
click node_evidence "https://github.com/orgalorg7/argus/blob/main/services/evidence-engine/src/index.ts"
click node_finding "https://github.com/orgalorg7/argus/blob/main/services/finding-engine/src/index.ts"
click node_correlation "https://github.com/orgalorg7/argus/blob/main/services/correlation-engine/src/index.ts"
click node_ai "https://github.com/orgalorg7/argus/blob/main/services/ai-engine/src/index.ts"
click node_reports "https://github.com/orgalorg7/argus/blob/main/services/report-engine/src/index.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_web,node_web_api,node_api,node_auth,node_workspaces,node_targets,node_scans,node_providers,node_audit,node_user toneBlue
class node_orchestrator,node_discovery,node_analysis_workers toneAmber
class node_scope,node_crawler,node_api_discovery,node_fingerprinter,node_scanners,node_finding,node_correlation,node_ai,node_reports toneMint
class node_database,node_evidence toneRose
```

## Components

### User Console and API

- [Assessment Dashboard](https://github.com/orgalorg7/argus/tree/main/apps/web/app): `apps/web/app`
- [Web API Routes](https://github.com/orgalorg7/argus/tree/main/apps/web/app/api): `apps/web/app/api`
- [Platform API](https://github.com/orgalorg7/argus/blob/main/apps/api/src/app.module.ts): `apps/api/src/app.module.ts`
- [Authentication](https://github.com/orgalorg7/argus/blob/main/apps/api/src/auth/auth.service.ts): `apps/api/src/auth/auth.service.ts`
- [Workspace Management](https://github.com/orgalorg7/argus/blob/main/apps/api/src/workspaces/workspaces.controller.ts): `apps/api/src/workspaces/workspaces.controller.ts`
- [Target and Scope Setup](https://github.com/orgalorg7/argus/blob/main/apps/api/src/targets/targets.controller.ts): `apps/api/src/targets/targets.controller.ts`
- [Scan Management](https://github.com/orgalorg7/argus/blob/main/apps/api/src/scans/scans.controller.ts): `apps/api/src/scans/scans.controller.ts`
- [Qwen Provider Setup](https://github.com/orgalorg7/argus/blob/main/apps/api/src/model-providers/model-providers.controller.ts): `apps/api/src/model-providers/model-providers.controller.ts`
- [Audit Records](https://github.com/orgalorg7/argus/blob/main/apps/api/src/audit/audit.controller.ts): `apps/api/src/audit/audit.controller.ts`

### Scan Orchestration

- [Scan Orchestrator](https://github.com/orgalorg7/argus/blob/main/apps/worker/src/main.ts): `apps/worker/src/main.ts`
- [Discovery Workers](https://github.com/orgalorg7/argus/blob/main/apps/worker/src/day2-workers.ts): `apps/worker/src/day2-workers.ts`
- [Analysis Workers](https://github.com/orgalorg7/argus/blob/main/apps/worker/src/day4-workers.ts): `apps/worker/src/day4-workers.ts`

### Assessment Engines

- [Scope Engine](https://github.com/orgalorg7/argus/blob/main/services/scope-engine/src/scope-engine.ts): `services/scope-engine/src/scope-engine.ts`
- [Web Crawler](https://github.com/orgalorg7/argus/blob/main/services/crawler/src/crawler.ts): `services/crawler/src/crawler.ts`
- [API Surface Discovery](https://github.com/orgalorg7/argus/blob/main/services/api-discovery/src/index.ts): `services/api-discovery/src/index.ts`
- [Technology Fingerprinting](https://github.com/orgalorg7/argus/blob/main/services/technology-fingerprinter/src/index.ts): `services/technology-fingerprinter/src/index.ts`
- [Deterministic Scanners](https://github.com/orgalorg7/argus/blob/main/services/scanner-http/src/index.ts): `services/scanner-http/src/index.ts`
- [Finding Normalization](https://github.com/orgalorg7/argus/blob/main/services/finding-engine/src/index.ts): `services/finding-engine/src/index.ts`
- [Finding Correlation](https://github.com/orgalorg7/argus/blob/main/services/correlation-engine/src/index.ts): `services/correlation-engine/src/index.ts`
- [Qwen Analysis](https://github.com/orgalorg7/argus/blob/main/services/ai-engine/src/index.ts): `services/ai-engine/src/index.ts`
- [Report Engine](https://github.com/orgalorg7/argus/blob/main/services/report-engine/src/index.ts): `services/report-engine/src/index.ts`

### Evidence and Persistence

- [Platform Database](https://github.com/orgalorg7/argus/tree/main/packages/database): `packages/database`
- [Evidence Engine](https://github.com/orgalorg7/argus/blob/main/services/evidence-engine/src/index.ts): `services/evidence-engine/src/index.ts`

### Other components

- **Workspace User**

## Connections

- Workspace User → Assessment Dashboard: uses (evidence: `README.md`)
- Assessment Dashboard → Web API Routes: requests
- Web API Routes → Platform API: forwards requests
- Platform API → Authentication: authenticates
- Platform API → Workspace Management: manages (evidence: `apps/api/src/app.module.ts`)
- Platform API → Target and Scope Setup: manages (evidence: `apps/api/src/app.module.ts`)
- Platform API → Scan Management: manages (evidence: `apps/api/src/app.module.ts`)
- Platform API → Qwen Provider Setup: configures (evidence: `apps/api/src/app.module.ts`)
- Platform API → Audit Records: serves (evidence: `apps/api/src/app.module.ts`)
- Workspace Management → Platform Database: reads and writes
- Target and Scope Setup → Platform Database: persists scope (evidence: `apps/api/src/targets/targets.controller.ts`)
- Scan Management → Platform Database: persists scan data (evidence: `apps/api/src/scans/scans.controller.ts`)
- Scan Management → Scan Orchestrator: starts scan (evidence: `README.md`)
- Scan Orchestrator → Platform Database: loads scan and updates stages (evidence: `apps/worker/src/main.ts`)
- Scan Orchestrator → Scope Engine: validates target (evidence: `apps/worker/src/main.ts`)
- Scan Orchestrator → Discovery Workers: starts workers (evidence: `apps/worker/src/main.ts`)
- Discovery Workers → Scope Engine: guards requests (evidence: `apps/worker/src/day2-workers.ts`)
- Discovery Workers → Web Crawler: crawls target (evidence: `apps/worker/src/day2-workers.ts`)
- Discovery Workers → API Surface Discovery: extracts surfaces (evidence: `apps/worker/src/day2-workers.ts`)
- Discovery Workers → Technology Fingerprinting: fingerprints pages (evidence: `apps/worker/src/day2-workers.ts`)
- Scan Orchestrator → Analysis Workers: starts workers (evidence: `apps/worker/src/main.ts`)
- Analysis Workers → Finding Normalization: normalizes observations (evidence: `apps/worker/src/day4-workers.ts`)
- Analysis Workers → Finding Correlation: correlates findings (evidence: `apps/worker/src/day4-workers.ts`)
- Analysis Workers → Qwen Analysis: analyzes findings (evidence: `apps/worker/src/day4-workers.ts`)
- Analysis Workers → Platform Database: persists findings and analyses (evidence: `apps/worker/src/day4-workers.ts`)
- Scan Orchestrator → Deterministic Scanners: runs deterministic scanners
- Scan Orchestrator → Evidence Engine: persists observations
- Scan Orchestrator → Report Engine: renders reports
- Report Engine → Scan Management: serves report content
- Qwen Provider Setup → Qwen Analysis: configures provider
