# dailymycode/phishguardianai architecture

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

- Interactive diagram: https://gitdiagram.com/dailymycode/phishguardianai
- Repository: https://github.com/dailymycode/phishguardianai

## Overview

PhishGuardian is a small Streamlit app for assessing email phishing risk. A user enters email text or uploads a screenshot; the app optionally extracts screenshot text with OCR, sends the resulting text to Gemini, and displays its assessment. The screenshot/OCR route is optional. The README describes risk percentages, suspicious expressions, and safety recommendations; the sampled prompt requests these in Gemini’s response. The implementation is contained in app.py, so the diagram separates its runtime responsibilities without implying separate modules.

Main entry points: [`app.py`](https://github.com/dailymycode/phishguardianai/blob/main/app.py) (Streamlit interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_interface["Streamlit interface<br/>[app.py]"]
node_ocr["OCR extraction<br/>[app.py]"]
node_tesseract["Tesseract OCR"]
node_analysis["Email analysis<br/>[app.py]"]
node_gemini["Gemini model"]

node_user -->|"enters text or uploads image"| node_interface
node_interface -.->|"extracts screenshot text"| node_ocr
node_ocr -.->|"requests OCR"| node_tesseract
node_interface -->|"submits email text"| node_analysis
node_analysis -->|"requests assessment"| node_gemini
node_gemini -->|"returns assessment"| node_analysis
node_analysis -->|"returns result"| node_interface
node_interface -->|"displays assessment"| node_user

click node_interface "https://github.com/dailymycode/phishguardianai/blob/main/app.py"
click node_ocr "https://github.com/dailymycode/phishguardianai/blob/main/app.py"
click node_analysis "https://github.com/dailymycode/phishguardianai/blob/main/app.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_user toneBlue
class node_interface,node_ocr,node_analysis toneTeal
class node_tesseract,node_gemini toneIndigo
```

## Components

### Other components

- **User**
- [Streamlit interface](https://github.com/dailymycode/phishguardianai/blob/main/app.py): `app.py`
- [OCR extraction](https://github.com/dailymycode/phishguardianai/blob/main/app.py): `app.py`
- **Tesseract OCR**
- [Email analysis](https://github.com/dailymycode/phishguardianai/blob/main/app.py): `app.py`
- **Gemini model**

## Connections

- User → Streamlit interface: enters text or uploads image
- Streamlit interface → OCR extraction: extracts screenshot text
- OCR extraction → Tesseract OCR: requests OCR
- Streamlit interface → Email analysis: submits email text
- Email analysis → Gemini model: requests assessment
- Gemini model → Email analysis: returns assessment
- Email analysis → Streamlit interface: returns result
- Streamlit interface → User: displays assessment
