# ariesabao/simple-pasting-with-qr-generator architecture

> Architecture diagram of the GitHub repository ariesabao/simple-pasting-with-qr-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ariesabao/simple-pasting-with-qr-generator
- Repository: https://github.com/ariesabao/simple-pasting-with-qr-generator

## Overview

spqr is a Flask-based paste-sharing application. Its visible workflow accepts paste content and metadata, stores pastes in MySQL, and retrieves paste records; the imports indicate password hashing and syntax-highlighting support. Authentication and paste handling are implemented together in main.py, so the nodes distinguish domain responsibilities without implying separate modules. The excerpts do not show complete route definitions, templates, or QR-generation code; uncertain request-flow links are therefore omitted. The README lists QR generation as a to-do, not an implemented capability.

Main entry points: [`main.py`](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py) (Flask app), [`Lib/site-packages/passlib/hash.py`](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/Lib/site-packages/passlib/hash.py) (Password hashing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Flask app<br/>[main.py]"]
end

subgraph group_paste["Paste workflow"]
  node_pasteform["Paste form<br/>[main.py]"]
  node_pastewrite["Paste creation<br/>[main.py]"]
  node_pasteload["Paste retrieval<br/>[main.py]"]
  node_mysql[("MySQL database")]
end

subgraph group_account["Accounts and rendering"]
  node_login["Login handling<br/>[main.py]"]
  node_passwords["Password hashing<br/>[hash.py]"]
  node_highlight["Syntax highlighting<br/>[main.py]"]
  node_pygments["Pygments"]
end

node_visitor(("Visitor"))

node_app -.->|"connects to"| node_mysql
node_pastewrite -->|"inserts paste"| node_mysql
node_pasteload -->|"selects paste"| node_mysql
node_login -->|"queries users"| node_mysql
node_login -->|"verifies password"| node_passwords
node_app -.->|"accepts input"| node_pasteform
node_pastewrite -.->|"uses syntax choice"| node_highlight
node_highlight -->|"uses"| node_pygments
node_visitor -.->|"submits requests"| node_app

click node_app "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py"
click node_pasteform "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py"
click node_pastewrite "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py"
click node_pasteload "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py"
click node_login "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py"
click node_passwords "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/Lib/site-packages/passlib/hash.py"
click node_highlight "https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.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 toneBlue
class node_pasteform,node_pastewrite,node_pasteload,node_mysql toneAmber
class node_login,node_passwords,node_highlight,node_pygments toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [Flask app](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py): `main.py`

### Paste workflow

- [Paste form](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py): `main.py`
- [Paste creation](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py): `main.py`
- [Paste retrieval](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py): `main.py`
- **MySQL database**

### Accounts and rendering

- [Login handling](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py): `main.py`
- [Password hashing](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/Lib/site-packages/passlib/hash.py): `Lib/site-packages/passlib/hash.py`
- [Syntax highlighting](https://github.com/ariesabao/simple-pasting-with-qr-generator/blob/master/main.py): `main.py`
- **Pygments**

### Other components

- **Visitor**

## Connections

- Flask app → MySQL database: connects to
- Paste creation → MySQL database: inserts paste (evidence: `main.py`)
- Paste retrieval → MySQL database: selects paste (evidence: `main.py`)
- Login handling → MySQL database: queries users (evidence: `main.py`)
- Login handling → Password hashing: verifies password (evidence: `main.py`)
- Flask app → Paste form: accepts input (evidence: `main.py`)
- Paste creation → Syntax highlighting: uses syntax choice (evidence: `main.py`)
- Syntax highlighting → Pygments: uses (evidence: `main.py`)
- Visitor → Flask app: submits requests
