# gurpreetwork9582/tattoo architecture

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

- Interactive diagram: https://gitdiagram.com/gurpreetwork9582/tattoo
- Repository: https://github.com/gurpreetwork9582/tattoo

## Overview

This is a Flask website for an ink studio. Visitors browse the home, services, contact, and tattoo-gallery pages; the home page can show an enabled offer, and the tattoo API combines Cloudinary images with legacy JSON entries. A separate admin flow authenticates users, exposes an upload page, and signs Cloudinary uploads. The app.py excerpt supports the route, file-read, and Cloudinary-read links shown; the upload page’s client-side behavior was not sampled, so its upload links are marked unverified.

Main entry points: [`app.py`](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py) (Page Routes), [`templates/admin_upload.html`](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/admin_upload.html) (Upload Page), [`templates/index.html`](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/index.html) (Home Page), [`templates/services.html`](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/services.html) (Services Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_web_routes["Page Routes<br/>[app.py]"]
  node_home["Home Page<br/>[index.html]"]
  node_services["Services Page<br/>[services.html]"]
  node_contact["Contact Page<br/>[contact.html]"]
  node_offer_reader["Offer Reader<br/>[app.py]"]
end

subgraph group_gallery["Tattoo Gallery"]
  node_tattoo_page["Tattoo Page<br/>[Tattoos.html]"]
  node_tattoo_api["Tattoo API<br/>[app.py]"]
  node_cloudinary_reader["Cloudinary Reader<br/>[app.py]"]
end

subgraph group_admin["Admin Upload"]
  node_admin_routes["Admin Routes<br/>[app.py]"]
  node_login_page["Admin Login<br/>[admin_login.html]"]
  node_upload_page["Upload Page<br/>[admin_upload.html]"]
  node_signature["Upload Signer<br/>[app.py]"]
end

subgraph group_data["Studio Data"]
  node_legacy_tattoos[("Legacy Tattoos<br/>[tattoos.json]")]
  node_offers[("Offer Data<br/>[offers.json]")]
end

node_visitor(("Visitor"))
node_cloudinary[("Cloudinary")]

node_visitor -->|"requests pages"| node_web_routes
node_web_routes -->|"renders"| node_home
node_web_routes -->|"renders"| node_services
node_web_routes -->|"renders"| node_contact
node_web_routes -->|"renders"| node_tattoo_page
node_web_routes -->|"loads offer"| node_offer_reader
node_visitor -->|"requests gallery"| node_tattoo_api
node_tattoo_api -->|"combines results"| node_cloudinary_reader
node_cloudinary_reader -->|"lists images"| node_cloudinary
node_tattoo_api -->|"reads entries"| node_legacy_tattoos
node_offer_reader -->|"reads offer"| node_offers
node_visitor -->|"opens admin"| node_admin_routes
node_admin_routes -->|"renders login"| node_login_page
node_admin_routes -->|"renders upload"| node_upload_page
node_upload_page -.->|"requests signature"| node_signature
node_signature -.->|"signs upload"| node_cloudinary

click node_web_routes "https://github.com/gurpreetwork9582/tattoo/blob/main/app.py"
click node_home "https://github.com/gurpreetwork9582/tattoo/blob/main/templates/index.html"
click node_services "https://github.com/gurpreetwork9582/tattoo/blob/main/templates/services.html"
click node_contact "https://github.com/gurpreetwork9582/tattoo/blob/main/templates/contact.html"
click node_tattoo_page "https://github.com/gurpreetwork9582/tattoo/blob/main/templates/Tattoos.html"
click node_tattoo_api "https://github.com/gurpreetwork9582/tattoo/blob/main/app.py"
click node_cloudinary_reader "https://github.com/gurpreetwork9582/tattoo/blob/main/app.py"
click node_legacy_tattoos "https://github.com/gurpreetwork9582/tattoo/blob/main/static/data/tattoos.json"
click node_offer_reader "https://github.com/gurpreetwork9582/tattoo/blob/main/app.py"
click node_offers "https://github.com/gurpreetwork9582/tattoo/blob/main/static/data/offers.json"
click node_admin_routes "https://github.com/gurpreetwork9582/tattoo/blob/main/app.py"
click node_login_page "https://github.com/gurpreetwork9582/tattoo/blob/main/templates/admin_login.html"
click node_upload_page "https://github.com/gurpreetwork9582/tattoo/blob/main/templates/admin_upload.html"
click node_signature "https://github.com/gurpreetwork9582/tattoo/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_web_routes,node_home,node_services,node_contact,node_offer_reader toneBlue
class node_tattoo_page,node_tattoo_api,node_cloudinary_reader,node_cloudinary toneAmber
class node_admin_routes,node_login_page,node_upload_page,node_signature toneMint
class node_legacy_tattoos,node_offers toneRose
class node_visitor toneIndigo
```

## Components

### Public Website

- [Page Routes](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py): `app.py`
- [Home Page](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/index.html): `templates/index.html`
- [Services Page](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/services.html): `templates/services.html`
- [Contact Page](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/contact.html): `templates/contact.html`
- [Offer Reader](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py): `app.py`

### Tattoo Gallery

- [Tattoo Page](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/Tattoos.html): `templates/Tattoos.html`
- [Tattoo API](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py): `app.py`
- [Cloudinary Reader](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py): `app.py`

### Admin Upload

- [Admin Routes](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py): `app.py`
- [Admin Login](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/admin_login.html): `templates/admin_login.html`
- [Upload Page](https://github.com/gurpreetwork9582/tattoo/blob/main/templates/admin_upload.html): `templates/admin_upload.html`
- [Upload Signer](https://github.com/gurpreetwork9582/tattoo/blob/main/app.py): `app.py`

### Studio Data

- [Legacy Tattoos](https://github.com/gurpreetwork9582/tattoo/blob/main/static/data/tattoos.json): `static/data/tattoos.json`
- [Offer Data](https://github.com/gurpreetwork9582/tattoo/blob/main/static/data/offers.json): `static/data/offers.json`

### Other components

- **Visitor**
- **Cloudinary**

## Connections

- Visitor → Page Routes: requests pages (evidence: `app.py`)
- Page Routes → Home Page: renders (evidence: `app.py`)
- Page Routes → Services Page: renders (evidence: `app.py`)
- Page Routes → Contact Page: renders (evidence: `app.py`)
- Page Routes → Tattoo Page: renders (evidence: `app.py`)
- Page Routes → Offer Reader: loads offer (evidence: `app.py`)
- Visitor → Tattoo API: requests gallery (evidence: `app.py`)
- Tattoo API → Cloudinary Reader: combines results (evidence: `app.py`)
- Cloudinary Reader → Cloudinary: lists images (evidence: `app.py`)
- Tattoo API → Legacy Tattoos: reads entries (evidence: `app.py`)
- Offer Reader → Offer Data: reads offer (evidence: `app.py`)
- Visitor → Admin Routes: opens admin (evidence: `app.py`)
- Admin Routes → Admin Login: renders login (evidence: `app.py`)
- Admin Routes → Upload Page: renders upload (evidence: `app.py`)
- Upload Page → Upload Signer: requests signature
- Upload Signer → Cloudinary: signs upload
