# zep4yrs/sitelens architecture

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

## Overview

SiteLens is a vulnerability verification and attack-surface scanning product, delivered through CLI and an embedded web console (with a desktop shell). Its central workflow validates a target, gathers and fingerprints web content, runs verification and enumeration stages, correlates vulnerability intelligence, and returns evidence-backed findings. The README documents the full scan stages; sampled engine source confirms orchestration and hot-swappable per-scan data snapshots, but does not expose every stage call. Edges therefore show documented orchestration without guessing internal wiring.

Main entry points: [`internal/engine/engine.go`](https://github.com/zep4yrs/sitelens/blob/main/internal/engine/engine.go) (Scan orchestrator), [`internal/server/server.go`](https://github.com/zep4yrs/sitelens/blob/main/internal/server/server.go) (HTTP API), [`cmd/sitelens/main.go`](https://github.com/zep4yrs/sitelens/blob/main/cmd/sitelens/main.go) (CLI commands), [`web/js/app.js`](https://github.com/zep4yrs/sitelens/blob/main/web/js/app.js) (Web console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI commands<br/>[main.go]"]
  node_webui["Web console<br/>[app.js]"]
end

subgraph group_scan["Scan workflow"]
  node_engine["Scan orchestrator<br/>[engine.go]"]
  node_target["Target validation<br/>[validator.go]"]
  node_crawler["Crawl and render<br/>[crawler.go]"]
  node_fingerprint["Technology fingerprinting<br/>[matcher.go]"]
  node_checks["Verification checks<br/>[runner.go]"]
  node_nuclei["Template funnel<br/>[nuclei.go]"]
end

subgraph group_analysis["Analysis capabilities"]
  node_passive["Passive detection<br/>[passive.go]"]
  node_dast["Active probing<br/>[dast.go]"]
  node_modules["Asset modules<br/>[modules.go]"]
  node_netsec["TLS and DNS checks<br/>[netsec.go]"]
  node_audit["Source taint audit<br/>[audit.go]"]
  node_chain["Evidence attack chain<br/>[chain.go]"]
end

subgraph group_data["Knowledge and history"]
  node_intel[("Vulnerability intelligence<br/>[intel.go]")]
  node_matcher[("Fingerprint rules<br/>[matcher.go]")]
  node_store[("Scan history and jobs<br/>[store.go]")]
end

subgraph group_delivery["Results and services"]
  node_server["HTTP API<br/>[server.go]"]
  node_result["Findings and evidence<br/>[result.go]"]
end

node_user(("Operator"))
node_external(("Scanned target"))
node_browser(("Browser user"))

node_user -->|"runs command"| node_cli
node_user -->|"submits scan"| node_webui
node_webui -->|"calls API"| node_server
node_cli -->|"runs scan"| node_engine
node_cli -->|"starts service"| node_server
node_cli -->|"runs audit"| node_audit
node_server -->|"schedules scan"| node_engine
node_server -->|"manages jobs"| node_store
node_engine -->|"validates target"| node_target
node_engine -->|"crawls pages"| node_crawler
node_engine -->|"identifies technologies"| node_fingerprint
node_engine -->|"runs checks"| node_checks
node_engine -->|"selects templates"| node_nuclei
node_engine -->|"runs detection"| node_passive
node_engine -->|"probes parameters"| node_dast
node_engine -->|"enumerates assets"| node_modules
node_engine -->|"checks network"| node_netsec
node_engine -->|"correlates findings"| node_intel
node_engine -->|"takes snapshot"| node_matcher
node_engine -->|"aggregates results"| node_result
node_engine -->|"persists history"| node_store
node_external -->|"provides target"| node_target
node_audit -->|"builds evidence chain"| node_chain
node_result -->|"serves reports"| node_server
node_server -->|"returns results"| node_browser

click node_cli "https://github.com/zep4yrs/sitelens/blob/main/cmd/sitelens/main.go"
click node_webui "https://github.com/zep4yrs/sitelens/blob/main/web/js/app.js"
click node_server "https://github.com/zep4yrs/sitelens/blob/main/internal/server/server.go"
click node_engine "https://github.com/zep4yrs/sitelens/blob/main/internal/engine/engine.go"
click node_target "https://github.com/zep4yrs/sitelens/blob/main/internal/target/validator.go"
click node_crawler "https://github.com/zep4yrs/sitelens/blob/main/internal/crawler/crawler.go"
click node_fingerprint "https://github.com/zep4yrs/sitelens/blob/main/internal/sitelens/matcher.go"
click node_checks "https://github.com/zep4yrs/sitelens/blob/main/internal/checks/runner.go"
click node_nuclei "https://github.com/zep4yrs/sitelens/blob/main/internal/nuclei/nuclei.go"
click node_passive "https://github.com/zep4yrs/sitelens/blob/main/internal/passive/passive.go"
click node_dast "https://github.com/zep4yrs/sitelens/blob/main/internal/dast/dast.go"
click node_modules "https://github.com/zep4yrs/sitelens/blob/main/internal/modules/modules.go"
click node_netsec "https://github.com/zep4yrs/sitelens/blob/main/internal/netsec/netsec.go"
click node_audit "https://github.com/zep4yrs/sitelens/blob/main/internal/audit/audit.go"
click node_chain "https://github.com/zep4yrs/sitelens/blob/main/internal/chain/chain.go"
click node_intel "https://github.com/zep4yrs/sitelens/blob/main/internal/intel/intel.go"
click node_matcher "https://github.com/zep4yrs/sitelens/blob/main/internal/sitelens/matcher.go"
click node_store "https://github.com/zep4yrs/sitelens/blob/main/internal/store/store.go"
click node_result "https://github.com/zep4yrs/sitelens/blob/main/internal/engine/result.go"

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_cli,node_webui,node_browser toneBlue
class node_engine,node_target,node_crawler,node_fingerprint,node_checks,node_nuclei toneAmber
class node_passive,node_dast,node_modules,node_netsec,node_audit,node_chain toneMint
class node_intel,node_matcher,node_store toneRose
class node_server,node_result,node_user,node_external toneIndigo
```

## Components

### User interfaces

- [CLI commands](https://github.com/zep4yrs/sitelens/blob/main/cmd/sitelens/main.go): `cmd/sitelens/main.go`
- [Web console](https://github.com/zep4yrs/sitelens/blob/main/web/js/app.js): `web/js/app.js`

### Scan workflow

- [Scan orchestrator](https://github.com/zep4yrs/sitelens/blob/main/internal/engine/engine.go): `internal/engine/engine.go`
- [Target validation](https://github.com/zep4yrs/sitelens/blob/main/internal/target/validator.go): `internal/target/validator.go`
- [Crawl and render](https://github.com/zep4yrs/sitelens/blob/main/internal/crawler/crawler.go): `internal/crawler/crawler.go`
- [Technology fingerprinting](https://github.com/zep4yrs/sitelens/blob/main/internal/sitelens/matcher.go): `internal/sitelens/matcher.go`
- [Verification checks](https://github.com/zep4yrs/sitelens/blob/main/internal/checks/runner.go): `internal/checks/runner.go`
- [Template funnel](https://github.com/zep4yrs/sitelens/blob/main/internal/nuclei/nuclei.go): `internal/nuclei/nuclei.go`

### Analysis capabilities

- [Passive detection](https://github.com/zep4yrs/sitelens/blob/main/internal/passive/passive.go): `internal/passive/passive.go`
- [Active probing](https://github.com/zep4yrs/sitelens/blob/main/internal/dast/dast.go): `internal/dast/dast.go`
- [Asset modules](https://github.com/zep4yrs/sitelens/blob/main/internal/modules/modules.go): `internal/modules/modules.go`
- [TLS and DNS checks](https://github.com/zep4yrs/sitelens/blob/main/internal/netsec/netsec.go): `internal/netsec/netsec.go`
- [Source taint audit](https://github.com/zep4yrs/sitelens/blob/main/internal/audit/audit.go): `internal/audit/audit.go`
- [Evidence attack chain](https://github.com/zep4yrs/sitelens/blob/main/internal/chain/chain.go): `internal/chain/chain.go`

### Knowledge and history

- [Vulnerability intelligence](https://github.com/zep4yrs/sitelens/blob/main/internal/intel/intel.go): `internal/intel/intel.go`
- [Fingerprint rules](https://github.com/zep4yrs/sitelens/blob/main/internal/sitelens/matcher.go): `internal/sitelens/matcher.go`
- [Scan history and jobs](https://github.com/zep4yrs/sitelens/blob/main/internal/store/store.go): `internal/store/store.go`

### Results and services

- [HTTP API](https://github.com/zep4yrs/sitelens/blob/main/internal/server/server.go): `internal/server/server.go`
- [Findings and evidence](https://github.com/zep4yrs/sitelens/blob/main/internal/engine/result.go): `internal/engine/result.go`

### Other components

- **Operator**
- **Scanned target**
- **Browser user**

## Connections

- Operator → CLI commands: runs command
- Operator → Web console: submits scan
- Web console → HTTP API: calls API
- CLI commands → Scan orchestrator: runs scan
- CLI commands → HTTP API: starts service
- CLI commands → Source taint audit: runs audit
- HTTP API → Scan orchestrator: schedules scan
- HTTP API → Scan history and jobs: manages jobs
- Scan orchestrator → Target validation: validates target
- Scan orchestrator → Crawl and render: crawls pages
- Scan orchestrator → Technology fingerprinting: identifies technologies
- Scan orchestrator → Verification checks: runs checks
- Scan orchestrator → Template funnel: selects templates
- Scan orchestrator → Passive detection: runs detection
- Scan orchestrator → Active probing: probes parameters
- Scan orchestrator → Asset modules: enumerates assets
- Scan orchestrator → TLS and DNS checks: checks network
- Scan orchestrator → Vulnerability intelligence: correlates findings
- Scan orchestrator → Fingerprint rules: takes snapshot
- Scan orchestrator → Findings and evidence: aggregates results
- Scan orchestrator → Scan history and jobs: persists history
- Scanned target → Target validation: provides target
- Source taint audit → Evidence attack chain: builds evidence chain
- Findings and evidence → HTTP API: serves reports
- HTTP API → Browser user: returns results
