# banashree19/real-time-phishing-website-detection architecture

> Architecture diagram of the GitHub repository banashree19/real-time-phishing-website-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/banashree19/real-time-phishing-website-detection
- Repository: https://github.com/banashree19/real-time-phishing-website-detection

## Overview

This is a desktop phishing-URL checker: a user submits a URL, the GUI asks the application layer to extract URL features, then asks a classifier to label the URL and displays the result. Feature extraction also performs reputation lookups and can inspect page content, though page-content features are currently disabled in the sampled code. The GUI uses a Random Forest; other classifier implementations are present but are not selected by that GUI path. The source excerpts show the call structure, but not the contents or exact roles of the CSV files in the tree.

Main entry points: [`Feature_extraction.py`](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py) (Feature extraction), [`gui.py`](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/gui.py) (URL checker GUI), [`main.py`](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/main.py) (URL processing), [`trainer.py`](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/trainer.py) (Training and prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_gui["URL checker GUI<br/>[gui.py]"]
end

subgraph group_analysis["Detection workflow"]
  node_application["URL processing<br/>[main.py]"]
  node_trainer["Training and prediction<br/>[trainer.py]"]
  node_forest["Random Forest<br/>[trainer.py]"]
end

subgraph group_signals["Feature extraction"]
  node_feature_extract["Feature extraction"]
  node_url_signals["URL signals"]
  node_reputation["Reputation lookups"]
  node_page_content["Page content signals"]
end

node_user(("User"))
node_alexa["Alexa data service"]
node_safe_browsing["Safe Browsing service"]
node_geoip[("GeoIP ASN data")]

node_user -->|"submits URL"| node_gui
node_gui -->|"processes URL"| node_application
node_gui -->|"requests prediction"| node_trainer
node_application -->|"extracts features"| node_feature_extract
node_feature_extract -->|"derives signals"| node_url_signals
node_feature_extract -->|"queries reputation"| node_reputation
node_feature_extract -.->|"can inspect"| node_page_content
node_reputation -->|"queries ranks"| node_alexa
node_reputation -->|"checks URL"| node_safe_browsing
node_reputation -->|"looks up ASN"| node_geoip
node_trainer -->|"fits and predicts"| node_forest

click node_gui "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/gui.py"
click node_application "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/main.py"
click node_feature_extract "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py"
click node_url_signals "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py"
click node_reputation "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py"
click node_page_content "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py"
click node_trainer "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/trainer.py"
click node_forest "https://github.com/banashree19/real-time-phishing-website-detection/blob/master/trainer.py"

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_gui,node_user toneBlue
class node_application,node_trainer,node_forest,node_geoip toneAmber
class node_feature_extract,node_url_signals,node_reputation,node_page_content toneMint
class node_alexa,node_safe_browsing toneIndigo
```

## Components

### User interface

- [URL checker GUI](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/gui.py): `gui.py`

### Detection workflow

- [URL processing](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/main.py): `main.py`
- [Training and prediction](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/trainer.py): `trainer.py`
- [Random Forest](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/trainer.py): `trainer.py`

### Feature extraction

- [Feature extraction](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py): `Feature_extraction.py`
- [URL signals](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py): `Feature_extraction.py`
- [Reputation lookups](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py): `Feature_extraction.py`
- [Page content signals](https://github.com/banashree19/real-time-phishing-website-detection/blob/master/Feature_extraction.py): `Feature_extraction.py`

### Other components

- **User**
- **Alexa data service**
- **Safe Browsing service**
- **GeoIP ASN data**

## Connections

- User → URL checker GUI: submits URL (evidence: `README.md`)
- URL checker GUI → URL processing: processes URL (evidence: `gui.py`)
- URL checker GUI → Training and prediction: requests prediction (evidence: `gui.py`)
- URL processing → Feature extraction: extracts features (evidence: `main.py`)
- Feature extraction → URL signals: derives signals (evidence: `Feature_extraction.py`)
- Feature extraction → Reputation lookups: queries reputation (evidence: `Feature_extraction.py`)
- Feature extraction → Page content signals: can inspect (evidence: `Feature_extraction.py`)
- Reputation lookups → Alexa data service: queries ranks (evidence: `Feature_extraction.py`)
- Reputation lookups → Safe Browsing service: checks URL (evidence: `Feature_extraction.py`)
- Reputation lookups → GeoIP ASN data: looks up ASN (evidence: `Feature_extraction.py`)
- Training and prediction → Random Forest: fits and predicts (evidence: `trainer.py`)
