# athy311/bsf architecture

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

- Interactive diagram: https://gitdiagram.com/athy311/bsf
- Repository: https://github.com/athy311/bsf

## Overview

This is a single-page personal “bestie” experience: visitors use playful controls, a tiny pet, wishes, and media features to produce messages, animations, and changing page state. The main runtime is a single JavaScript file, so its distinct interactions are represented as components sharing that source path. The excerpt shows wish persistence through browser localStorage and several event-handler relationships. HTML, CSS, and media contents were not sampled; links to those assets are therefore omitted or marked unverified where useful.

Main entry points: [`script.js`](https://github.com/athy311/bsf/blob/main/script.js) (Memory video controls), [`song.mp3`](https://github.com/athy311/bsf/blob/main/song.mp3) (Background song), [`video1.mp4`](https://github.com/athy311/bsf/blob/main/video1.mp4) (Memory clips)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_page["Page shell"]
  node_markup["Page markup<br/>[index.html]"]
  node_styling["Page styling<br/>[style.css]"]
end

subgraph group_play["Interactive experience"]
  node_app["Page interactions<br/>[script.js]"]
  node_mood["Mood and messages<br/>[script.js]"]
  node_pet["Tiny pet<br/>[script.js]"]
  node_wishes["Wish jar<br/>[script.js]"]
  node_wishstore[("Browser wish storage")]
  node_theme["Theme toggle<br/>[script.js]"]
  node_love["Love counter and hugs<br/>[script.js]"]
end

subgraph group_media["Media and effects"]
  node_music["Music controls<br/>[script.js]"]
  node_song["Background song<br/>[song.mp3]"]
  node_videos["Memory video controls<br/>[script.js]"]
  node_videoassets["Memory clips<br/>[video1.mp4]"]
  node_modal["Video modal<br/>[script.js]"]
  node_effects["Hearts and confetti<br/>[script.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"chooses mood"| node_mood
node_visitor -->|"cares for"| node_pet
node_visitor -->|"adds wishes"| node_wishes
node_visitor -->|"toggles theme"| node_theme
node_visitor -->|"sends affection"| node_love
node_visitor -->|"toggles music"| node_music
node_visitor -->|"controls clips"| node_videos
node_visitor -->|"triggers effects"| node_effects
node_wishes -->|"saves wishes"| node_wishstore
node_wishes -->|"loads wishes"| node_wishstore
node_pet -->|"updates bars"| node_pet
node_videos -->|"opens modal"| node_modal
node_videos -->|"creates hearts"| node_effects
node_effects -->|"bursts hearts"| node_effects
node_music -.->|"plays"| node_song
node_videos -.->|"plays clips"| node_videoassets

click node_markup "https://github.com/athy311/bsf/blob/main/index.html"
click node_styling "https://github.com/athy311/bsf/blob/main/style.css"
click node_app "https://github.com/athy311/bsf/blob/main/script.js"
click node_mood "https://github.com/athy311/bsf/blob/main/script.js"
click node_pet "https://github.com/athy311/bsf/blob/main/script.js"
click node_wishes "https://github.com/athy311/bsf/blob/main/script.js"
click node_theme "https://github.com/athy311/bsf/blob/main/script.js"
click node_love "https://github.com/athy311/bsf/blob/main/script.js"
click node_music "https://github.com/athy311/bsf/blob/main/script.js"
click node_song "https://github.com/athy311/bsf/blob/main/song.mp3"
click node_videos "https://github.com/athy311/bsf/blob/main/script.js"
click node_videoassets "https://github.com/athy311/bsf/blob/main/video1.mp4"
click node_modal "https://github.com/athy311/bsf/blob/main/script.js"
click node_effects "https://github.com/athy311/bsf/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_markup,node_styling toneBlue
class node_app,node_mood,node_pet,node_wishes,node_wishstore,node_theme,node_love toneAmber
class node_music,node_song,node_videos,node_videoassets,node_modal,node_effects toneMint
class node_visitor toneIndigo
```

## Components

### Page shell

- [Page markup](https://github.com/athy311/bsf/blob/main/index.html): `index.html`
- [Page styling](https://github.com/athy311/bsf/blob/main/style.css): `style.css`

### Interactive experience

- [Page interactions](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Mood and messages](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Tiny pet](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Wish jar](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- **Browser wish storage**
- [Theme toggle](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Love counter and hugs](https://github.com/athy311/bsf/blob/main/script.js): `script.js`

### Media and effects

- [Music controls](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Background song](https://github.com/athy311/bsf/blob/main/song.mp3): `song.mp3`
- [Memory video controls](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Memory clips](https://github.com/athy311/bsf/blob/main/video1.mp4): `video1.mp4`
- [Video modal](https://github.com/athy311/bsf/blob/main/script.js): `script.js`
- [Hearts and confetti](https://github.com/athy311/bsf/blob/main/script.js): `script.js`

### Other components

- **Visitor**

## Connections

- Visitor → Mood and messages: chooses mood (evidence: `script.js`)
- Visitor → Tiny pet: cares for (evidence: `script.js`)
- Visitor → Wish jar: adds wishes (evidence: `script.js`)
- Visitor → Theme toggle: toggles theme (evidence: `script.js`)
- Visitor → Love counter and hugs: sends affection (evidence: `script.js`)
- Visitor → Music controls: toggles music (evidence: `script.js`)
- Visitor → Memory video controls: controls clips (evidence: `script.js`)
- Visitor → Hearts and confetti: triggers effects (evidence: `script.js`)
- Wish jar → Browser wish storage: saves wishes (evidence: `script.js`)
- Wish jar → Browser wish storage: loads wishes (evidence: `script.js`)
- Tiny pet → Tiny pet: updates bars (evidence: `script.js`)
- Memory video controls → Video modal: opens modal (evidence: `script.js`)
- Memory video controls → Hearts and confetti: creates hearts (evidence: `script.js`)
- Hearts and confetti → Hearts and confetti: bursts hearts (evidence: `script.js`)
- Music controls → Background song: plays
- Memory video controls → Memory clips: plays clips
