# santycubillos/happyholidays architecture

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

- Interactive diagram: https://gitdiagram.com/santycubillos/happyholidays
- Repository: https://github.com/santycubillos/happyholidays

## Overview

1. **Project type**
   - This is a **static, client-side holiday greeting page**. There is no backend, database, or server-side rendering in the repository.
   - Everything is delivered from a small set of front-end files: `index.html`, `css/styles.css`, and `js/main.js`, plus one audio asset and images.

2. **Primary user experience**
   - The app shows a festive greeting with **two floating balloons** and a personalized message.
   - The recipient name and event type are **not hardcoded**; they are supplied through the page URL using query parameters like `?name=Elliot&event=cumpleaños`.

3. **Presentation layer**
   - `index.html` is the structural entry point for the whole experience.
   - It likely contains the balloon elements, the message container, and the references to the CSS, JavaScript, image assets, and sound file.

4. **Styling and animation subsystem**
   - `css/styles.css` handles the visual design and movement.
   - The README indicates it provides the **floating balloon animations** and the layout for the greeting/message reveal.
   - This is the layer that makes the page feel alive without requiring any external animation library.

5. **Dynamic content subsystem**
   - `js/main.js` is responsible for reading `name` and `event` from the URL.
   - The app uses **URLSearchParams** to transform query-string data into personalized text shown in the greeting.
   - This means the same static page can generate many different greetings without creating separate HTML files.

6. **Interaction flow**
   - The balloons are the main interactive controls.
   - The user must **click or tap** them to trigger the reveal sequence, so the UI is intentionally event-driven rather than auto-playing.

7. **Reveal and feedback loop**
   - When a balloon “explodes,” the app reveals the personalized message.
   - The interaction is tied to immediate sensory feedback: the page displays the greeting and plays a sound at the same moment.

8. **Audio subsystem**
   - `audio/balloon-burst.mp3` is the only explicit media asset in the tree.
   - It provides the explosion sound effect used during the reveal action, reinforcing the balloon interaction.

9. **Asset boundary**
   - The `img/` directory likely contains decorative visuals used by the page, while `audio/` contains the interaction effect.
   - These assets are purely client-side resources and are loaded by the front-end, not generated dynamically.

10. **Data flow**
   - The main flow is: **URL query parameters → JavaScript parsing → DOM text substitution → user click/tap → animation/sound → revealed message**.
   - That makes the URL the only external input to the system.

11. **Technology boundary**
   - The stack is intentionally minimal: **HTML5 for structure, CSS for animation and styling, and vanilla JavaScript for behavior**.
   - No framework, package manager, or build pipeline is visible in the repository.

12. **Deployment shape**
   - The README points to a GitHub Pages URL, so the app is designed to run as a **hosted static site**.
   - That means architecture is centered on front-end assets and browser execution, not on a service topology.

13. **What an architecture diagram should show**
   - A single browser client loading static assets.
   - An entry HTML page connected to CSS, JS, images, and audio.
   - A URL parameter source feeding the JavaScript personalization logic.
   - An interaction path from the balloons to the reveal animation and sound effect.

14. **Overall architecture summary**
   - This repository is best understood as a **single-page interactive greeting card** with a small, clean separation between structure, styling, behavior, and media.
   - Its core design principle is **reusable personalization through URL parameters** rather than stored user state or backend processing.

