# ragua7065/linkqr architecture

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

- Interactive diagram: https://gitdiagram.com/ragua7065/linkqr
- Repository: https://github.com/ragua7065/linkqr

## Overview

This is a Flask URL-shortening application. Users register or log in, then manage their own shortened URLs; they can follow a short code to its destination or download a QR-code image. The sampled routes show authentication, URL creation and lookup, per-user listing and clearing, and QR generation. SQLite is configured through Flask-SQLAlchemy. The README is empty, so the diagram reflects the sampled source; templates are represented only by their listed directory because individual template files are not shown.

Main entry points: [`app/routes/dash.py`](https://github.com/ragua7065/linkqr/blob/main/app/routes/dash.py) (Dashboard and URL routes), [`app/routes/auth.py`](https://github.com/ragua7065/linkqr/blob/main/app/routes/auth.py) (Authentication routes), [`app/__init__.py`](https://github.com/ragua7065/linkqr/blob/main/app/__init__.py) (SQLite database), [`app/models.py`](https://github.com/ragua7065/linkqr/blob/main/app/models.py) (Account and URL models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_factory["App factory<br/>[__init__.py]"]
  node_launcher["Application startup<br/>[run.py]"]
  node_schemas["Account and URL models<br/>[models.py]"]
  node_sqlite[("SQLite database<br/>[__init__.py]")]
  node_templates["Page templates"]
end

subgraph group_identity["User identity"]
  node_auth["Authentication routes<br/>[auth.py]"]
end

subgraph group_shortlinks["Short links"]
  node_dash["Dashboard and URL routes<br/>[dash.py]"]
  node_qr["QR-code library"]
end

node_visitor(("Browser user"))

node_visitor -->|"submits credentials"| node_auth
node_auth -->|"queries accounts"| node_schemas
node_auth -->|"saves accounts"| node_sqlite
node_auth -->|"renders login pages"| node_templates
node_auth -->|"redirects after login"| node_dash
node_visitor -->|"requests short-link actions"| node_dash
node_dash -->|"queries and creates URLs"| node_schemas
node_dash -->|"commits URL changes"| node_sqlite
node_dash -->|"renders dashboard"| node_templates
node_dash -->|"generates QR image"| node_qr
node_dash -->|"redirects or sends image"| node_visitor
node_launcher -->|"creates app"| node_factory
node_launcher -->|"creates tables"| node_sqlite
node_factory -->|"registers blueprint"| node_auth
node_factory -->|"registers blueprint"| node_dash
node_factory -->|"configures database"| node_sqlite
node_schemas -->|"defines ORM models"| node_sqlite

click node_factory "https://github.com/ragua7065/linkqr/blob/main/app/__init__.py"
click node_launcher "https://github.com/ragua7065/linkqr/blob/main/run.py"
click node_auth "https://github.com/ragua7065/linkqr/blob/main/app/routes/auth.py"
click node_dash "https://github.com/ragua7065/linkqr/blob/main/app/routes/dash.py"
click node_schemas "https://github.com/ragua7065/linkqr/blob/main/app/models.py"
click node_sqlite "https://github.com/ragua7065/linkqr/blob/main/app/__init__.py"
click node_templates "https://github.com/ragua7065/linkqr/tree/main/app/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_factory,node_launcher,node_schemas,node_sqlite,node_templates,node_visitor toneBlue
class node_auth toneAmber
class node_dash,node_qr toneMint
```

## Components

### Web application

- [App factory](https://github.com/ragua7065/linkqr/blob/main/app/__init__.py): `app/__init__.py`
- [Application startup](https://github.com/ragua7065/linkqr/blob/main/run.py): `run.py`
- [Account and URL models](https://github.com/ragua7065/linkqr/blob/main/app/models.py): `app/models.py`
- [SQLite database](https://github.com/ragua7065/linkqr/blob/main/app/__init__.py): `app/__init__.py`
- [Page templates](https://github.com/ragua7065/linkqr/tree/main/app/templates): `app/templates`

### User identity

- [Authentication routes](https://github.com/ragua7065/linkqr/blob/main/app/routes/auth.py): `app/routes/auth.py`

### Short links

- [Dashboard and URL routes](https://github.com/ragua7065/linkqr/blob/main/app/routes/dash.py): `app/routes/dash.py`
- **QR-code library**

### Other components

- **Browser user**

## Connections

- Browser user → Authentication routes: submits credentials (evidence: `app/routes/auth.py`)
- Authentication routes → Account and URL models: queries accounts (evidence: `app/routes/auth.py`)
- Authentication routes → SQLite database: saves accounts (evidence: `app/routes/auth.py`)
- Authentication routes → Page templates: renders login pages (evidence: `app/routes/auth.py`)
- Authentication routes → Dashboard and URL routes: redirects after login (evidence: `app/routes/auth.py`)
- Browser user → Dashboard and URL routes: requests short-link actions (evidence: `app/routes/dash.py`)
- Dashboard and URL routes → Account and URL models: queries and creates URLs (evidence: `app/routes/dash.py`)
- Dashboard and URL routes → SQLite database: commits URL changes (evidence: `app/routes/dash.py`)
- Dashboard and URL routes → Page templates: renders dashboard (evidence: `app/routes/dash.py`)
- Dashboard and URL routes → QR-code library: generates QR image (evidence: `app/routes/dash.py`)
- Dashboard and URL routes → Browser user: redirects or sends image (evidence: `app/routes/dash.py`)
- Application startup → App factory: creates app (evidence: `run.py`)
- Application startup → SQLite database: creates tables (evidence: `run.py`)
- App factory → Authentication routes: registers blueprint (evidence: `app/__init__.py`)
- App factory → Dashboard and URL routes: registers blueprint (evidence: `app/__init__.py`)
- App factory → SQLite database: configures database (evidence: `app/__init__.py`)
- Account and URL models → SQLite database: defines ORM models (evidence: `app/models.py`)
