# sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system architecture

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

- Interactive diagram: https://gitdiagram.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system
- Repository: https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system

## Overview

This is a Flask-based phishing and scam-analysis application, with web pages and a Chrome extension as user-facing surfaces. The visible workflow accepts an input, routes it through a specialized detector, and returns a risk assessment; URL checks are also reused by SMS and email analysis. Other substantial detector branches include browser behavior and vishing audio. SQLite stores scan records. The excerpts do not show all route wiring or the QR/social implementations, so those connections are omitted; training modules are represented separately from request-time analysis.

Main entry points: [`app.py`](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/app.py) (Flask routes), [`modules/url_service.py`](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/url_service.py) (URL analysis), [`modules/browser.py`](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/browser.py) (Browser analysis), [`modules/sms_service.py`](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/sms_service.py) (SMS analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Flask routes<br/>[app.py]"]
  node_extension["Chrome extension<br/>[background.js]"]
end

subgraph group_detectors["Detection services"]
  node_url["URL analysis<br/>[url_service.py]"]
  node_sms["SMS analysis<br/>[sms_service.py]"]
  node_email["Email analysis<br/>[email.py]"]
  node_browser["Browser analysis<br/>[browser.py]"]
  node_vishing["Vishing analysis<br/>[vishing_service.py]"]
end

subgraph group_signals["Shared analysis"]
  node_features["SMS features<br/>[sms_features.py]"]
  node_checks["Phishing checks<br/>[phishing_checks.py]"]
  node_browsermodel["Screenshot model<br/>[browser_model.py]"]
end

subgraph group_state["Scan history"]
  node_database[("SQLite scan history<br/>[db_helper.py]")]
end

subgraph group_training["Model training"]
  node_smsmodel["SMS model training<br/>[train_sms_model.py]"]
  node_unified["Unified model training<br/>[train_model.py]"]
end

node_user(("User"))

node_user -->|"submits scan"| node_app
node_app -->|"routes URL"| node_url
node_app -->|"routes SMS"| node_sms
node_app -.->|"dispatches email"| node_email
node_app -.->|"dispatches browser"| node_browser
node_app -.->|"dispatches audio"| node_vishing
node_sms -->|"extracts features"| node_features
node_sms -->|"checks embedded URLs"| node_url
node_email -->|"scans extracted URLs"| node_url
node_url -->|"runs risk checks"| node_checks
node_browser -->|"classifies screenshot"| node_browsermodel
node_browser -->|"checks page URL"| node_url
node_browser -->|"runs threat checks"| node_checks
node_app -->|"logs SMS result"| node_database
node_smsmodel -->|"uses features"| node_features
node_unified -->|"uses SMS features"| node_features

click node_app "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/app.py"
click node_extension "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/browser_extension/background.js"
click node_url "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/url_service.py"
click node_sms "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/sms_service.py"
click node_email "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/email.py"
click node_browser "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/browser.py"
click node_vishing "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/vishing_service.py"
click node_features "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/sms_features.py"
click node_checks "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/phishing_checks.py"
click node_browsermodel "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/browser_model.py"
click node_database "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/database/db_helper.py"
click node_smsmodel "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/train_sms_model.py"
click node_unified "https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/train_model.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_app,node_extension,node_user toneBlue
class node_url,node_sms,node_email,node_browser,node_vishing toneAmber
class node_features,node_checks,node_browsermodel toneMint
class node_database toneRose
class node_smsmodel,node_unified toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/app.py): `app.py`
- [Chrome extension](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/browser_extension/background.js): `browser_extension/background.js`

### Detection services

- [URL analysis](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/url_service.py): `modules/url_service.py`
- [SMS analysis](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/sms_service.py): `modules/sms_service.py`
- [Email analysis](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/email.py): `modules/email.py`
- [Browser analysis](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/browser.py): `modules/browser.py`
- [Vishing analysis](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/vishing_service.py): `modules/vishing_service.py`

### Shared analysis

- [SMS features](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/sms_features.py): `modules/sms_features.py`
- [Phishing checks](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/phishing_checks.py): `modules/phishing_checks.py`
- [Screenshot model](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/browser_model.py): `modules/browser_model.py`

### Scan history

- [SQLite scan history](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/database/db_helper.py): `database/db_helper.py`

### Model training

- [SMS model training](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/modules/train_sms_model.py): `modules/train_sms_model.py`
- [Unified model training](https://github.com/sailajapalaparthi05/ai-based-multi-modal-phishing-detection-system/blob/main/train_model.py): `train_model.py`

### Other components

- **User**

## Connections

- User → Flask routes: submits scan (evidence: `app.py`)
- Flask routes → URL analysis: routes URL (evidence: `app.py`)
- Flask routes → SMS analysis: routes SMS (evidence: `app.py`)
- Flask routes → Email analysis: dispatches email (evidence: `app.py`)
- Flask routes → Browser analysis: dispatches browser (evidence: `app.py`)
- Flask routes → Vishing analysis: dispatches audio (evidence: `app.py`)
- SMS analysis → SMS features: extracts features (evidence: `modules/sms_service.py`)
- SMS analysis → URL analysis: checks embedded URLs (evidence: `modules/sms_service.py`)
- Email analysis → URL analysis: scans extracted URLs (evidence: `modules/email.py`)
- URL analysis → Phishing checks: runs risk checks (evidence: `modules/url_service.py`)
- Browser analysis → Screenshot model: classifies screenshot (evidence: `modules/browser.py`)
- Browser analysis → URL analysis: checks page URL (evidence: `modules/browser.py`)
- Browser analysis → Phishing checks: runs threat checks (evidence: `modules/browser.py`)
- Flask routes → SQLite scan history: logs SMS result (evidence: `app.py`)
- SMS model training → SMS features: uses features (evidence: `modules/train_sms_model.py`)
- Unified model training → SMS features: uses SMS features (evidence: `train_model.py`)
