# yurei04/aethra architecture

> Architecture diagram of the GitHub repository yurei04/aethra, 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/yurei04/aethra
- Repository: https://github.com/yurei04/aethra

## Overview

Aethra is a metalwork portfolio and consultation platform. Customers browse categorized products, inspect 3D models, view gallery images, and can request consultations; administrators manage bookings and gallery content. The sampled code confirms gallery loading, product interactions, booking and gallery API behavior, and design generation. The README documents additional booking-management and responsive capabilities, but their full frontend implementation was not sampled, so those links are documented rather than inferred from source.

Main entry points: [`server.js`](https://github.com/yurei04/aethra/blob/main/server.js) (Booking and admin API), [`public/index.html`](https://github.com/yurei04/aethra/blob/main/public/index.html) (Portfolio home), [`public/js/products.js`](https://github.com/yurei04/aethra/blob/main/public/js/products.js) (Product browser), [`public/js/index.js`](https://github.com/yurei04/aethra/blob/main/public/js/index.js) (Dynamic gallery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Product catalog"]
  node_home["Portfolio home<br/>[index.html]"]
  node_product_browser["Product browser<br/>[products.js]"]
  node_product_page["Product catalog page<br/>[products.html]"]
  node_shared_header["Shared header loader<br/>[header.js]"]
  node_shared_footer["Shared footer<br/>[footer.js]"]
end

subgraph group_visualization["Visual exploration"]
  node_gallery_view["Dynamic gallery<br/>[index.js]"]
  node_gallery_images["Gallery images"]
  node_image_preview["Image preview<br/>[index.js]"]
  node_photo_viewer["Photo model placement<br/>[photo_view.js]"]
  node_photo_page["Photo viewer page<br/>[photo_view.html]"]
  node_ar_redirect["AR device launch<br/>[redirect.js]"]
  node_ar_page["AR redirect page<br/>[redirect.html]"]
  node_product_models["3D product models"]
end

subgraph group_consultations["Consultations"]
  node_booking_api["Booking and admin API<br/>[server.js]"]
  node_booking_page["Consultation interface<br/>[products.html]"]
  node_design_finder["AI design finder<br/>[products.js]"]
end

subgraph group_platform["Platform services"]
  node_booking_store[("Bookings and gallery store")]
  node_image_storage[("Supabase image storage")]
  node_email_service["Email service"]
  node_image_generation["OpenAI image generation"]
end

node_customer(("Customer"))
node_administrator(("Administrator"))

node_customer -->|"opens"| node_home
node_home -->|"loads gallery"| node_gallery_view
node_gallery_view -->|"fetches images"| node_booking_api
node_booking_api -->|"reads gallery"| node_booking_store
node_gallery_view -->|"opens preview"| node_image_preview
node_gallery_view -.->|"displays images"| node_gallery_images
node_customer -->|"browses products"| node_product_page
node_product_page -.->|"runs interactions"| node_product_browser
node_product_browser -->|"selects models"| node_product_models
node_product_browser -->|"opens viewer"| node_photo_page
node_photo_page -.->|"runs placement"| node_photo_viewer
node_photo_viewer -->|"loads model"| node_product_models
node_product_browser -->|"creates QR link"| node_ar_page
node_ar_page -.->|"launches AR"| node_ar_redirect
node_ar_redirect -->|"opens device model"| node_product_models
node_customer -->|"requests consultation"| node_booking_page
node_booking_page -.->|"submits booking"| node_booking_api
node_administrator -->|"manages bookings"| node_booking_api
node_booking_api -->|"creates and updates"| node_booking_store
node_booking_api -->|"uploads images"| node_image_storage
node_booking_api -->|"sends notifications"| node_email_service
node_administrator -.->|"manages gallery"| node_booking_api
node_booking_api -->|"writes gallery records"| node_booking_store
node_booking_api -->|"stores gallery images"| node_image_storage
node_customer -->|"describes design"| node_design_finder
node_design_finder -->|"posts design request"| node_booking_api
node_booking_api -->|"generates or edits"| node_image_generation
node_home -.->|"loads shared header"| node_shared_header
node_home -.->|"renders footer"| node_shared_footer

click node_home "https://github.com/yurei04/aethra/blob/main/public/index.html"
click node_product_browser "https://github.com/yurei04/aethra/blob/main/public/js/products.js"
click node_product_page "https://github.com/yurei04/aethra/blob/main/public/products.html"
click node_gallery_view "https://github.com/yurei04/aethra/blob/main/public/js/index.js"
click node_gallery_images "https://github.com/yurei04/aethra/tree/main/public/hompage_photos"
click node_image_preview "https://github.com/yurei04/aethra/blob/main/public/js/index.js"
click node_photo_viewer "https://github.com/yurei04/aethra/blob/main/public/js/photo_view.js"
click node_photo_page "https://github.com/yurei04/aethra/blob/main/public/photo_view.html"
click node_ar_redirect "https://github.com/yurei04/aethra/blob/main/public/js/redirect.js"
click node_ar_page "https://github.com/yurei04/aethra/blob/main/public/redirect.html"
click node_product_models "https://github.com/yurei04/aethra/tree/main/public/models"
click node_booking_api "https://github.com/yurei04/aethra/blob/main/server.js"
click node_booking_page "https://github.com/yurei04/aethra/blob/main/public/products.html"
click node_design_finder "https://github.com/yurei04/aethra/blob/main/public/js/products.js"
click node_shared_header "https://github.com/yurei04/aethra/blob/main/public/js/header.js"
click node_shared_footer "https://github.com/yurei04/aethra/blob/main/public/js/footer.js"

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_home,node_product_browser,node_product_page,node_shared_header,node_shared_footer toneBlue
class node_gallery_view,node_gallery_images,node_image_preview,node_photo_viewer,node_photo_page,node_ar_redirect,node_ar_page,node_product_models toneAmber
class node_booking_api,node_booking_page,node_design_finder toneMint
class node_booking_store,node_image_storage,node_email_service,node_image_generation toneRose
class node_customer,node_administrator toneIndigo
```

## Components

### Product catalog

- [Portfolio home](https://github.com/yurei04/aethra/blob/main/public/index.html): `public/index.html`
- [Product browser](https://github.com/yurei04/aethra/blob/main/public/js/products.js): `public/js/products.js`
- [Product catalog page](https://github.com/yurei04/aethra/blob/main/public/products.html): `public/products.html`
- [Shared header loader](https://github.com/yurei04/aethra/blob/main/public/js/header.js): `public/js/header.js`
- [Shared footer](https://github.com/yurei04/aethra/blob/main/public/js/footer.js): `public/js/footer.js`

### Visual exploration

- [Dynamic gallery](https://github.com/yurei04/aethra/blob/main/public/js/index.js): `public/js/index.js`
- [Gallery images](https://github.com/yurei04/aethra/tree/main/public/hompage_photos): `public/hompage_photos`
- [Image preview](https://github.com/yurei04/aethra/blob/main/public/js/index.js): `public/js/index.js`
- [Photo model placement](https://github.com/yurei04/aethra/blob/main/public/js/photo_view.js): `public/js/photo_view.js`
- [Photo viewer page](https://github.com/yurei04/aethra/blob/main/public/photo_view.html): `public/photo_view.html`
- [AR device launch](https://github.com/yurei04/aethra/blob/main/public/js/redirect.js): `public/js/redirect.js`
- [AR redirect page](https://github.com/yurei04/aethra/blob/main/public/redirect.html): `public/redirect.html`
- [3D product models](https://github.com/yurei04/aethra/tree/main/public/models): `public/models`

### Consultations

- [Booking and admin API](https://github.com/yurei04/aethra/blob/main/server.js): `server.js`
- [Consultation interface](https://github.com/yurei04/aethra/blob/main/public/products.html): `public/products.html`
- [AI design finder](https://github.com/yurei04/aethra/blob/main/public/js/products.js): `public/js/products.js`

### Platform services

- **Bookings and gallery store**
- **Supabase image storage**
- **Email service**
- **OpenAI image generation**

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Portfolio home: opens (evidence: `README.md`)
- Portfolio home → Dynamic gallery: loads gallery (evidence: `public/js/index.js`)
- Dynamic gallery → Booking and admin API: fetches images (evidence: `public/js/index.js`)
- Booking and admin API → Bookings and gallery store: reads gallery (evidence: `server.js`)
- Dynamic gallery → Image preview: opens preview (evidence: `public/js/index.js`)
- Dynamic gallery → Gallery images: displays images
- Customer → Product catalog page: browses products (evidence: `README.md`)
- Product catalog page → Product browser: runs interactions
- Product browser → 3D product models: selects models (evidence: `public/js/products.js`)
- Product browser → Photo viewer page: opens viewer (evidence: `public/js/products.js`)
- Photo viewer page → Photo model placement: runs placement
- Photo model placement → 3D product models: loads model (evidence: `public/js/photo_view.js`)
- Product browser → AR redirect page: creates QR link (evidence: `public/js/products.js`)
- AR redirect page → AR device launch: launches AR
- AR device launch → 3D product models: opens device model (evidence: `public/js/redirect.js`)
- Customer → Consultation interface: requests consultation (evidence: `README.md`)
- Consultation interface → Booking and admin API: submits booking
- Administrator → Booking and admin API: manages bookings (evidence: `README.md`)
- Booking and admin API → Bookings and gallery store: creates and updates (evidence: `server.js`)
- Booking and admin API → Supabase image storage: uploads images (evidence: `server.js`)
- Booking and admin API → Email service: sends notifications (evidence: `server.js`)
- Administrator → Booking and admin API: manages gallery
- Booking and admin API → Bookings and gallery store: writes gallery records (evidence: `server.js`)
- Booking and admin API → Supabase image storage: stores gallery images (evidence: `server.js`)
- Customer → AI design finder: describes design (evidence: `public/js/products.js`)
- AI design finder → Booking and admin API: posts design request (evidence: `public/js/products.js`)
- Booking and admin API → OpenAI image generation: generates or edits (evidence: `server.js`)
- Portfolio home → Shared header loader: loads shared header
- Portfolio home → Shared footer: renders footer
