# shaik-nazeer261/prm architecture

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

- Interactive diagram: https://gitdiagram.com/shaik-nazeer261/prm
- Repository: https://github.com/shaik-nazeer261/prm

## Overview

This is a Flask application for authenticated personal notes and file management. Users register or log in, then create, search, view, delete, and export notes, or upload, view, download, and delete files. Account confirmation and password-recovery support are also indicated by the application’s modules and templates, though their full route implementations were not sampled. The shown routes execute in app.py and access MySQL directly; token signing and SMTP email are helper integrations. Dashed links mark template and account flows whose wiring is not visible in the excerpts.

Main entry points: [`app.py`](https://github.com/shaik-nazeer261/prm/blob/main/app.py) (Authentication routes), [`templates`](https://github.com/shaik-nazeer261/prm/tree/main/templates) (Page templates), [`stoken.py`](https://github.com/shaik-nazeer261/prm/blob/main/stoken.py) (Token signing), [`cmail.py`](https://github.com/shaik-nazeer261/prm/blob/main/cmail.py) (Email sender)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Accounts"]
  node_auth["Authentication routes<br/>[app.py]"]
  node_accountflows["Account recovery<br/>[app.py]"]
  node_token["Token signing<br/>[stoken.py]"]
  node_keys["Signing secrets<br/>[key.py]"]
end

subgraph group_notes["Notes"]
  node_notes["Notes workflows<br/>[app.py]"]
  node_export["Notes export<br/>[app.py]"]
end

subgraph group_files["Files"]
  node_files["File workflows<br/>[app.py]"]
end

subgraph group_support["Application support"]
  node_mysql[("MySQL database")]
  node_email["SMTP email"]
  node_mailer["Email sender<br/>[cmail.py]"]
  node_templates["Page templates"]
end

node_visitor(("User"))

node_visitor -->|"submits credentials"| node_auth
node_auth -->|"checks accounts"| node_mysql
node_visitor -->|"manages notes"| node_notes
node_notes -->|"reads and writes"| node_mysql
node_visitor -->|"requests export"| node_export
node_export -->|"reads notes"| node_mysql
node_visitor -->|"manages files"| node_files
node_files -->|"stores and retrieves"| node_mysql
node_auth -->|"creates tokens"| node_token
node_accountflows -.->|"uses tokens"| node_token
node_token -->|"uses secret"| node_keys
node_accountflows -.->|"sends messages"| node_mailer
node_mailer -->|"sends via SMTP"| node_email
node_auth -.->|"renders pages"| node_templates
node_accountflows -.->|"renders pages"| node_templates
node_notes -->|"renders pages"| node_templates
node_files -->|"renders pages"| node_templates

click node_auth "https://github.com/shaik-nazeer261/prm/blob/main/app.py"
click node_accountflows "https://github.com/shaik-nazeer261/prm/blob/main/app.py"
click node_token "https://github.com/shaik-nazeer261/prm/blob/main/stoken.py"
click node_keys "https://github.com/shaik-nazeer261/prm/blob/main/key.py"
click node_notes "https://github.com/shaik-nazeer261/prm/blob/main/app.py"
click node_export "https://github.com/shaik-nazeer261/prm/blob/main/app.py"
click node_files "https://github.com/shaik-nazeer261/prm/blob/main/app.py"
click node_mailer "https://github.com/shaik-nazeer261/prm/blob/main/cmail.py"
click node_templates "https://github.com/shaik-nazeer261/prm/tree/main/templates"

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_auth,node_accountflows,node_token,node_keys,node_visitor toneBlue
class node_notes,node_export toneAmber
class node_files toneMint
class node_mysql,node_email,node_mailer,node_templates toneRose
```

## Components

### Accounts

- [Authentication routes](https://github.com/shaik-nazeer261/prm/blob/main/app.py): `app.py`
- [Account recovery](https://github.com/shaik-nazeer261/prm/blob/main/app.py): `app.py`
- [Token signing](https://github.com/shaik-nazeer261/prm/blob/main/stoken.py): `stoken.py`
- [Signing secrets](https://github.com/shaik-nazeer261/prm/blob/main/key.py): `key.py`

### Notes

- [Notes workflows](https://github.com/shaik-nazeer261/prm/blob/main/app.py): `app.py`
- [Notes export](https://github.com/shaik-nazeer261/prm/blob/main/app.py): `app.py`

### Files

- [File workflows](https://github.com/shaik-nazeer261/prm/blob/main/app.py): `app.py`

### Application support

- **MySQL database**
- **SMTP email**
- [Email sender](https://github.com/shaik-nazeer261/prm/blob/main/cmail.py): `cmail.py`
- [Page templates](https://github.com/shaik-nazeer261/prm/tree/main/templates): `templates`

### Other components

- **User**

## Connections

- User → Authentication routes: submits credentials (evidence: `app.py`)
- Authentication routes → MySQL database: checks accounts (evidence: `app.py`)
- User → Notes workflows: manages notes (evidence: `app.py`)
- Notes workflows → MySQL database: reads and writes (evidence: `app.py`)
- User → Notes export: requests export (evidence: `app.py`)
- Notes export → MySQL database: reads notes (evidence: `app.py`)
- User → File workflows: manages files (evidence: `app.py`)
- File workflows → MySQL database: stores and retrieves (evidence: `app.py`)
- Authentication routes → Token signing: creates tokens (evidence: `app.py`)
- Account recovery → Token signing: uses tokens (evidence: `app.py`)
- Token signing → Signing secrets: uses secret (evidence: `stoken.py`)
- Account recovery → Email sender: sends messages (evidence: `app.py`)
- Email sender → SMTP email: sends via SMTP (evidence: `cmail.py`)
- Authentication routes → Page templates: renders pages
- Account recovery → Page templates: renders pages
- Notes workflows → Page templates: renders pages (evidence: `app.py`)
- File workflows → Page templates: renders pages (evidence: `app.py`)