Main entry points: [`index.html`](https://github.com/santycubillos/happyholidays/blob/master/index.html) (index.html), [`js/main.js`](https://github.com/santycubillos/happyholidays/blob/master/js/main.js) (main.js), [`css/styles.css`](https://github.com/santycubillos/happyholidays/blob/master/css/styles.css) (styles.css), [`audio/balloon-burst.mp3`](https://github.com/santycubillos/happyholidays/blob/master/audio/balloon-burst.mp3) (Burst sound)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_browser["Browser<br/>client runtime"]
end

subgraph group_presentation["Presentation"]
  node_index["index.html<br/>entry page<br/>[index.html]"]
  node_styles["styles.css<br/>styling<br/>[styles.css]"]
  node_balloons(("Balloons<br/>ui controls"))
  node_message["Greeting<br/>dynamic text"]
end

subgraph group_behavior["Behavior"]
  node_script["main.js<br/>interaction logic<br/>[main.js]"]
  node_params(("URL params<br/>input source"))
  node_reveal{{"Reveal<br/>animation state"}}
end

subgraph group_media["Media"]
  node_sound["Burst sound<br/>audio effect<br/>[balloon-burst.mp3]"]
  node_images[("Images<br/>decorative assets")]
end

node_browser -->|"loads"| node_index
node_index -->|"includes"| node_styles
node_index -->|"includes"| node_script
node_index -->|"uses"| node_images
node_index -->|"contains"| node_balloons
node_script -->|"parses"| node_params
node_params -->|"fills"| node_message
node_balloons -->|"triggers"| node_reveal
node_reveal -->|"shows"| node_message
node_reveal -->|"plays"| node_sound
node_styles -->|"animates"| node_balloons
node_styles -->|"styles"| node_reveal
node_script -->|"drives"| node_reveal
node_script -->|"loads"| node_sound

click node_index "https://github.com/santycubillos/happyholidays/blob/master/index.html"
click node_styles "https://github.com/santycubillos/happyholidays/blob/master/css/styles.css"
click node_script "https://github.com/santycubillos/happyholidays/blob/master/js/main.js"
click node_sound "https://github.com/santycubillos/happyholidays/blob/master/audio/balloon-burst.mp3"
click node_images "https://github.com/santycubillos/happyholidays/tree/master/img"

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_browser toneBlue
class node_index,node_styles,node_balloons,node_message toneAmber
class node_script,node_params,node_reveal toneMint
class node_sound,node_images toneRose
```

## Components

### Runtime

Browser-hosted static site execution

- **Browser**: client runtime · Loads the static greeting page and runs all interaction in the user agent

### Presentation

HTML structure and visual layer

- [index.html](https://github.com/santycubillos/happyholidays/blob/master/index.html): entry page · Top-level document that assembles the greeting card experience · `index.html`
- [styles.css](https://github.com/santycubillos/happyholidays/blob/master/css/styles.css): styling · Defines layout, festive visuals, and balloon animation behavior · `css/styles.css`
- **Balloons**: ui controls · Clickable or tappable festive elements that trigger the reveal
- **Greeting**: dynamic text · Personalized holiday message shown after interaction

### Behavior

Client-side personalization and interaction

- [main.js](https://github.com/santycubillos/happyholidays/blob/master/js/main.js): interaction logic · Reads query parameters and drives personalized reveal behavior · `js/main.js`
- **URL params**: input source · name and event values supplied through the page URL
- **Reveal**: animation state · Visual transition that exposes the greeting after balloon burst

### Media

Reusable visual and audio assets

- [Burst sound](https://github.com/santycubillos/happyholidays/blob/master/audio/balloon-burst.mp3): audio effect · Explosion sound played when a balloon is activated · `audio/balloon-burst.mp3`
- [Images](https://github.com/santycubillos/happyholidays/tree/master/img): decorative assets · Static visual assets used by the page · `img`

## Connections

- Browser → index.html: loads · The browser opens the static entry page
- index.html → styles.css: includes · HTML references the stylesheet
- index.html → main.js: includes · HTML loads the client-side behavior script
- index.html → Images: uses · Page markup pulls in decorative image assets
- index.html → Balloons: contains · The page renders the balloon interaction elements
- main.js → URL params: parses · JavaScript reads query-string values from the URL
- URL params → Greeting: fills · Parsed name and event values become personalized text
- Balloons → Reveal: triggers · Click or tap activates the reveal sequence
- Reveal → Greeting: shows · The greeting becomes visible during the reveal
- Reveal → Burst sound: plays · The burst action emits the balloon explosion sound
- styles.css → Balloons: animates · CSS gives the balloons floating motion
- styles.css → Reveal: styles · CSS controls the reveal presentation and layout
- main.js → Reveal: drives · JavaScript toggles the reveal state in response to interaction
- main.js → Burst sound: loads · Behavior code references the burst audio asset
