# codejay411/phishing-website-detection-system architecture

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

- Interactive diagram: https://gitdiagram.com/codejay411/phishing-website-detection-system
- Repository: https://github.com/codejay411/phishing-website-detection-system

## Overview

This is a Flask-based phishing-URL detection web app. A visitor submits a URL; the app removes a common scheme and www prefix, vectorizes the cleaned text, predicts a label, and renders a human-readable result. The checked-in model and vectorizer are loaded at startup. The repository also includes a dataset and notebooks suggesting model-development work, but their contents were not sampled, so their roles and connections to the runtime are not asserted.

Main entry points: [`app.py`](https://github.com/codejay411/phishing-website-detection-system/blob/main/app.py) (Flask request handler), [`templates/index.html`](https://github.com/codejay411/phishing-website-detection-system/blob/main/templates/index.html) (Result rendering), [`vectorizer.pkl`](https://github.com/codejay411/phishing-website-detection-system/blob/main/vectorizer.pkl) (Text vectorizer), [`phishing.pkl`](https://github.com/codejay411/phishing-website-detection-system/blob/main/phishing.pkl) (Phishing classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_app["Flask request handler<br/>[app.py]"]
  node_url_cleanup["URL cleanup<br/>[app.py]"]
  node_result_render["Result rendering<br/>[index.html]"]
end

subgraph group_artifacts["Detection artifacts"]
  node_vectorizer["Text vectorizer<br/>[vectorizer.pkl]"]
  node_phishing_model["Phishing classifier<br/>[phishing.pkl]"]
  node_mnb_model["MNB model artifact<br/>[phishing_mnb.pkl]"]
end

subgraph group_development["Model development"]
  node_training_dataset[("URL dataset")]
  node_detection_notebook["Detection notebook"]
  node_word2vec_notebook["Word2Vec notebook<br/>[word2vec.ipynb]"]
end

node_visitor(("Visitor"))

node_visitor -->|"submits URL"| node_web_app
node_web_app -->|"cleans URL"| node_url_cleanup
node_web_app -->|"transforms URL"| node_vectorizer
node_web_app -->|"predicts label"| node_phishing_model
node_web_app -->|"renders result"| node_result_render

click node_web_app "https://github.com/codejay411/phishing-website-detection-system/blob/main/app.py"
click node_url_cleanup "https://github.com/codejay411/phishing-website-detection-system/blob/main/app.py"
click node_vectorizer "https://github.com/codejay411/phishing-website-detection-system/blob/main/vectorizer.pkl"
click node_phishing_model "https://github.com/codejay411/phishing-website-detection-system/blob/main/phishing.pkl"
click node_result_render "https://github.com/codejay411/phishing-website-detection-system/blob/main/templates/index.html"
click node_training_dataset "https://github.com/codejay411/phishing-website-detection-system/blob/main/Dataset/phishing_site_urls.csv"
click node_detection_notebook "https://github.com/codejay411/phishing-website-detection-system/blob/main/Phishing%20website%20detection%20system.ipynb"
click node_word2vec_notebook "https://github.com/codejay411/phishing-website-detection-system/blob/main/word2vec.ipynb"
click node_mnb_model "https://github.com/codejay411/phishing-website-detection-system/blob/main/phishing_mnb.pkl"

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_web_app,node_url_cleanup,node_result_render toneBlue
class node_vectorizer,node_phishing_model,node_mnb_model toneAmber
class node_training_dataset,node_detection_notebook,node_word2vec_notebook toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [Flask request handler](https://github.com/codejay411/phishing-website-detection-system/blob/main/app.py): `app.py`
- [URL cleanup](https://github.com/codejay411/phishing-website-detection-system/blob/main/app.py): `app.py`
- [Result rendering](https://github.com/codejay411/phishing-website-detection-system/blob/main/templates/index.html): `templates/index.html`

### Detection artifacts

- [Text vectorizer](https://github.com/codejay411/phishing-website-detection-system/blob/main/vectorizer.pkl): `vectorizer.pkl`
- [Phishing classifier](https://github.com/codejay411/phishing-website-detection-system/blob/main/phishing.pkl): `phishing.pkl`
- [MNB model artifact](https://github.com/codejay411/phishing-website-detection-system/blob/main/phishing_mnb.pkl): `phishing_mnb.pkl`

### Model development

- [URL dataset](https://github.com/codejay411/phishing-website-detection-system/blob/main/Dataset/phishing_site_urls.csv): `Dataset/phishing_site_urls.csv`
- [Detection notebook](https://github.com/codejay411/phishing-website-detection-system/blob/main/Phishing%20website%20detection%20system.ipynb): `Phishing website detection system.ipynb`
- [Word2Vec notebook](https://github.com/codejay411/phishing-website-detection-system/blob/main/word2vec.ipynb): `word2vec.ipynb`

### Other components

- **Visitor**

## Connections

- Visitor → Flask request handler: submits URL (evidence: `app.py`)
- Flask request handler → URL cleanup: cleans URL (evidence: `app.py`)
- Flask request handler → Text vectorizer: transforms URL (evidence: `app.py`)
- Flask request handler → Phishing classifier: predicts label (evidence: `app.py`)
- Flask request handler → Result rendering: renders result (evidence: `app.py`)
