# terry395/aunty-approved architecture

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

- Interactive diagram: https://gitdiagram.com/terry395/aunty-approved
- Repository: https://github.com/terry395/aunty-approved

## Overview

Aunty Approved is a mobile-first CNY gift-kit shop for Singapore couples. Visitors browse kits, add them to a cart, complete checkout with a simulated payment step, and receive an order confirmation; orders are submitted to an optional Google Apps Script endpoint for Sheets storage and email. The single JavaScript file also handles date-based pricing/closure, form validation, and the Aunty Coach widget buttons. Connections reflect README statements and the shown JavaScript excerpts; the Apps Script implementation and HTML details were not sampled.

Main entry points: [`script.js`](https://github.com/terry395/aunty-approved/blob/main/script.js) (Shop interactions), [`index.html`](https://github.com/terry395/aunty-approved/blob/main/index.html) (Shop page), [`google-apps-script.gs`](https://github.com/terry395/aunty-approved/blob/main/google-apps-script.gs) (Apps Script endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Shop experience"]
  node_shop_page["Shop page<br/>[index.html]"]
  node_shop_logic["Shop interactions<br/>[script.js]"]
  node_catalog["Kit catalog<br/>[script.js]"]
  node_date_rules["Date and pricing rules<br/>[script.js]"]
  node_cart["Cart<br/>[script.js]"]
  node_local_storage[("Browser storage<br/>[script.js]")]
end

subgraph group_checkout["Order checkout"]
  node_checkout_form["Checkout form<br/>[index.html]"]
  node_validation["Form validation<br/>[script.js]"]
  node_order_creation["Order creation<br/>[script.js]"]
  node_demo_payment["Demo payment<br/>[script.js]"]
  node_confirmation["Order confirmation<br/>[script.js]"]
end

subgraph group_support["Customer support"]
  node_coach_controls["Coach buttons<br/>[index.html]"]
  node_coach_logic["Chat widget detection<br/>[script.js]"]
end

subgraph group_integrations["Order integrations"]
  node_order_endpoint["Apps Script endpoint"]
  node_sheets_email[("Sheets and email")]
end

node_visitor(("Shopper"))
node_chat_widget["Chat widget"]

node_visitor -->|"browses"| node_shop_page
node_shop_page -->|"loads"| node_shop_logic
node_shop_logic -->|"renders"| node_catalog
node_shop_logic -->|"applies"| node_date_rules
node_shop_logic -->|"updates"| node_cart
node_cart -->|"persists"| node_local_storage
node_visitor -->|"enters details"| node_checkout_form
node_checkout_form -->|"validates"| node_validation
node_shop_logic -->|"submits"| node_order_creation
node_order_creation -->|"starts"| node_demo_payment
node_demo_payment -->|"completes"| node_order_creation
node_order_creation -->|"posts order"| node_order_endpoint
node_order_endpoint -->|"saves and emails"| node_sheets_email
node_order_creation -->|"shows"| node_confirmation
node_visitor -->|"opens"| node_coach_controls
node_coach_controls -->|"invokes"| node_coach_logic
node_coach_logic -.->|"tries to open"| node_chat_widget

click node_shop_page "https://github.com/terry395/aunty-approved/blob/main/index.html"
click node_shop_logic "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_catalog "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_date_rules "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_cart "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_local_storage "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_checkout_form "https://github.com/terry395/aunty-approved/blob/main/index.html"
click node_validation "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_order_creation "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_demo_payment "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_confirmation "https://github.com/terry395/aunty-approved/blob/main/script.js"
click node_order_endpoint "https://github.com/terry395/aunty-approved/blob/main/google-apps-script.gs"
click node_sheets_email "https://github.com/terry395/aunty-approved/blob/main/google-apps-script.gs"
click node_coach_controls "https://github.com/terry395/aunty-approved/blob/main/index.html"
click node_coach_logic "https://github.com/terry395/aunty-approved/blob/main/script.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_shop_page,node_shop_logic,node_catalog,node_date_rules,node_cart,node_local_storage toneBlue
class node_checkout_form,node_validation,node_order_creation,node_demo_payment,node_confirmation toneAmber
class node_coach_controls,node_coach_logic toneMint
class node_order_endpoint,node_sheets_email toneRose
class node_visitor,node_chat_widget toneIndigo
```

## Components

### Shop experience

- [Shop page](https://github.com/terry395/aunty-approved/blob/main/index.html): `index.html`
- [Shop interactions](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Kit catalog](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Date and pricing rules](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Cart](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Browser storage](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`

### Order checkout

- [Checkout form](https://github.com/terry395/aunty-approved/blob/main/index.html): `index.html`
- [Form validation](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Order creation](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Demo payment](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`
- [Order confirmation](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`

### Customer support

- [Coach buttons](https://github.com/terry395/aunty-approved/blob/main/index.html): `index.html`
- [Chat widget detection](https://github.com/terry395/aunty-approved/blob/main/script.js): `script.js`

### Order integrations

- [Apps Script endpoint](https://github.com/terry395/aunty-approved/blob/main/google-apps-script.gs): `google-apps-script.gs`
- [Sheets and email](https://github.com/terry395/aunty-approved/blob/main/google-apps-script.gs): `google-apps-script.gs`

### Other components

- **Shopper**
- **Chat widget**

## Connections

- Shopper → Shop page: browses (evidence: `README.md`)
- Shop page → Shop interactions: loads (evidence: `README.md`)
- Shop interactions → Kit catalog: renders (evidence: `README.md`)
- Shop interactions → Date and pricing rules: applies (evidence: `script.js`)
- Shop interactions → Cart: updates (evidence: `script.js`)
- Cart → Browser storage: persists (evidence: `script.js`)
- Shopper → Checkout form: enters details (evidence: `README.md`)
- Checkout form → Form validation: validates (evidence: `script.js`)
- Shop interactions → Order creation: submits (evidence: `script.js`)
- Order creation → Demo payment: starts (evidence: `script.js`)
- Demo payment → Order creation: completes (evidence: `script.js`)
- Order creation → Apps Script endpoint: posts order (evidence: `script.js`)
- Apps Script endpoint → Sheets and email: saves and emails (evidence: `README.md`)
- Order creation → Order confirmation: shows (evidence: `script.js`)
- Shopper → Coach buttons: opens (evidence: `README.md`)
- Coach buttons → Chat widget detection: invokes (evidence: `README.md`)
- Chat widget detection → Chat widget: tries to open (evidence: `README.md`)
