# peaz6/mosaic-site architecture

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

- Interactive diagram: https://gitdiagram.com/peaz6/mosaic-site
- Repository: https://github.com/peaz6/mosaic-site

## Overview

Mosaic is a small product-distribution website with a browser storefront and two operating modes: a static demo and a local Node/SQLite experience. The user-facing flow includes browsing/searching the site, placing a food order or submitting a contact message, and—locally—using account, password-reset, and inbox features. The sampled code shows the browser clients, API handling, and database schema; page-specific HTML behavior is not sampled, so page-to-script links are omitted.

Main entry points: [`script.js`](https://github.com/peaz6/mosaic-site/blob/main/script.js) (Site interactions), [`shop.js`](https://github.com/peaz6/mosaic-site/blob/main/shop.js) (Cart and orders), [`index.html`](https://github.com/peaz6/mosaic-site/blob/main/index.html) (Home page), [`server.js`](https://github.com/peaz6/mosaic-site/blob/main/server.js) (HTTP server and API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site experience"]
  node_index["Home page<br/>[index.html]"]
  node_food["Food page<br/>[food.html]"]
  node_team["Team page<br/>[team.html]"]
  node_site_ui["Site interactions<br/>[script.js]"]
end

subgraph group_commerce["Ordering and contact"]
  node_shop["Shop page<br/>[shop.html]"]
  node_shop_ui["Cart and orders<br/>[shop.js]"]
end

subgraph group_identity["Accounts and inbox"]
end

subgraph group_backend["Local services"]
  node_server["HTTP server and API<br/>[server.js]"]
  node_database[("SQLite data")]
  node_static_storage[("Browser demo storage")]
end

node_visitor(("Visitor"))
node_email_app["Email application"]
node_pages_host["Static file host"]

node_visitor -->|"browses"| node_index
node_visitor -->|"browses"| node_food
node_visitor -->|"orders from"| node_shop
node_visitor -->|"browses"| node_team
node_index -.->|"uses interactions"| node_site_ui
node_site_ui -->|"requests API"| node_server
node_site_ui -->|"stores demo accounts"| node_static_storage
node_site_ui -->|"opens mailto"| node_email_app
node_shop -.->|"uses cart"| node_shop_ui
node_shop_ui -->|"posts orders"| node_server
node_shop_ui -->|"opens mailto"| node_email_app
node_server -->|"reads and writes"| node_database
node_pages_host -->|"serves site"| node_index

click node_index "https://github.com/peaz6/mosaic-site/blob/main/index.html"
click node_food "https://github.com/peaz6/mosaic-site/blob/main/food.html"
click node_shop "https://github.com/peaz6/mosaic-site/blob/main/shop.html"
click node_team "https://github.com/peaz6/mosaic-site/blob/main/team.html"
click node_site_ui "https://github.com/peaz6/mosaic-site/blob/main/script.js"
click node_shop_ui "https://github.com/peaz6/mosaic-site/blob/main/shop.js"
click node_server "https://github.com/peaz6/mosaic-site/blob/main/server.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_index,node_food,node_team,node_site_ui toneBlue
class node_shop,node_shop_ui toneAmber
class node_server,node_database,node_static_storage toneRose
class node_visitor,node_email_app,node_pages_host toneIndigo
```

## Components

### Site experience

- [Home page](https://github.com/peaz6/mosaic-site/blob/main/index.html): `index.html`
- [Food page](https://github.com/peaz6/mosaic-site/blob/main/food.html): `food.html`
- [Team page](https://github.com/peaz6/mosaic-site/blob/main/team.html): `team.html`
- [Site interactions](https://github.com/peaz6/mosaic-site/blob/main/script.js): `script.js`

### Ordering and contact

- [Shop page](https://github.com/peaz6/mosaic-site/blob/main/shop.html): `shop.html`
- [Cart and orders](https://github.com/peaz6/mosaic-site/blob/main/shop.js): `shop.js`

### Local services

- [HTTP server and API](https://github.com/peaz6/mosaic-site/blob/main/server.js): `server.js`
- **SQLite data**
- **Browser demo storage**

### Other components

- **Visitor**
- **Email application**
- **Static file host**

## Connections

- Visitor → Home page: browses (evidence: `README.md`)
- Visitor → Food page: browses (evidence: `README.md`)
- Visitor → Shop page: orders from
- Visitor → Team page: browses (evidence: `README.md`)
- Home page → Site interactions: uses interactions
- Site interactions → HTTP server and API: requests API (evidence: `script.js`)
- Site interactions → Browser demo storage: stores demo accounts (evidence: `README.md`)
- Site interactions → Email application: opens mailto (evidence: `script.js`)
- Shop page → Cart and orders: uses cart
- Cart and orders → HTTP server and API: posts orders (evidence: `shop.js`)
- Cart and orders → Email application: opens mailto (evidence: `shop.js`)
- HTTP server and API → SQLite data: reads and writes (evidence: `server.js`)
- Static file host → Home page: serves site (evidence: `README.md`)
