# sopat712/allstarr architecture

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

- Interactive diagram: https://gitdiagram.com/sopat712/allstarr
- Repository: https://github.com/sopat712/allstarr

## Overview

Allstarr is a Jellyfin-facing music proxy: a client request reaches the Jellyfin controller, which serves local media or finds external music, downloads it into the library/cache, and returns it through the proxy. Separate branches cover Spotify playlist injection, lyrics, playback scrobbling, Subsonic compatibility, and the administration dashboard. The README documents capabilities beyond the sampled implementation; those branches are shown at subsystem level where source details were not available.

Main entry points: [`allstarr/Controllers/JellyfinController.cs`](https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/JellyfinController.cs) (Jellyfin API), [`allstarr/Services/Common/BaseDownloadService.cs`](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Common/BaseDownloadService.cs) (Download and cache), [`allstarr/Controllers/PlaylistController.cs`](https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/PlaylistController.cs) (Playlist management), [`allstarr/wwwroot/js/main.js`](https://github.com/sopat712/allstarr/blob/main/allstarr/wwwroot/js/main.js) (Admin dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_proxy["Media proxy"]
  node_jelly_controller["Jellyfin API"]
  node_session["Jellyfin sessions"]
  node_proxy_service["Jellyfin proxy"]
  node_local_library["Local library"]
  node_download["Download and cache"]
  node_redis[("Redis cache")]
end

subgraph group_providers["Music providers"]
  node_deezer["Deezer metadata"]
  node_qobuz["Qobuz metadata"]
  node_squid["SquidWTF provider"]
  node_spotify["Spotify services"]
end

subgraph group_playlists["Playlist integration"]
  node_playlist_controller["Playlist management"]
  node_playlist_sync["Playlist synchronization"]
  node_subsonic["Subsonic API"]
end

subgraph group_engagement["Playback features"]
  node_lyrics["Lyrics sources"]
  node_scrobbling["Scrobbling"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin dashboard<br/>[main.js]"]
  node_admin_api["Admin API<br/>[AdminController.cs]"]
  node_admin_auth["Admin sessions"]
end

node_client(("Music client"))
node_jellyfin["Jellyfin server"]
node_provider_services["Streaming providers"]
node_lyrics_sources["Lyrics services"]
node_scrobble_services["Last.fm / ListenBrainz"]

node_client -->|"requests media"| node_jelly_controller
node_jelly_controller -->|"proxies requests"| node_jellyfin
node_jelly_controller -->|"forwards calls"| node_proxy_service
node_jelly_controller -->|"tracks sessions"| node_session
node_jelly_controller -->|"checks local media"| node_local_library
node_jelly_controller -.->|"searches metadata"| node_deezer
node_jelly_controller -.->|"searches metadata"| node_qobuz
node_jelly_controller -.->|"searches metadata"| node_squid
node_jelly_controller -->|"requests downloads"| node_download
node_download -->|"writes tracks"| node_local_library
node_download -->|"fetches audio"| node_provider_services
node_jelly_controller -->|"serves lyrics"| node_lyrics
node_lyrics -->|"queries sources"| node_lyrics_sources
node_jelly_controller -->|"reports playback"| node_scrobbling
node_scrobbling -->|"submits plays"| node_scrobble_services
node_jelly_controller -->|"syncs playlists"| node_playlist_sync
node_playlist_controller -->|"fetches playlists"| node_spotify
node_playlist_controller -->|"reads mappings"| node_redis
node_client -->|"uses compatible API"| node_subsonic
node_admin_ui -->|"configures service"| node_admin_api
node_admin_api -.->|"checks sessions"| node_admin_auth
node_admin_ui -->|"manages playlists"| node_playlist_controller

click node_jelly_controller "https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/JellyfinController.cs"
click node_session "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Jellyfin/JellyfinSessionManager.cs"
click node_proxy_service "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Jellyfin/JellyfinProxyService.cs"
click node_local_library "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Local/LocalLibraryService.cs"
click node_download "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Common/BaseDownloadService.cs"
click node_deezer "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Deezer/DeezerMetadataService.cs"
click node_qobuz "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Qobuz/QobuzMetadataService.cs"
click node_squid "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/SquidWTF/SquidWTFMetadataService.cs"
click node_spotify "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Spotify/SpotifyApiClient.cs"
click node_redis "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Common/RedisCacheService.cs"
click node_playlist_controller "https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/PlaylistController.cs"
click node_playlist_sync "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Subsonic/PlaylistSyncService.cs"
click node_subsonic "https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/SubSonicController.cs"
click node_lyrics "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Lyrics/LyricsOrchestrator.cs"
click node_scrobbling "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Scrobbling/ScrobblingOrchestrator.cs"
click node_admin_ui "https://github.com/sopat712/allstarr/blob/main/allstarr/wwwroot/js/main.js"
click node_admin_api "https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/AdminController.cs"
click node_admin_auth "https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Admin/AdminAuthSessionService.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_jelly_controller,node_session,node_proxy_service,node_local_library,node_download,node_redis,node_client toneBlue
class node_deezer,node_qobuz,node_squid,node_spotify toneAmber
class node_playlist_controller,node_playlist_sync,node_subsonic,node_jellyfin toneMint
class node_lyrics,node_scrobbling toneRose
class node_admin_ui,node_admin_api,node_admin_auth,node_provider_services,node_lyrics_sources,node_scrobble_services toneIndigo
```

## Components

### Media proxy

- [Jellyfin API](https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/JellyfinController.cs): `allstarr/Controllers/JellyfinController.cs`
- [Jellyfin sessions](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Jellyfin/JellyfinSessionManager.cs): `allstarr/Services/Jellyfin/JellyfinSessionManager.cs`
- [Jellyfin proxy](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Jellyfin/JellyfinProxyService.cs): `allstarr/Services/Jellyfin/JellyfinProxyService.cs`
- [Local library](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Local/LocalLibraryService.cs): `allstarr/Services/Local/LocalLibraryService.cs`
- [Download and cache](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Common/BaseDownloadService.cs): `allstarr/Services/Common/BaseDownloadService.cs`
- [Redis cache](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Common/RedisCacheService.cs): `allstarr/Services/Common/RedisCacheService.cs`

### Music providers

- [Deezer metadata](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Deezer/DeezerMetadataService.cs): `allstarr/Services/Deezer/DeezerMetadataService.cs`
- [Qobuz metadata](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Qobuz/QobuzMetadataService.cs): `allstarr/Services/Qobuz/QobuzMetadataService.cs`
- [SquidWTF provider](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/SquidWTF/SquidWTFMetadataService.cs): `allstarr/Services/SquidWTF/SquidWTFMetadataService.cs`
- [Spotify services](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Spotify/SpotifyApiClient.cs): `allstarr/Services/Spotify/SpotifyApiClient.cs`

### Playlist integration

- [Playlist management](https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/PlaylistController.cs): `allstarr/Controllers/PlaylistController.cs`
- [Playlist synchronization](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Subsonic/PlaylistSyncService.cs): `allstarr/Services/Subsonic/PlaylistSyncService.cs`
- [Subsonic API](https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/SubSonicController.cs): `allstarr/Controllers/SubSonicController.cs`

### Playback features

- [Lyrics sources](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Lyrics/LyricsOrchestrator.cs): `allstarr/Services/Lyrics/LyricsOrchestrator.cs`
- [Scrobbling](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Scrobbling/ScrobblingOrchestrator.cs): `allstarr/Services/Scrobbling/ScrobblingOrchestrator.cs`

### Administration

- [Admin dashboard](https://github.com/sopat712/allstarr/blob/main/allstarr/wwwroot/js/main.js): `allstarr/wwwroot/js/main.js`
- [Admin API](https://github.com/sopat712/allstarr/blob/main/allstarr/Controllers/AdminController.cs): `allstarr/Controllers/AdminController.cs`
- [Admin sessions](https://github.com/sopat712/allstarr/blob/main/allstarr/Services/Admin/AdminAuthSessionService.cs): `allstarr/Services/Admin/AdminAuthSessionService.cs`

### Other components

- **Music client**
- **Jellyfin server**
- **Streaming providers**
- **Lyrics services**
- **Last.fm / ListenBrainz**

## Connections

- Music client → Jellyfin API: requests media
- Jellyfin API → Jellyfin server: proxies requests (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Jellyfin API → Jellyfin proxy: forwards calls (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Jellyfin API → Jellyfin sessions: tracks sessions (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Jellyfin API → Local library: checks local media (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Jellyfin API → Deezer metadata: searches metadata
- Jellyfin API → Qobuz metadata: searches metadata
- Jellyfin API → SquidWTF provider: searches metadata (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Jellyfin API → Download and cache: requests downloads (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Download and cache → Local library: writes tracks (evidence: `allstarr/Services/Common/BaseDownloadService.cs`)
- Download and cache → Streaming providers: fetches audio
- Jellyfin API → Lyrics sources: serves lyrics (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Lyrics sources → Lyrics services: queries sources
- Jellyfin API → Scrobbling: reports playback (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Scrobbling → Last.fm / ListenBrainz: submits plays
- Jellyfin API → Playlist synchronization: syncs playlists (evidence: `allstarr/Controllers/JellyfinController.cs`)
- Playlist management → Spotify services: fetches playlists (evidence: `allstarr/Controllers/PlaylistController.cs`)
- Playlist management → Redis cache: reads mappings (evidence: `allstarr/Controllers/PlaylistController.cs`)
- Music client → Subsonic API: uses compatible API
- Admin dashboard → Admin API: configures service
- Admin API → Admin sessions: checks sessions
- Admin dashboard → Playlist management: manages playlists
