# team-spotube/spotube architecture

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

- Interactive diagram: https://gitdiagram.com/team-spotube/spotube
- Repository: https://github.com/team-spotube/spotube

## Overview

Spotube is documented as a cross-platform, plugin-extensible music streaming app with local playback controls, downloadable tagged tracks, and time-synced lyrics. The available source shows native launch shells and an Android home-player widget, but not the main Flutter music workflow or its plugin, download, and lyrics implementations. The graph therefore focuses on evidenced platform entry points and Android widget behavior; documented but unsampled capabilities are noted rather than assigned invented source paths or connections.

Main entry points: [`android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt) (Home player), [`windows/runner/main.cpp`](https://github.com/team-spotube/spotube/blob/master/windows/runner/main.cpp) (Windows entry), [`linux/main.cc`](https://github.com/team-spotube/spotube/blob/master/linux/main.cc) (Linux entry), [`android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt`](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt) (Android entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Platform shells"]
  node_windows_entry["Windows entry<br/>[main.cpp]"]
  node_windows_window["Flutter window<br/>[flutter_window.cpp]"]
  node_linux_entry["Linux entry<br/>[main.cc]"]
  node_linux_application["Linux application<br/>[my_application.cc]"]
  node_android_entry["Android entry<br/>[MainActivity.kt]"]
  node_ios_widget["iOS widget"]
  node_website_releases["Older releases<br/>[releases.tsx]"]
  node_website_supporters["Supporters page<br/>[supporters.tsx]"]
end

subgraph group_android_widget["Android player widget"]
  node_android_widget["Home player"]
  node_track_model["Track model<br/>[Track.kt]"]
  node_track_details["Track details view"]
  node_track_progress["Track progress view<br/>[TrackProgress.kt]"]
  node_asset_image["Asset image provider"]
end

node_user(("App user"))

node_user -->|"launches"| node_windows_entry
node_windows_entry -->|"creates window"| node_windows_window
node_user -->|"launches"| node_linux_entry
node_linux_entry -->|"creates app"| node_linux_application
node_user -.->|"opens app"| node_android_entry
node_android_widget -->|"opens app"| node_android_entry
node_android_widget -->|"parses track"| node_track_model
node_android_widget -->|"renders details"| node_track_details
node_android_widget -->|"renders progress"| node_track_progress
node_android_widget -->|"uses provider"| node_asset_image

click node_windows_entry "https://github.com/team-spotube/spotube/blob/master/windows/runner/main.cpp"
click node_windows_window "https://github.com/team-spotube/spotube/blob/master/windows/runner/flutter_window.cpp"
click node_linux_entry "https://github.com/team-spotube/spotube/blob/master/linux/main.cc"
click node_linux_application "https://github.com/team-spotube/spotube/blob/master/linux/my_application.cc"
click node_android_entry "https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt"
click node_android_widget "https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt"
click node_track_model "https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Track.kt"
click node_track_details "https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackDetailsView.kt"
click node_track_progress "https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackProgress.kt"
click node_asset_image "https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/FlutterAssetImageProvider.kt"
click node_ios_widget "https://github.com/team-spotube/spotube/blob/master/ios/HomePlayerWidget/HomePlayerWidget.swift"
click node_website_releases "https://github.com/team-spotube/spotube/blob/master/website/src/modules/downloads/older/releases.tsx"
click node_website_supporters "https://github.com/team-spotube/spotube/blob/master/website/src/modules/root/supporters.tsx"

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_windows_entry,node_windows_window,node_linux_entry,node_linux_application,node_android_entry,node_ios_widget,node_website_releases,node_website_supporters,node_user toneBlue
class node_android_widget,node_track_model,node_track_details,node_track_progress,node_asset_image toneAmber
```

## Components

### Platform shells

- [Windows entry](https://github.com/team-spotube/spotube/blob/master/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/team-spotube/spotube/blob/master/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Linux entry](https://github.com/team-spotube/spotube/blob/master/linux/main.cc): `linux/main.cc`
- [Linux application](https://github.com/team-spotube/spotube/blob/master/linux/my_application.cc): `linux/my_application.cc`
- [Android entry](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt): `android/app/src/main/kotlin/oss/krtirtho/spotube/MainActivity.kt`
- [iOS widget](https://github.com/team-spotube/spotube/blob/master/ios/HomePlayerWidget/HomePlayerWidget.swift): `ios/HomePlayerWidget/HomePlayerWidget.swift`
- [Older releases](https://github.com/team-spotube/spotube/blob/master/website/src/modules/downloads/older/releases.tsx): `website/src/modules/downloads/older/releases.tsx`
- [Supporters page](https://github.com/team-spotube/spotube/blob/master/website/src/modules/root/supporters.tsx): `website/src/modules/root/supporters.tsx`

### Android player widget

- [Home player](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt): `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`
- [Track model](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Track.kt): `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/models/Track.kt`
- [Track details view](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackDetailsView.kt): `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackDetailsView.kt`
- [Track progress view](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackProgress.kt): `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/TrackProgress.kt`
- [Asset image provider](https://github.com/team-spotube/spotube/blob/master/android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/FlutterAssetImageProvider.kt): `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/widgets/FlutterAssetImageProvider.kt`

### Other components

- **App user**

## Connections

- App user → Windows entry: launches (evidence: `windows/runner/main.cpp`)
- Windows entry → Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- App user → Linux entry: launches (evidence: `linux/main.cc`)
- Linux entry → Linux application: creates app (evidence: `linux/main.cc`)
- App user → Android entry: opens app
- Home player → Android entry: opens app (evidence: `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`)
- Home player → Track model: parses track (evidence: `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`)
- Home player → Track details view: renders details (evidence: `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`)
- Home player → Track progress view: renders progress (evidence: `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`)
- Home player → Asset image provider: uses provider (evidence: `android/app/src/main/kotlin/oss/krtirtho/spotube/glance/HomePlayerWidget.kt`)
