# shithawk/waynemusic architecture

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

- Interactive diagram: https://gitdiagram.com/shithawk/waynemusic
- Repository: https://github.com/shithawk/waynemusic

## Overview

Wayne’s Music is an iPad music library and player: users import local audio or add YouTube/SoundCloud links, then browse and play tracks. A share extension can hand supported links to the app. The graph also preserves the web app files visible in the tree, but their behavior and connections were not sampled. Edges reflect calls or references in the excerpts and SOURCE INDEX; unsampled implementation details are omitted.

Main entry points: [`WayneMusic/Library/LibraryStore.swift`](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Library/LibraryStore.swift) (Library store), [`WayneMusic/Views/NowPlayingView.swift`](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/NowPlayingView.swift) (Now playing UI), [`WayneMusic/Player/PlaybackController.swift`](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/PlaybackController.swift) (Playback controller), [`WayneMusic/App/WayneMusicApp.swift`](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/App/WayneMusicApp.swift) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Entry"]
  node_app["App bootstrap"]
  node_root["Root navigation<br/>[RootView.swift]"]
  node_speakers["Speaker guidance"]
  node_theme["Visual theme<br/>[Theme.swift]"]
end

subgraph group_library["Music Library"]
  node_songs["Song library UI<br/>[LibraryView.swift]"]
  node_add["Add music UI"]
  node_store[("Library store<br/>[LibraryStore.swift]")]
  node_track["Track model<br/>[Track.swift]"]
  node_parser["Link parser<br/>[LinkParser.swift]"]
end

subgraph group_playback["Playback"]
  node_nowplaying["Now playing UI"]
  node_controller["Playback controller"]
  node_playlist["Queue navigation<br/>[Playlist.swift]"]
  node_youtube["YouTube player"]
  node_soundcloud["SoundCloud player"]
  node_webfactory["Web player setup"]
end

subgraph group_sharing["Link Sharing"]
  node_appgroup["Shared link handoff<br/>[AppGroup.swift]"]
  node_extension["Share extension"]
end

node_listener(("Listener"))
node_youtube_service(("YouTube"))
node_soundcloud_service(("SoundCloud"))
node_webapp["Web app<br/>[app.js]"]

node_listener -->|"opens"| node_app
node_app -->|"creates"| node_store
node_app -->|"creates"| node_controller
node_app -->|"shows"| node_root
node_root -->|"shows"| node_nowplaying
node_songs -->|"reads"| node_store
node_songs -->|"queues tracks"| node_controller
node_songs -->|"presents"| node_add
node_add -->|"imports audio"| node_store
node_store -->|"parses links"| node_parser
node_store -->|"reads pending link"| node_appgroup
node_store -->|"stores tracks"| node_track
node_extension -->|"validates link"| node_parser
node_extension -->|"saves pending link"| node_appgroup
node_listener -->|"shares link"| node_extension
node_nowplaying -->|"controls playback"| node_controller
node_nowplaying -->|"renders"| node_youtube
node_nowplaying -->|"renders"| node_soundcloud
node_nowplaying -->|"loads artwork"| node_store
node_nowplaying -->|"shows guidance"| node_speakers
node_controller -->|"selects adjacent track"| node_playlist
node_controller -->|"plays track"| node_track
node_youtube -->|"creates web view"| node_webfactory
node_soundcloud -->|"creates web view"| node_webfactory
node_soundcloud -->|"reports playback"| node_controller
node_youtube -.->|"loads media"| node_youtube_service
node_soundcloud -->|"loads media"| node_soundcloud_service
node_listener -->|"uses"| node_webapp

