# sanee1428/wedding-photo-upload architecture

> Architecture diagram of the GitHub repository sanee1428/wedding-photo-upload, 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/sanee1428/wedding-photo-upload
- Repository: https://github.com/sanee1428/wedding-photo-upload

## Overview

Wedding Photo Upload lets guests use event-specific QR links to upload original photos and videos to the couple’s private Google Drive. The principal flow is QR card → guest access and name check → file selection and upload → Drive storage. The README documents backend capabilities beyond the sampled excerpts; those relationships are included as documented rather than as inspected implementation details.

Main entry points: [`frontend/app.js`](https://github.com/sanee1428/wedding-photo-upload/blob/main/frontend/app.js) (Guest upload page), [`backend/Code.gs`](https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs) (Access and name checks), [`tools/make_qr_cards.py`](https://github.com/sanee1428/wedding-photo-upload/blob/main/tools/make_qr_cards.py) (QR card generator), [`frontend/config.js`](https://github.com/sanee1428/wedding-photo-upload/blob/main/frontend/config.js) (Page configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_event_setup["Event setup"]
  node_event_setup["Event links<br/>[Code.gs]"]
  node_qr_cards["QR card generator<br/>[make_qr_cards.py]"]
end

subgraph group_guest_upload["Guest upload"]
  node_page_config["Page configuration<br/>[config.js]"]
  node_upload_page["Guest upload page<br/>[app.js]"]
  node_access_checks["Access and name checks<br/>[Code.gs]"]
  node_file_validation["File validation<br/>[Code.gs]"]
  node_upload_sessions["Upload sessions<br/>[Code.gs]"]
end

subgraph group_photo_storage["Photo storage"]
  node_drive_storage[("Drive storage<br/>[Code.gs]")]
end

node_couple_admin(("Couple / admin"))
node_guest(("Guest"))
node_google_drive[("Google Drive")]

node_couple_admin -->|"configures events"| node_event_setup
node_event_setup -->|"provides links"| node_qr_cards
node_couple_admin -->|"creates cards"| node_qr_cards
node_guest -->|"scans card"| node_qr_cards
node_page_config -->|"configures page"| node_upload_page
node_upload_page -->|"requests access"| node_access_checks
node_upload_page -->|"checks name"| node_access_checks
node_access_checks -->|"returns status"| node_upload_page
node_guest -->|"selects files"| node_upload_page
node_upload_page -->|"sends file data"| node_file_validation
node_file_validation -->|"accepts valid files"| node_upload_sessions
node_upload_page -->|"sends chunks"| node_upload_sessions
node_upload_sessions -->|"saves files"| node_drive_storage
node_drive_storage -->|"writes files"| node_google_drive
node_couple_admin -->|"checks usage"| node_drive_storage

click node_event_setup "https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs"
click node_qr_cards "https://github.com/sanee1428/wedding-photo-upload/blob/main/tools/make_qr_cards.py"
click node_page_config "https://github.com/sanee1428/wedding-photo-upload/blob/main/frontend/config.js"
click node_upload_page "https://github.com/sanee1428/wedding-photo-upload/blob/main/frontend/app.js"
click node_access_checks "https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs"
click node_file_validation "https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs"
click node_upload_sessions "https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs"
click node_drive_storage "https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs"

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_event_setup,node_qr_cards toneBlue
class node_page_config,node_upload_page,node_access_checks,node_file_validation,node_upload_sessions,node_google_drive toneAmber
class node_drive_storage toneMint
class node_couple_admin,node_guest toneIndigo
```

## Components

### Event setup

- [Event links](https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs): `backend/Code.gs`
- [QR card generator](https://github.com/sanee1428/wedding-photo-upload/blob/main/tools/make_qr_cards.py): `tools/make_qr_cards.py`

### Guest upload

- [Page configuration](https://github.com/sanee1428/wedding-photo-upload/blob/main/frontend/config.js): `frontend/config.js`
- [Guest upload page](https://github.com/sanee1428/wedding-photo-upload/blob/main/frontend/app.js): `frontend/app.js`
- [Access and name checks](https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs): `backend/Code.gs`
- [File validation](https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs): `backend/Code.gs`
- [Upload sessions](https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs): `backend/Code.gs`

### Photo storage

- [Drive storage](https://github.com/sanee1428/wedding-photo-upload/blob/main/backend/Code.gs): `backend/Code.gs`

### Other components

- **Couple / admin**
- **Guest**
- **Google Drive**

## Connections

- Couple / admin → Event links: configures events (evidence: `README.md`)
- Event links → QR card generator: provides links (evidence: `README.md`)
- Couple / admin → QR card generator: creates cards (evidence: `README.md`)
- Guest → QR card generator: scans card (evidence: `README.md`)
- Page configuration → Guest upload page: configures page (evidence: `README.md`)
- Guest upload page → Access and name checks: requests access (evidence: `README.md`)
- Guest upload page → Access and name checks: checks name (evidence: `README.md`)
- Access and name checks → Guest upload page: returns status (evidence: `README.md`)
- Guest → Guest upload page: selects files (evidence: `README.md`)
- Guest upload page → File validation: sends file data (evidence: `README.md`)
- File validation → Upload sessions: accepts valid files (evidence: `README.md`)
- Guest upload page → Upload sessions: sends chunks (evidence: `README.md`)
- Upload sessions → Drive storage: saves files (evidence: `README.md`)
- Drive storage → Google Drive: writes files (evidence: `README.md`)
- Couple / admin → Drive storage: checks usage (evidence: `README.md`)
