# akash-codes93/transparentemail architecture

> Architecture diagram of the GitHub repository akash-codes93/transparentemail, 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/akash-codes93/transparentemail
- Repository: https://github.com/akash-codes93/transparentemail

## Overview

Transparent Email is a small Python library that canonicalizes email aliases to help detect duplicate accounts. A caller supplies an address to the public function, which validates and parses it, selects the first matching mailbox provider, and returns that provider’s normalized address; unsupported domains retain the parsed address. Provider rules cover Gmail, Outlook, Yahoo, and 33mail. The provider implementations use a shared editable-email helper. Yahoo’s result follows the documented limitation that its base-name address may not exist. The graph follows the sampled runtime source; no external service or persistent storage is involved.

Main entry points: [`transparentemail/src.py`](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/src.py) (Public API), [`transparentemail/services/Emails/editableEmail.py`](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/editableEmail.py) (Email editor), [`transparentemail/services/Emails/email.py`](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/email.py) (Email validation), [`transparentemail/services/gmailCom.py`](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/gmailCom.py) (Gmail rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_entry["Public API<br/>[src.py]"]
node_email["Email validation<br/>[email.py]"]
node_invalid["Invalid email error<br/>[emailException.py]"]
node_service["Provider interface<br/>[serviceEmail.py]"]
node_editable["Email editor<br/>[editableEmail.py]"]
node_gmail["Gmail rules<br/>[gmailCom.py]"]
node_outlook["Outlook rules<br/>[outlookCom.py]"]
node_yahoo["Yahoo rules<br/>[yahooCom.py]"]
node_mail33["33mail rules<br/>[www33MailCom.py]"]

node_caller -->|"calls"| node_entry
node_entry -->|"constructs"| node_email
node_email -->|"raises"| node_invalid
node_entry -->|"checks support"| node_gmail
node_entry -->|"checks support"| node_outlook
node_entry -->|"checks support"| node_yahoo
node_entry -->|"checks support"| node_mail33
node_entry -->|"normalizes if matched"| node_gmail
node_entry -->|"normalizes if matched"| node_outlook
node_entry -->|"normalizes if matched"| node_yahoo
node_entry -->|"normalizes if matched"| node_mail33
node_gmail -->|"edits address"| node_editable
node_outlook -->|"edits address"| node_editable
node_yahoo -->|"edits address"| node_editable
node_mail33 -->|"edits address"| node_editable
node_editable -->|"constructs result"| node_email
node_entry -->|"returns address"| node_caller

click node_entry "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/src.py"
click node_email "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/email.py"
click node_invalid "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/emailException.py"
click node_service "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/serviceEmail.py"
click node_editable "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/editableEmail.py"
click node_gmail "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/gmailCom.py"
click node_outlook "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/outlookCom.py"
click node_yahoo "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/yahooCom.py"
click node_mail33 "https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/www33MailCom.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_caller,node_service toneIndigo
class node_entry toneMint
class node_email,node_invalid,node_editable,node_gmail,node_outlook,node_yahoo,node_mail33 toneTeal
```

## Components

### Other components

- **Library caller**
- [Public API](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/src.py): `transparentemail/src.py`
- [Email validation](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/email.py): `transparentemail/services/Emails/email.py`
- [Invalid email error](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/emailException.py): `transparentemail/services/Emails/emailException.py`
- [Provider interface](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/serviceEmail.py): `transparentemail/services/serviceEmail.py`
- [Email editor](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/Emails/editableEmail.py): `transparentemail/services/Emails/editableEmail.py`
- [Gmail rules](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/gmailCom.py): `transparentemail/services/gmailCom.py`
- [Outlook rules](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/outlookCom.py): `transparentemail/services/outlookCom.py`
- [Yahoo rules](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/yahooCom.py): `transparentemail/services/yahooCom.py`
- [33mail rules](https://github.com/akash-codes93/transparentemail/blob/master/transparentemail/services/www33MailCom.py): `transparentemail/services/www33MailCom.py`

## Connections

- Library caller → Public API: calls
- Public API → Email validation: constructs
- Email validation → Invalid email error: raises
- Public API → Gmail rules: checks support
- Public API → Outlook rules: checks support
- Public API → Yahoo rules: checks support
- Public API → 33mail rules: checks support
- Public API → Gmail rules: normalizes if matched
- Public API → Outlook rules: normalizes if matched
- Public API → Yahoo rules: normalizes if matched
- Public API → 33mail rules: normalizes if matched
- Gmail rules → Email editor: edits address
- Outlook rules → Email editor: edits address
- Yahoo rules → Email editor: edits address
- 33mail rules → Email editor: edits address
- Email editor → Email validation: constructs result
- Public API → Library caller: returns address