click node_app "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/App/WayneMusicApp.swift"
click node_root "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/RootView.swift"
click node_songs "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/LibraryView.swift"
click node_add "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/AddTrackSheet.swift"
click node_store "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Library/LibraryStore.swift"
click node_track "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Models/Track.swift"
click node_parser "https://github.com/shithawk/waynemusic/blob/main/Shared/LinkParser.swift"
click node_appgroup "https://github.com/shithawk/waynemusic/blob/main/Shared/AppGroup.swift"
click node_extension "https://github.com/shithawk/waynemusic/blob/main/ShareExtension/ShareViewController.swift"
click node_nowplaying "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/NowPlayingView.swift"
click node_controller "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/PlaybackController.swift"
click node_playlist "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/Playlist.swift"
click node_youtube "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/YouTubePlayerView.swift"
click node_soundcloud "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/SoundCloudPlayerView.swift"
click node_webfactory "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/WebPlayerFactory.swift"
click node_speakers "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/SpeakersButton.swift"
click node_theme "https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/Theme.swift"
click node_webapp "https://github.com/shithawk/waynemusic/blob/main/web/app.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_app,node_root,node_speakers,node_theme toneBlue
class node_songs,node_add,node_store,node_track,node_parser toneAmber
class node_nowplaying,node_controller,node_playlist,node_youtube,node_soundcloud,node_webfactory toneMint
class node_appgroup,node_extension toneRose
class node_listener,node_youtube_service,node_soundcloud_service toneIndigo
class node_webapp toneTeal
```

## Components

### App Entry

- [App bootstrap](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/App/WayneMusicApp.swift): `WayneMusic/App/WayneMusicApp.swift`
- [Root navigation](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/RootView.swift): `WayneMusic/Views/RootView.swift`
- [Speaker guidance](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/SpeakersButton.swift): `WayneMusic/Views/SpeakersButton.swift`
- [Visual theme](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/Theme.swift): `WayneMusic/Views/Theme.swift`

### Music Library

- [Song library UI](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/LibraryView.swift): `WayneMusic/Views/LibraryView.swift`
- [Add music UI](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/AddTrackSheet.swift): `WayneMusic/Views/AddTrackSheet.swift`
- [Library store](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Library/LibraryStore.swift): `WayneMusic/Library/LibraryStore.swift`
- [Track model](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Models/Track.swift): `WayneMusic/Models/Track.swift`
- [Link parser](https://github.com/shithawk/waynemusic/blob/main/Shared/LinkParser.swift): `Shared/LinkParser.swift`

### Playback

- [Now playing UI](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Views/NowPlayingView.swift): `WayneMusic/Views/NowPlayingView.swift`
- [Playback controller](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/PlaybackController.swift): `WayneMusic/Player/PlaybackController.swift`
- [Queue navigation](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/Playlist.swift): `WayneMusic/Player/Playlist.swift`
- [YouTube player](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/YouTubePlayerView.swift): `WayneMusic/Player/YouTubePlayerView.swift`
- [SoundCloud player](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/SoundCloudPlayerView.swift): `WayneMusic/Player/SoundCloudPlayerView.swift`
- [Web player setup](https://github.com/shithawk/waynemusic/blob/main/WayneMusic/Player/WebPlayerFactory.swift): `WayneMusic/Player/WebPlayerFactory.swift`

### Link Sharing

- [Shared link handoff](https://github.com/shithawk/waynemusic/blob/main/Shared/AppGroup.swift): `Shared/AppGroup.swift`
- [Share extension](https://github.com/shithawk/waynemusic/blob/main/ShareExtension/ShareViewController.swift): `ShareExtension/ShareViewController.swift`

### Other components

- **Listener**
- **YouTube**
- **SoundCloud**
- [Web app](https://github.com/shithawk/waynemusic/blob/main/web/app.js): `web/app.js`

## Connections

- Listener → App bootstrap: opens
- App bootstrap → Library store: creates (evidence: `WayneMusic/App/WayneMusicApp.swift`)
- App bootstrap → Playback controller: creates (evidence: `WayneMusic/App/WayneMusicApp.swift`)
- App bootstrap → Root navigation: shows (evidence: `WayneMusic/App/WayneMusicApp.swift`)
- Root navigation → Now playing UI: shows (evidence: `WayneMusic/Views/RootView.swift`)
- Song library UI → Library store: reads (evidence: `WayneMusic/Views/LibraryView.swift`)
- Song library UI → Playback controller: queues tracks (evidence: `WayneMusic/Views/LibraryView.swift`)
- Song library UI → Add music UI: presents (evidence: `WayneMusic/Views/LibraryView.swift`)
- Add music UI → Library store: imports audio (evidence: `WayneMusic/Views/AddTrackSheet.swift`)
- Library store → Link parser: parses links (evidence: `WayneMusic/Library/LibraryStore.swift`)
- Library store → Shared link handoff: reads pending link (evidence: `WayneMusic/Library/LibraryStore.swift`)
- Library store → Track model: stores tracks (evidence: `WayneMusic/Library/LibraryStore.swift`)
- Share extension → Link parser: validates link (evidence: `ShareExtension/ShareViewController.swift`)
- Share extension → Shared link handoff: saves pending link (evidence: `ShareExtension/ShareViewController.swift`)
- Listener → Share extension: shares link
- Now playing UI → Playback controller: controls playback (evidence: `WayneMusic/Views/NowPlayingView.swift`)
- Now playing UI → YouTube player: renders (evidence: `WayneMusic/Views/NowPlayingView.swift`)
- Now playing UI → SoundCloud player: renders (evidence: `WayneMusic/Views/NowPlayingView.swift`)
- Now playing UI → Library store: loads artwork (evidence: `WayneMusic/Views/NowPlayingView.swift`)
- Now playing UI → Speaker guidance: shows guidance (evidence: `WayneMusic/Views/NowPlayingView.swift`)
- Playback controller → Queue navigation: selects adjacent track (evidence: `WayneMusic/Player/PlaybackController.swift`)
- Playback controller → Track model: plays track (evidence: `WayneMusic/Player/PlaybackController.swift`)
- YouTube player → Web player setup: creates web view (evidence: `WayneMusic/Player/YouTubePlayerView.swift`)
- SoundCloud player → Web player setup: creates web view (evidence: `WayneMusic/Player/SoundCloudPlayerView.swift`)
- SoundCloud player → Playback controller: reports playback (evidence: `WayneMusic/Player/SoundCloudPlayerView.swift`)
- YouTube player → YouTube: loads media
- SoundCloud player → SoundCloud: loads media (evidence: `WayneMusic/Player/SoundCloudPlayerView.swift`)
- Listener → Web app: uses
