# rahulsah641/relaydrop architecture

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

- Interactive diagram: https://gitdiagram.com/rahulsah641/relaydrop
- Repository: https://github.com/rahulsah641/relaydrop

## Overview

RelayDrop is a temporary file-sharing service: a sender prepares a transfer, uploads files, and shares a code or link; a recipient resolves it and downloads files or a ZIP. The browser UI also supports transfer history and revocation, support tickets, and an operator inbox. The Flask API uses shared helpers for SQLite, validation, and file storage, plus QR and barcode generators. Relationships for several unsampled features are based on the README’s endpoint descriptions; the excerpts do not expose every handler or storage operation.

Main entry points: [`frontend/js/app.js`](https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js) (Sharing UI), [`backend/relaydrop/core.py`](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/core.py) (Shared core helpers), [`backend/relaydrop/api.py`](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py) (Transfer publishing), [`backend/relaydrop/barcode128.py`](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/barcode128.py) (Barcode generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser experience"]
  node_webui["Sharing UI<br/>[app.js]"]
  node_ticketui["Support forms<br/>[app.js]"]
  node_adminui["Inbox UI<br/>[app.js]"]
end

subgraph group_transfers["Transfer service"]
  node_session["Sender session<br/>[api.py]"]
  node_publish["Transfer publishing<br/>[api.py]"]
  node_history["History and revoke<br/>[api.py]"]
  node_receive["Receive and download<br/>[api.py]"]
end

subgraph group_support["Support operations"]
  node_tickets["Ticket handling<br/>[api.py]"]
  node_inbox["Operator ticket inbox<br/>[api.py]"]
end

subgraph group_platform["Persistence and codes"]
  node_core["Shared core helpers<br/>[core.py]"]
  node_sqlite[("SQLite database<br/>[relaydrop.db]")]
  node_filestore[("Uploaded files")]
  node_qr["QR generation<br/>[qr.py]"]
  node_barcode["Barcode generation<br/>[barcode128.py]"]
end

node_sender(("Sender"))
node_recipient(("Recipient"))
node_operator(("Operator"))

node_sender -->|"uses"| node_webui
node_webui -->|"requests token"| node_session
node_webui -->|"creates and uploads"| node_publish
node_webui -->|"lists and revokes"| node_history
node_recipient -->|"uses"| node_webui
node_webui -->|"resolves and downloads"| node_receive
node_sender -->|"submits request"| node_ticketui
node_ticketui -->|"creates or checks"| node_tickets
node_operator -->|"uses"| node_adminui
node_adminui -->|"authenticates and manages"| node_inbox
node_publish -->|"uses helpers"| node_core
node_history -->|"uses helpers"| node_core
node_receive -->|"uses helpers"| node_core
node_tickets -->|"uses helpers"| node_core
node_inbox -->|"uses helpers"| node_core
node_core -->|"reads and writes"| node_sqlite
node_core -.->|"stores file objects"| node_filestore
node_webui -->|"requests image"| node_qr
node_webui -->|"requests image"| node_barcode
node_publish -.->|"generates codes"| node_qr
node_publish -.->|"generates codes"| node_barcode
node_barcode -->|"uses PNG renderer"| node_qr

click node_webui "https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js"
click node_ticketui "https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js"
click node_adminui "https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js"
click node_session "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py"
click node_publish "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py"
click node_history "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py"
click node_receive "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py"
click node_tickets "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py"
click node_inbox "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py"
click node_core "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/core.py"
click node_sqlite "https://github.com/rahulsah641/relaydrop/blob/main/backend/data/relaydrop.db"
click node_filestore "https://github.com/rahulsah641/relaydrop/tree/main/backend/data/files"
click node_qr "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/qr.py"
click node_barcode "https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/barcode128.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_webui,node_ticketui,node_adminui toneBlue
class node_session,node_publish,node_history,node_receive toneAmber
class node_tickets,node_inbox toneMint
class node_core,node_sqlite,node_filestore,node_qr,node_barcode toneRose
class node_sender,node_recipient,node_operator toneIndigo
```

## Components

### Browser experience

- [Sharing UI](https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Support forms](https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Inbox UI](https://github.com/rahulsah641/relaydrop/blob/main/frontend/js/app.js): `frontend/js/app.js`

### Transfer service

- [Sender session](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py): `backend/relaydrop/api.py`
- [Transfer publishing](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py): `backend/relaydrop/api.py`
- [History and revoke](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py): `backend/relaydrop/api.py`
- [Receive and download](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py): `backend/relaydrop/api.py`

### Support operations

- [Ticket handling](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py): `backend/relaydrop/api.py`
- [Operator ticket inbox](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/api.py): `backend/relaydrop/api.py`

### Persistence and codes

- [Shared core helpers](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/core.py): `backend/relaydrop/core.py`
- [SQLite database](https://github.com/rahulsah641/relaydrop/blob/main/backend/data/relaydrop.db): `backend/data/relaydrop.db`
- [Uploaded files](https://github.com/rahulsah641/relaydrop/tree/main/backend/data/files): `backend/data/files`
- [QR generation](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/qr.py): `backend/relaydrop/qr.py`
- [Barcode generation](https://github.com/rahulsah641/relaydrop/blob/main/backend/relaydrop/barcode128.py): `backend/relaydrop/barcode128.py`

### Other components

- **Sender**
- **Recipient**
- **Operator**

## Connections

- Sender → Sharing UI: uses (evidence: `README.md`)
- Sharing UI → Sender session: requests token
- Sharing UI → Transfer publishing: creates and uploads (evidence: `frontend/js/app.js`)
- Sharing UI → History and revoke: lists and revokes (evidence: `README.md`)
- Recipient → Sharing UI: uses (evidence: `README.md`)
- Sharing UI → Receive and download: resolves and downloads (evidence: `README.md`)
- Sender → Support forms: submits request (evidence: `README.md`)
- Support forms → Ticket handling: creates or checks (evidence: `frontend/js/app.js`)
- Operator → Inbox UI: uses (evidence: `README.md`)
- Inbox UI → Operator ticket inbox: authenticates and manages (evidence: `frontend/js/app.js`)
- Transfer publishing → Shared core helpers: uses helpers (evidence: `backend/relaydrop/api.py`)
- History and revoke → Shared core helpers: uses helpers (evidence: `backend/relaydrop/api.py`)
- Receive and download → Shared core helpers: uses helpers (evidence: `backend/relaydrop/api.py`)
- Ticket handling → Shared core helpers: uses helpers (evidence: `backend/relaydrop/api.py`)
- Operator ticket inbox → Shared core helpers: uses helpers (evidence: `backend/relaydrop/api.py`)
- Shared core helpers → SQLite database: reads and writes (evidence: `backend/relaydrop/core.py`)
- Shared core helpers → Uploaded files: stores file objects
- Sharing UI → QR generation: requests image (evidence: `README.md`)
- Sharing UI → Barcode generation: requests image (evidence: `README.md`)
- Transfer publishing → QR generation: generates codes (evidence: `backend/relaydrop/api.py`)
- Transfer publishing → Barcode generation: generates codes (evidence: `backend/relaydrop/api.py`)
- Barcode generation → QR generation: uses PNG renderer (evidence: `backend/relaydrop/barcode128.py`)
