# flbas1/party architecture

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

- Interactive diagram: https://gitdiagram.com/flbas1/party
- Repository: https://github.com/flbas1/party

## Overview

This is a configurable party/presentation app: the browser loads bootstrap and party configurations, discovers available parties, then renders the selected configuration as interactive components with party-specific assets and styling. A .NET server serves the frontend and party files, exposes party-discovery/configuration routes, and includes a Music Assistant API integration. The graph reflects the supplied excerpts and SOURCE INDEX; Music API handler details and several component implementations were not excerpted, so their internal behavior is not expanded.

Main entry points: [`src/registry/componentRegistry.tsx`](https://github.com/flbas1/party/blob/master/src/registry/componentRegistry.tsx) (Component registry), [`src/App.tsx`](https://github.com/flbas1/party/blob/master/src/App.tsx) (Party app), [`server/Program.cs`](https://github.com/flbas1/party/blob/master/server/Program.cs) (Party routes), [`src/components/SlideshowComponent.tsx`](https://github.com/flbas1/party/blob/master/src/components/SlideshowComponent.tsx) (Slideshow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Party experience"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["Party app<br/>[App.tsx]"]
  node_configs["Party configurations"]
  node_bootstrap["Bootstrap config<br/>[bootstrap.yml]"]
end

subgraph group_components["Presentation components"]
  node_registry["Component registry"]
  node_types["Component context<br/>[ComponentTypes.ts]"]
  node_content["Content components<br/>[TextComponent.tsx]"]
  node_layout["Layout and cards"]
  node_countdown["Countdown"]
  node_timer["Remaining-time hook"]
  node_reveal["Reveal components"]
  node_revealgame["Reveal game"]
  node_slideshow["Slideshow"]
  node_tabs["Tab cards"]
  node_media["Image and video<br/>[ImageComponent.tsx]"]
  node_html["HTML content<br/>[HtmlComponent.tsx]"]
  node_assets["Asset URL resolver<br/>[resolveAssetUrl.ts]"]
end

subgraph group_server["Server and parties"]
  node_serverapp["Web server<br/>[Program.cs]"]
  node_partyapi["Party routes<br/>[Program.cs]"]
  node_partystorage[("Party files")]
end

subgraph group_music["Music integration"]
  node_musicapi["Music API routes<br/>[MusicApi.cs]"]
  node_musicclient["Music Assistant client"]
end

node_user(("Party viewer"))
node_musicservice["Music Assistant"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"loads YAML"| node_bootstrap
node_app -->|"discovers parties"| node_partyapi
node_partyapi -->|"scans and reads"| node_partystorage
node_app -->|"loads selected config"| node_configs
node_serverapp -->|"maps routes"| node_partyapi
node_serverapp -->|"maps API"| node_musicapi
node_app -->|"renders nodes"| node_registry
node_registry -->|"dispatches"| node_content
node_registry -->|"dispatches"| node_layout
node_registry -->|"dispatches"| node_countdown
node_registry -->|"dispatches"| node_reveal
node_registry -->|"dispatches"| node_revealgame
node_registry -->|"dispatches"| node_slideshow
node_registry -->|"dispatches"| node_tabs
node_registry -->|"dispatches"| node_media
node_registry -->|"dispatches"| node_html
node_app -->|"uses context"| node_types
node_registry -->|"uses renderer types"| node_types
node_countdown -->|"tracks time"| node_timer
node_reveal -->|"tracks time"| node_timer
node_slideshow -->|"tracks time"| node_timer
node_slideshow -->|"resolves image"| node_assets
node_media -->|"resolves media"| node_assets
node_app -->|"loads party stylesheet"| node_partyapi
node_partyapi -->|"delegates"| node_musicclient
node_musicclient -->|"sends commands and queries"| node_musicservice

click node_entry "https://github.com/flbas1/party/blob/master/src/main.tsx"
click node_app "https://github.com/flbas1/party/blob/master/src/App.tsx"
click node_configs "https://github.com/flbas1/party/tree/master/partytime"
click node_bootstrap "https://github.com/flbas1/party/blob/master/bootstrap.yml"
click node_registry "https://github.com/flbas1/party/blob/master/src/registry/componentRegistry.tsx"
click node_types "https://github.com/flbas1/party/blob/master/src/types/ComponentTypes.ts"
click node_content "https://github.com/flbas1/party/blob/master/src/components/TextComponent.tsx"
click node_layout "https://github.com/flbas1/party/blob/master/src/components/LayoutComponent.tsx"
click node_countdown "https://github.com/flbas1/party/blob/master/src/components/CountdownComponent.tsx"
click node_timer "https://github.com/flbas1/party/blob/master/src/components/shared/useRemainingTime.ts"
click node_reveal "https://github.com/flbas1/party/blob/master/src/components/RevealComponent.tsx"
click node_revealgame "https://github.com/flbas1/party/blob/master/src/components/RevealGameComponent.tsx"
click node_slideshow "https://github.com/flbas1/party/blob/master/src/components/SlideshowComponent.tsx"
click node_tabs "https://github.com/flbas1/party/blob/master/src/components/TabCardComponent.tsx"
click node_media "https://github.com/flbas1/party/blob/master/src/components/ImageComponent.tsx"
click node_html "https://github.com/flbas1/party/blob/master/src/components/HtmlComponent.tsx"
click node_assets "https://github.com/flbas1/party/blob/master/src/utils/resolveAssetUrl.ts"
click node_serverapp "https://github.com/flbas1/party/blob/master/server/Program.cs"
click node_partyapi "https://github.com/flbas1/party/blob/master/server/Program.cs"
click node_partystorage "https://github.com/flbas1/party/tree/master/partytime"
click node_musicapi "https://github.com/flbas1/party/blob/master/server/MusicApi.cs"
click node_musicclient "https://github.com/flbas1/party/blob/master/server/MusicAssistantClient.cs"

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_entry,node_app,node_configs,node_bootstrap,node_user toneBlue
class node_registry,node_types,node_content,node_layout,node_countdown,node_timer,node_reveal,node_revealgame,node_slideshow,node_tabs,node_media,node_html,node_assets toneAmber
class node_serverapp,node_partyapi,node_partystorage toneMint
class node_musicapi,node_musicclient toneRose
class node_musicservice toneIndigo
```

## Components

### Party experience

- [React entry](https://github.com/flbas1/party/blob/master/src/main.tsx): `src/main.tsx`
- [Party app](https://github.com/flbas1/party/blob/master/src/App.tsx): `src/App.tsx`
- [Party configurations](https://github.com/flbas1/party/tree/master/partytime): `partytime`
- [Bootstrap config](https://github.com/flbas1/party/blob/master/bootstrap.yml): `bootstrap.yml`

### Presentation components

- [Component registry](https://github.com/flbas1/party/blob/master/src/registry/componentRegistry.tsx): `src/registry/componentRegistry.tsx`
- [Component context](https://github.com/flbas1/party/blob/master/src/types/ComponentTypes.ts): `src/types/ComponentTypes.ts`
- [Content components](https://github.com/flbas1/party/blob/master/src/components/TextComponent.tsx): `src/components/TextComponent.tsx`
- [Layout and cards](https://github.com/flbas1/party/blob/master/src/components/LayoutComponent.tsx): `src/components/LayoutComponent.tsx`
- [Countdown](https://github.com/flbas1/party/blob/master/src/components/CountdownComponent.tsx): `src/components/CountdownComponent.tsx`
- [Remaining-time hook](https://github.com/flbas1/party/blob/master/src/components/shared/useRemainingTime.ts): `src/components/shared/useRemainingTime.ts`
- [Reveal components](https://github.com/flbas1/party/blob/master/src/components/RevealComponent.tsx): `src/components/RevealComponent.tsx`
- [Reveal game](https://github.com/flbas1/party/blob/master/src/components/RevealGameComponent.tsx): `src/components/RevealGameComponent.tsx`
- [Slideshow](https://github.com/flbas1/party/blob/master/src/components/SlideshowComponent.tsx): `src/components/SlideshowComponent.tsx`
- [Tab cards](https://github.com/flbas1/party/blob/master/src/components/TabCardComponent.tsx): `src/components/TabCardComponent.tsx`
- [Image and video](https://github.com/flbas1/party/blob/master/src/components/ImageComponent.tsx): `src/components/ImageComponent.tsx`
- [HTML content](https://github.com/flbas1/party/blob/master/src/components/HtmlComponent.tsx): `src/components/HtmlComponent.tsx`
- [Asset URL resolver](https://github.com/flbas1/party/blob/master/src/utils/resolveAssetUrl.ts): `src/utils/resolveAssetUrl.ts`

### Server and parties

- [Web server](https://github.com/flbas1/party/blob/master/server/Program.cs): `server/Program.cs`
- [Party routes](https://github.com/flbas1/party/blob/master/server/Program.cs): `server/Program.cs`
- [Party files](https://github.com/flbas1/party/tree/master/partytime): `partytime`

### Music integration

- [Music API routes](https://github.com/flbas1/party/blob/master/server/MusicApi.cs): `server/MusicApi.cs`
- [Music Assistant client](https://github.com/flbas1/party/blob/master/server/MusicAssistantClient.cs): `server/MusicAssistantClient.cs`

### Other components

- **Party viewer**
- **Music Assistant**

## Connections

- Party viewer → React entry: opens app
- React entry → Party app: renders (evidence: `src/main.tsx`)
- Party app → Bootstrap config: loads YAML (evidence: `src/App.tsx`)
- Party app → Party routes: discovers parties (evidence: `src/App.tsx`)
- Party routes → Party files: scans and reads (evidence: `server/Program.cs`)
- Party app → Party configurations: loads selected config (evidence: `src/App.tsx`)
- Web server → Party routes: maps routes (evidence: `server/Program.cs`)
- Web server → Music API routes: maps API (evidence: `server/Program.cs`)
- Party app → Component registry: renders nodes (evidence: `src/App.tsx`)
- Component registry → Content components: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Layout and cards: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Countdown: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Reveal components: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Reveal game: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Slideshow: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Tab cards: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → Image and video: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Component registry → HTML content: dispatches (evidence: `src/registry/componentRegistry.tsx`)
- Party app → Component context: uses context (evidence: `src/App.tsx`)
- Component registry → Component context: uses renderer types (evidence: `src/registry/componentRegistry.tsx`)
- Countdown → Remaining-time hook: tracks time (evidence: `src/components/CountdownComponent.tsx`)
- Reveal components → Remaining-time hook: tracks time (evidence: `src/components/RevealComponent.tsx`)
- Slideshow → Remaining-time hook: tracks time (evidence: `src/components/SlideshowComponent.tsx`)
- Slideshow → Asset URL resolver: resolves image (evidence: `src/components/SlideshowComponent.tsx`)
- Image and video → Asset URL resolver: resolves media (evidence: `src/components/ImageComponent.tsx`)
- Party app → Party routes: loads party stylesheet (evidence: `src/App.tsx`)
- Party routes → Music Assistant client: delegates (evidence: `server/Program.cs`)
- Music Assistant client → Music Assistant: sends commands and queries (evidence: `server/MusicAssistantClient.cs`)
