# kamaleshvelan001-boop/url-risk-scanner architecture

> Architecture diagram of the GitHub repository kamaleshvelan001-boop/url-risk-scanner, 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/kamaleshvelan001-boop/url-risk-scanner
- Repository: https://github.com/kamaleshvelan001-boop/url-risk-scanner

## Overview

URL Risk Scanner is an offline browser app for inspecting a link before opening it. A user enters or selects a URL, the scanner parses its structure, applies transparent security rules, and produces a SAFE, REVIEW, or SUSPICIOUS verdict with anatomy and explanations. The README documents these product capabilities; the sampled scanner excerpt confirms browser event wiring, URL parsing, rule behavior, and verdict generation. The excerpt is partial, so some internal handoffs are documented rather than verified in the shown code.

Main entry points: [`scanner.js`](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js) (Verdict engine), [`index.html`](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/index.html) (Scanner UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Browser interface"]
  node_webui["Scanner UI<br/>[index.html]"]
end

subgraph group_analysis["URL analysis"]
  node_coordinator["Scan coordinator<br/>[scanner.js]"]
  node_parser["URL parser<br/>[scanner.js]"]
  node_rules["Security rules<br/>[scanner.js]"]
  node_verdict["Verdict engine<br/>[scanner.js]"]
end

subgraph group_results["Scan results"]
  node_anatomy["URL anatomy<br/>[scanner.js]"]
  node_explanations["Rule explanations<br/>[scanner.js]"]
end

node_user(("Link inspector"))

node_user -->|"enters URL"| node_webui
node_webui -->|"triggers scan"| node_coordinator
node_coordinator -.->|"parses URL"| node_parser
node_parser -.->|"provides structure"| node_rules
node_rules -->|"generates verdict"| node_verdict
node_verdict -.->|"shows breakdown"| node_anatomy
node_verdict -.->|"shows findings"| node_explanations

click node_webui "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/index.html"
click node_coordinator "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js"
click node_parser "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js"
click node_rules "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js"
click node_verdict "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js"
click node_anatomy "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js"
click node_explanations "https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.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_webui toneBlue
class node_coordinator,node_parser,node_rules,node_verdict toneAmber
class node_anatomy,node_explanations toneMint
class node_user toneIndigo
```

## Components

### Browser interface

- [Scanner UI](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/index.html): `index.html`

### URL analysis

- [Scan coordinator](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js): `scanner.js`
- [URL parser](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js): `scanner.js`
- [Security rules](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js): `scanner.js`
- [Verdict engine](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js): `scanner.js`

### Scan results

- [URL anatomy](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js): `scanner.js`
- [Rule explanations](https://github.com/kamaleshvelan001-boop/url-risk-scanner/blob/main/scanner.js): `scanner.js`

### Other components

- **Link inspector**

## Connections

- Link inspector → Scanner UI: enters URL (evidence: `README.md`)
- Scanner UI → Scan coordinator: triggers scan (evidence: `scanner.js`)
- Scan coordinator → URL parser: parses URL (evidence: `scanner.js`)
- URL parser → Security rules: provides structure (evidence: `scanner.js`)
- Security rules → Verdict engine: generates verdict (evidence: `scanner.js`)
- Verdict engine → URL anatomy: shows breakdown (evidence: `README.md`)
- Verdict engine → Rule explanations: shows findings (evidence: `README.md`)
