# neharoy3/myqr architecture

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

- Interactive diagram: https://gitdiagram.com/neharoy3/myqr
- Repository: https://github.com/neharoy3/myqr

## Overview

myQR is a small Streamlit app for creating branded QR-code images. Users enter text or a link, choose QR and background colors, optionally upload a logo and set its size, then generate, view, and download a PNG. The app validates empty input before encoding; high error correction and centered logo compositing support the branded result. The single source file owns the UI and processing flow, so the graph keeps these responsibilities compact. Edges are grounded in app.py; there are no separate runtime modules or persistent stores.

Main entry points: [`app.py`](https://github.com/neharoy3/myqr/blob/main/app.py) (Streamlit app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_app["Streamlit app<br/>[app.py]"]
  node_inputs["Content and options<br/>[app.py]"]
  node_validation["Input validation<br/>[app.py]"]
end

subgraph group_generation["QR generation"]
  node_qr_encoding["QR encoding<br/>[app.py]"]
  node_color_render["Color rendering<br/>[app.py]"]
  node_logo_compositing["Logo compositing<br/>[app.py]"]
end

subgraph group_output["Image output"]
  node_image_display["Image preview<br/>[app.py]"]
  node_png_download["PNG download<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"collects"| node_inputs
node_inputs -->|"checks content"| node_validation
node_validation -->|"valid input"| node_qr_encoding
node_qr_encoding -->|"renders matrix"| node_color_render
node_color_render -->|"adds optional logo"| node_logo_compositing
node_app -->|"shows image"| node_image_display
node_app -->|"offers PNG"| node_png_download

click node_app "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_inputs "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_validation "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_qr_encoding "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_color_render "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_logo_compositing "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_image_display "https://github.com/neharoy3/myqr/blob/main/app.py"
click node_png_download "https://github.com/neharoy3/myqr/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_app,node_inputs,node_validation,node_user toneBlue
class node_qr_encoding,node_color_render,node_logo_compositing toneAmber
class node_image_display,node_png_download toneMint
```

## Components

### User interface

- [Streamlit app](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`
- [Content and options](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`
- [Input validation](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`

### QR generation

- [QR encoding](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`
- [Color rendering](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`
- [Logo compositing](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`

### Image output

- [Image preview](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`
- [PNG download](https://github.com/neharoy3/myqr/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Streamlit app: uses (evidence: `app.py`)
- Streamlit app → Content and options: collects (evidence: `app.py`)
- Content and options → Input validation: checks content (evidence: `app.py`)
- Input validation → QR encoding: valid input (evidence: `app.py`)
- QR encoding → Color rendering: renders matrix (evidence: `app.py`)
- Color rendering → Logo compositing: adds optional logo (evidence: `app.py`)
- Streamlit app → Image preview: shows image (evidence: `app.py`)
- Streamlit app → PNG download: offers PNG (evidence: `app.py`)
