# aragalagovardhanreddy/phishing-url-detection architecture

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

- Interactive diagram: https://gitdiagram.com/aragalagovardhanreddy/phishing-url-detection
- Repository: https://github.com/aragalagovardhanreddy/phishing-url-detection

## Overview

The product is a phishing-URL detector: a user submits a URL through either the Streamlit interface or the documented prediction API; the Predictor extracts URL and live-page features, runs the trained model, applies safety overrides, and returns a label, confidence, and features. The README also documents the training dataset and model lifecycle, but the supplied source does not show training code. Edges reflect the README and sampled source; unsampled implementation details are not inferred.

Main entry points: [`predictor.py`](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/predictor.py) (Prediction & Overrides), [`streamlit_app.py`](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/streamlit_app.py) (Streamlit UI), [`app.py`](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/app.py) (Prediction API), [`feature_extractor.py`](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/feature_extractor.py) (Feature Extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_streamlit["Streamlit UI<br/>[streamlit_app.py]"]
  node_api["Prediction API<br/>[app.py]"]
end

subgraph group_analysis["URL Analysis"]
  node_predictor["Prediction &amp; Overrides<br/>[predictor.py]"]
  node_extractor["Feature Extraction"]
end

subgraph group_modeling["Model Assets"]
  node_pipeline["Trained Pipeline"]
  node_dataset["Phishing Dataset"]
end

node_user(("User"))
node_website["Target Website"]

node_user -->|"submits URL"| node_streamlit
node_user -->|"sends request"| node_api
node_streamlit -->|"requests prediction"| node_predictor
node_api -->|"requests prediction"| node_predictor
node_predictor -->|"extracts features"| node_extractor
node_extractor -->|"fetches page"| node_website
node_predictor -->|"loads and predicts"| node_pipeline
node_dataset -.->|"trains model"| node_pipeline
node_predictor -->|"returns result"| node_streamlit
node_predictor -->|"returns result"| node_api

click node_streamlit "https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/streamlit_app.py"
click node_api "https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/app.py"
click node_predictor "https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/predictor.py"
click node_extractor "https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/feature_extractor.py"
click node_pipeline "https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/models/phishing_decision_tree_pipeline.pkl"
click node_dataset "https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/dataset/phishing_dataset.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_streamlit,node_api,node_user toneBlue
class node_predictor,node_extractor toneAmber
class node_pipeline,node_dataset toneMint
class node_website toneIndigo
```

## Components

### User Interfaces

- [Streamlit UI](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/streamlit_app.py): `streamlit_app.py`
- [Prediction API](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/app.py): `app.py`

### URL Analysis

- [Prediction & Overrides](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/predictor.py): `predictor.py`
- [Feature Extraction](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/feature_extractor.py): `feature_extractor.py`

### Model Assets

- [Trained Pipeline](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/models/phishing_decision_tree_pipeline.pkl): `models/phishing_decision_tree_pipeline.pkl`
- [Phishing Dataset](https://github.com/aragalagovardhanreddy/phishing-url-detection/blob/main/dataset/phishing_dataset.csv): `dataset/phishing_dataset.csv`

### Other components

- **User**
- **Target Website**

## Connections

- User → Streamlit UI: submits URL (evidence: `streamlit_app.py`)
- User → Prediction API: sends request (evidence: `app.py`)
- Streamlit UI → Prediction & Overrides: requests prediction (evidence: `streamlit_app.py`)
- Prediction API → Prediction & Overrides: requests prediction (evidence: `app.py`)
- Prediction & Overrides → Feature Extraction: extracts features (evidence: `predictor.py`)
- Feature Extraction → Target Website: fetches page (evidence: `feature_extractor.py`)
- Prediction & Overrides → Trained Pipeline: loads and predicts (evidence: `predictor.py`)
- Phishing Dataset → Trained Pipeline: trains model (evidence: `README.md`)
- Prediction & Overrides → Streamlit UI: returns result (evidence: `streamlit_app.py`)
- Prediction & Overrides → Prediction API: returns result (evidence: `app.py`)
