# tanveerdasmanikpuri-afk/phishing_url_detector architecture

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

- Interactive diagram: https://gitdiagram.com/tanveerdasmanikpuri-afk/phishing_url_detector
- Repository: https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector

## Overview

Phishing URL Detector is a browser-based, client-side tool: a user submits a URL, the app normalizes and parses it, extracts domain features, evaluates heuristic and typosquatting signals, calculates a capped risk score and verdict, then displays findings. Invalid URLs produce a validation error. The core runtime is concentrated in app.js; its excerpts show brand data, analysis logic, event handling, and result rendering. The README documents the pipeline, but omitted source sections limit confirmation of some internal call details. No network services or persistent stores are part of the documented product.

Main entry points: [`app.js`](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js) (Normalize & Parse)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_ui["Input &amp; Controls<br/>[app.js]"]
  node_results["Findings Display<br/>[app.js]"]
  node_validation["Validation Error<br/>[app.js]"]
end

subgraph group_analysis["URL Analysis"]
  node_parse["Normalize &amp; Parse<br/>[app.js]"]
  node_features["URL Features<br/>[app.js]"]
end

subgraph group_assessment["Risk Assessment"]
  node_heuristics["Heuristic Checks<br/>[app.js]"]
  node_typosquatting["Brand Matching<br/>[app.js]"]
  node_verdict["Score &amp; Verdict<br/>[app.js]"]
end

node_user(("User"))

node_user -->|"submits URL"| node_ui
node_ui -->|"starts analysis"| node_parse
node_parse -->|"extracts components"| node_features
node_parse -->|"rejects invalid URL"| node_validation
node_features -->|"evaluates indicators"| node_heuristics
node_features -->|"checks brand similarity"| node_typosquatting
node_heuristics -->|"contributes score"| node_verdict
node_typosquatting -->|"contributes score"| node_verdict
node_verdict -->|"updates results"| node_results

click node_ui "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_parse "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_features "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_heuristics "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_typosquatting "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_verdict "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_results "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js"
click node_validation "https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.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_ui,node_results,node_validation,node_user toneBlue
class node_parse,node_features toneAmber
class node_heuristics,node_typosquatting,node_verdict toneMint
```

## Components

### User Interface

- [Input & Controls](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`
- [Findings Display](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`
- [Validation Error](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`

### URL Analysis

- [Normalize & Parse](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`
- [URL Features](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`

### Risk Assessment

- [Heuristic Checks](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`
- [Brand Matching](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`
- [Score & Verdict](https://github.com/tanveerdasmanikpuri-afk/phishing_url_detector/blob/main/app.js): `app.js`

### Other components

- **User**

## Connections

- User → Input & Controls: submits URL (evidence: `README.md`)
- Input & Controls → Normalize & Parse: starts analysis (evidence: `app.js`)
- Normalize & Parse → URL Features: extracts components (evidence: `README.md`)
- Normalize & Parse → Validation Error: rejects invalid URL (evidence: `README.md`)
- URL Features → Heuristic Checks: evaluates indicators (evidence: `README.md`)
- URL Features → Brand Matching: checks brand similarity (evidence: `README.md`)
- Heuristic Checks → Score & Verdict: contributes score (evidence: `README.md`)
- Brand Matching → Score & Verdict: contributes score (evidence: `README.md`)
- Score & Verdict → Findings Display: updates results (evidence: `README.md`)
