# lilkuuks/yam_radio architecture

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

- Interactive diagram: https://gitdiagram.com/lilkuuks/yam_radio
- Repository: https://github.com/lilkuuks/yam_radio

## Overview

YAM is a static youth-fellowship site whose main visitor journey is to explore the community and join the Sunday service through an embedded live audio player. Separate branches provide the Travail 2.0 live schedule, a Minstrels songbook, and content administration. Supabase can publish settings and songs; the admin also supports local drafts. The graph reflects the sampled runtime code and README; the SMS function exists, but its connection to the admin interface is not shown.

Main entry points: [`index.html`](https://github.com/lilkuuks/yam_radio/blob/main/index.html) (Home Page), [`minstrels.js`](https://github.com/lilkuuks/yam_radio/blob/main/minstrels.js) (Song Display), [`admin.js`](https://github.com/lilkuuks/yam_radio/blob/main/admin.js) (Admin Console), [`supabase/migrations`](https://github.com/lilkuuks/yam_radio/tree/main/supabase/migrations) (Supabase Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Site"]
  node_home["Home Page<br/>[index.html]"]
  node_liveplayer["Live Player<br/>[index.html]"]
  node_sitecontent["Site Settings<br/>[site.js]"]
end

subgraph group_program["Travail Program"]
  node_travailpage["Program Page<br/>[index.html]"]
  node_schedule["Live Schedule<br/>[travail-program.js]"]
end

subgraph group_songs["Minstrels Songbook"]
  node_songpage["Songbook Page<br/>[minstrels.html]"]
  node_songdisplay["Song Display<br/>[minstrels.js]"]
end

subgraph group_admin["Admin Publishing"]
  node_adminpage["Admin Page<br/>[admin.html]"]
  node_adminconsole["Admin Console<br/>[admin.js]"]
  node_smsfunction["SMS Function<br/>[index.ts]"]
end

subgraph group_platform["Data and Offline"]
  node_database[("Supabase Data")]
  node_offline["Offline Cache<br/>[sw.js]"]
end

node_visitor(("Visitor"))
node_songbuyer(("Purchase Link"))
node_caster(("caster.fm"))

node_visitor -->|"opens"| node_home
node_home -->|"presents"| node_liveplayer
node_liveplayer -->|"streams audio"| node_caster
node_home -->|"loads settings"| node_sitecontent
node_visitor -->|"opens"| node_travailpage
node_travailpage -->|"shows schedule"| node_schedule
node_visitor -->|"opens"| node_songpage
node_songpage -->|"loads songs"| node_songdisplay
node_songdisplay -->|"offers purchase"| node_songbuyer
node_visitor -->|"opens"| node_adminpage
node_adminpage -->|"manages content"| node_adminconsole
node_adminconsole -->|"reads and writes"| node_database
node_sitecontent -->|"reads settings"| node_database
node_songdisplay -->|"reads published songs"| node_database
node_adminconsole -.->|"may invoke"| node_smsfunction
node_visitor -->|"uses offline cache"| node_offline

click node_home "https://github.com/lilkuuks/yam_radio/blob/main/index.html"
click node_liveplayer "https://github.com/lilkuuks/yam_radio/blob/main/index.html"
click node_sitecontent "https://github.com/lilkuuks/yam_radio/blob/main/site.js"
click node_travailpage "https://github.com/lilkuuks/yam_radio/blob/main/travailProgram/index.html"
click node_schedule "https://github.com/lilkuuks/yam_radio/blob/main/travail-program.js"
click node_songpage "https://github.com/lilkuuks/yam_radio/blob/main/minstrels.html"
click node_songdisplay "https://github.com/lilkuuks/yam_radio/blob/main/minstrels.js"
click node_adminpage "https://github.com/lilkuuks/yam_radio/blob/main/admin.html"
click node_adminconsole "https://github.com/lilkuuks/yam_radio/blob/main/admin.js"
click node_smsfunction "https://github.com/lilkuuks/yam_radio/blob/main/supabase/functions/send-sms/index.ts"
click node_database "https://github.com/lilkuuks/yam_radio/tree/main/supabase/migrations"
click node_offline "https://github.com/lilkuuks/yam_radio/blob/main/sw.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_liveplayer,node_sitecontent toneBlue
class node_travailpage,node_schedule toneAmber
class node_songpage,node_songdisplay toneMint
class node_adminpage,node_adminconsole,node_smsfunction toneRose
class node_database,node_offline,node_visitor,node_songbuyer,node_caster toneIndigo
```

## Components

### Public Site

- [Home Page](https://github.com/lilkuuks/yam_radio/blob/main/index.html): `index.html`
- [Live Player](https://github.com/lilkuuks/yam_radio/blob/main/index.html): `index.html`
- [Site Settings](https://github.com/lilkuuks/yam_radio/blob/main/site.js): `site.js`

### Travail Program

- [Program Page](https://github.com/lilkuuks/yam_radio/blob/main/travailProgram/index.html): `travailProgram/index.html`
- [Live Schedule](https://github.com/lilkuuks/yam_radio/blob/main/travail-program.js): `travail-program.js`

### Minstrels Songbook

- [Songbook Page](https://github.com/lilkuuks/yam_radio/blob/main/minstrels.html): `minstrels.html`
- [Song Display](https://github.com/lilkuuks/yam_radio/blob/main/minstrels.js): `minstrels.js`

### Admin Publishing

- [Admin Page](https://github.com/lilkuuks/yam_radio/blob/main/admin.html): `admin.html`
- [Admin Console](https://github.com/lilkuuks/yam_radio/blob/main/admin.js): `admin.js`
- [SMS Function](https://github.com/lilkuuks/yam_radio/blob/main/supabase/functions/send-sms/index.ts): `supabase/functions/send-sms/index.ts`

### Data and Offline

- [Supabase Data](https://github.com/lilkuuks/yam_radio/tree/main/supabase/migrations): `supabase/migrations`
- [Offline Cache](https://github.com/lilkuuks/yam_radio/blob/main/sw.js): `sw.js`

### Other components

- **Visitor**
- **Purchase Link**
- **caster.fm**

## Connections

- Visitor → Home Page: opens (evidence: `README.md`)
- Home Page → Live Player: presents (evidence: `README.md`)
- Live Player → caster.fm: streams audio (evidence: `README.md`)
- Home Page → Site Settings: loads settings (evidence: `site.js`)
- Visitor → Program Page: opens (evidence: `README.md`)
- Program Page → Live Schedule: shows schedule (evidence: `travail-program.js`)
- Visitor → Songbook Page: opens (evidence: `README.md`)
- Songbook Page → Song Display: loads songs (evidence: `minstrels.js`)
- Song Display → Purchase Link: offers purchase (evidence: `minstrels.js`)
- Visitor → Admin Page: opens (evidence: `README.md`)
- Admin Page → Admin Console: manages content (evidence: `README.md`)
- Admin Console → Supabase Data: reads and writes (evidence: `admin.js`)
- Site Settings → Supabase Data: reads settings (evidence: `site.js`)
- Song Display → Supabase Data: reads published songs (evidence: `minstrels.js`)
- Admin Console → SMS Function: may invoke
- Visitor → Offline Cache: uses offline cache (evidence: `sw.js`)
