# whisperedshadow/envporter architecture

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

## Overview

EnvPorter is a Flask app for account-based API-key storage and framework-specific `.env` export. The main workflow is register or log in, manage key groups and values, then select groups and a technology prefix to download an export. The graph also captures contact-email handling and public pages. Routes and model behavior are based on sampled Python source; template interactions and deployment details are not mapped beyond the README and file tree.

Main entry points: [`app.py`](https://github.com/whisperedshadow/envporter/blob/main/app.py) (Flask routes), [`database.py`](https://github.com/whisperedshadow/envporter/blob/main/database.py) (Data models), [`ourmail.py`](https://github.com/whisperedshadow/envporter/blob/main/ourmail.py) (Mail sender), [`templates`](https://github.com/whisperedshadow/envporter/tree/main/templates) (HTML views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes<br/>[app.py]"]
  node_auth["Authentication<br/>[app.py]"]
  node_keymgmt["Key management<br/>[app.py]"]
  node_envexport["Environment export<br/>[app.py]"]
  node_contact["Contact form<br/>[app.py]"]
  node_views["HTML views"]
end

subgraph group_data["Key storage"]
  node_models["Data models<br/>[database.py]"]
end

subgraph group_integrations["External services"]
  node_sqlstore[("SQL database")]
  node_mailfn["Mail sender<br/>[ourmail.py]"]
  node_mailjet["Mailjet API"]
end

node_user(("Developer"))

node_user -->|"requests routes"| node_flask
node_flask -->|"dispatches auth"| node_auth
node_flask -->|"dispatches key routes"| node_keymgmt
node_flask -->|"dispatches export"| node_envexport
node_flask -->|"dispatches contact"| node_contact
node_flask -->|"renders pages"| node_views
node_auth -->|"queries and saves"| node_models
node_keymgmt -->|"reads and writes"| node_models
node_envexport -->|"loads selected keys"| node_models
node_models -->|"persists records"| node_sqlstore
node_contact -->|"sends message"| node_mailfn
node_mailfn -->|"submits email"| node_mailjet
node_flask -->|"returns responses"| node_user

click node_flask "https://github.com/whisperedshadow/envporter/blob/main/app.py"
click node_auth "https://github.com/whisperedshadow/envporter/blob/main/app.py"
click node_keymgmt "https://github.com/whisperedshadow/envporter/blob/main/app.py"
click node_envexport "https://github.com/whisperedshadow/envporter/blob/main/app.py"
click node_contact "https://github.com/whisperedshadow/envporter/blob/main/app.py"
click node_views "https://github.com/whisperedshadow/envporter/tree/main/templates"
click node_models "https://github.com/whisperedshadow/envporter/blob/main/database.py"
click node_mailfn "https://github.com/whisperedshadow/envporter/blob/main/ourmail.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_flask,node_auth,node_keymgmt,node_envexport,node_contact,node_views toneBlue
class node_models toneAmber
class node_sqlstore,node_mailfn,node_mailjet toneMint
class node_user toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/whisperedshadow/envporter/blob/main/app.py): `app.py`
- [Authentication](https://github.com/whisperedshadow/envporter/blob/main/app.py): `app.py`
- [Key management](https://github.com/whisperedshadow/envporter/blob/main/app.py): `app.py`
- [Environment export](https://github.com/whisperedshadow/envporter/blob/main/app.py): `app.py`
- [Contact form](https://github.com/whisperedshadow/envporter/blob/main/app.py): `app.py`
- [HTML views](https://github.com/whisperedshadow/envporter/tree/main/templates): `templates`

### Key storage

- [Data models](https://github.com/whisperedshadow/envporter/blob/main/database.py): `database.py`

### External services

- **SQL database**
- [Mail sender](https://github.com/whisperedshadow/envporter/blob/main/ourmail.py): `ourmail.py`
- **Mailjet API**

### Other components

- **Developer**

## Connections

- Developer → Flask routes: requests routes
- Flask routes → Authentication: dispatches auth
- Flask routes → Key management: dispatches key routes
- Flask routes → Environment export: dispatches export
- Flask routes → Contact form: dispatches contact
- Flask routes → HTML views: renders pages
- Authentication → Data models: queries and saves
- Key management → Data models: reads and writes
- Environment export → Data models: loads selected keys
- Data models → SQL database: persists records
- Contact form → Mail sender: sends message
- Mail sender → Mailjet API: submits email
- Flask routes → Developer: returns responses
