# hindol-2007/phishing-url-checker architecture

> Architecture diagram of the GitHub repository hindol-2007/phishing-url-checker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hindol-2007/phishing-url-checker
- Repository: https://github.com/hindol-2007/phishing-url-checker

## Overview

Phishing URL Checker is a static, text-only URL classifier: it reads and deduplicates CSV records, applies five rules, scores each URL, and reports predictions. When valid labels are present, it also evaluates accuracy and error examples. URLs are never visited. The main workflow is visible in `src/main.py`; rule dispatch and scoring are shown in the sampled modules. The graph omits unverified relationships beyond those documented or excerpted.

Main entry points: [`src/main.py`](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py) (Main Runner), [`src/scoring.py`](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/scoring.py) (Rule Scorer), [`data/urls.csv`](https://github.com/hindol-2007/phishing-url-checker/blob/main/data/urls.csv) (URL CSV), [`src/rules.py`](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/rules.py) (Five Text Rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Input Workflow"]
  node_input_csv["URL CSV<br/>[urls.csv]"]
  node_loader["CSV Loader<br/>[main.py]"]
  node_runner["Main Runner<br/>[main.py]"]
end

subgraph group_detection["URL Detection"]
  node_scorer["Rule Scorer<br/>[scoring.py]"]
  node_rules["Five Text Rules<br/>[rules.py]"]
end

subgraph group_results["Reporting"]
  node_summary["Prediction Summary<br/>[main.py]"]
  node_evaluation["Label Evaluation<br/>[main.py]"]
  node_report_writer["CSV Report Writer<br/>[main.py]"]
  node_report_csv["Report CSV<br/>[report.csv]"]
  node_console["Console Output"]
end

node_user(("User"))

node_user -.->|"runs"| node_runner
node_runner -->|"calls"| node_loader
node_input_csv -->|"reads"| node_loader
node_loader -->|"returns records"| node_runner
node_runner -->|"scores URLs"| node_scorer
node_scorer -->|"calls checks"| node_rules
node_runner -->|"summarizes"| node_summary
node_runner -->|"writes results"| node_report_writer
node_report_writer -->|"writes CSV"| node_report_csv
node_runner -->|"evaluates labels"| node_evaluation
node_runner -->|"prints output"| node_console
node_evaluation -->|"prints metrics"| node_console

click node_input_csv "https://github.com/hindol-2007/phishing-url-checker/blob/main/data/urls.csv"
click node_loader "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py"
click node_runner "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py"
click node_scorer "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/scoring.py"
click node_rules "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/rules.py"
click node_summary "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py"
click node_evaluation "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py"
click node_report_writer "https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py"
click node_report_csv "https://github.com/hindol-2007/phishing-url-checker/blob/main/reports/report.csv"

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_input_csv,node_loader,node_runner,node_user toneBlue
class node_scorer,node_rules toneAmber
class node_summary,node_evaluation,node_report_writer,node_report_csv,node_console toneMint
```

## Components

### Input Workflow

- [URL CSV](https://github.com/hindol-2007/phishing-url-checker/blob/main/data/urls.csv): `data/urls.csv`
- [CSV Loader](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py): `src/main.py`
- [Main Runner](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py): `src/main.py`

### URL Detection

- [Rule Scorer](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/scoring.py): `src/scoring.py`
- [Five Text Rules](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/rules.py): `src/rules.py`

### Reporting

- [Prediction Summary](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py): `src/main.py`
- [Label Evaluation](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py): `src/main.py`
- [CSV Report Writer](https://github.com/hindol-2007/phishing-url-checker/blob/main/src/main.py): `src/main.py`
- [Report CSV](https://github.com/hindol-2007/phishing-url-checker/blob/main/reports/report.csv): `reports/report.csv`
- **Console Output**

### Other components

- **User**

## Connections

- User → Main Runner: runs
- Main Runner → CSV Loader: calls (evidence: `src/main.py`)
- URL CSV → CSV Loader: reads (evidence: `src/main.py`)
- CSV Loader → Main Runner: returns records (evidence: `src/main.py`)
- Main Runner → Rule Scorer: scores URLs (evidence: `src/main.py`)
- Rule Scorer → Five Text Rules: calls checks (evidence: `src/scoring.py`)
- Main Runner → Prediction Summary: summarizes (evidence: `src/main.py`)
- Main Runner → CSV Report Writer: writes results (evidence: `src/main.py`)
- CSV Report Writer → Report CSV: writes CSV (evidence: `src/main.py`)
- Main Runner → Label Evaluation: evaluates labels (evidence: `src/main.py`)
- Main Runner → Console Output: prints output (evidence: `src/main.py`)
- Label Evaluation → Console Output: prints metrics (evidence: `src/main.py`)
