# zxcloli666/soundcloud-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/zxcloli666/soundcloud-desktop
- Repository: https://github.com/zxcloli666/soundcloud-desktop

## Overview

SoundCloud Desktop is a native Tauri/React music client. The main user journey is navigating the app, finding or selecting music, and playing it; the repository also includes library, offline, lyrics, subscription, and desktop-integration features. The sampled frontend shows app routing and search composition, and the sampled Rust audio code shows track loading and playback construction. Many feature modules are represented from the tree and README, so their internal call wiring is intentionally not inferred.

Main entry points: [`desktop/src/pages`](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/pages) (Feature pages), [`desktop/src/App.tsx`](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/App.tsx) (App and routes), [`desktop/src-tauri/src/audio/engine.rs`](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src-tauri/src/audio/engine.rs) (Audio engine), [`desktop/src/components/music`](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/music) (Player controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App and routes<br/>[App.tsx]"]
  node_pages["Feature pages"]
  node_shell["App shell<br/>[AppShell.tsx]"]
end

subgraph group_catalog["Music discovery"]
  node_search["Search wall<br/>[useSearchWall.ts]"]
  node_discover["Discover catalog"]
  node_home["Home feed"]
  node_library["Library and playlists"]
  node_artist_album["Artist and album"]
  node_track["Track details"]
end

subgraph group_playback["Playback and offline"]
  node_player_ui["Player controls"]
  node_lyrics["Lyrics and comments"]
  node_offline["Offline library"]
end

subgraph group_native["Native runtime"]
  node_audio["Audio engine<br/>[engine.rs]"]
  node_cache[("Track cache")]
  node_settings_store["App settings<br/>[settings.ts]"]
  node_storage[("Persistent storage<br/>[tauri-storage.ts]")]
end

subgraph group_account["Account and integrations"]
  node_subscription["Star subscription"]
  node_auth["Authentication"]
  node_system["Desktop services"]
end

node_user(("Listener"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_pages
node_app -->|"renders"| node_shell
node_pages -->|"search feature"| node_search
node_pages -->|"discovery feature"| node_discover
node_pages -->|"home feed"| node_home
node_pages -->|"library feature"| node_library
node_pages -->|"catalog details"| node_artist_album
node_pages -->|"track details"| node_track
node_search -->|"navigates results"| node_pages
node_player_ui -->|"playback commands"| node_audio
node_offline -->|"offline files"| node_cache
node_audio -->|"loads cached tracks"| node_cache
node_settings_store -->|"persists state"| node_storage
node_pages -->|"subscription feature"| node_subscription
node_pages -->|"login feature"| node_auth
node_player_ui -->|"lyrics feature"| node_lyrics
node_audio -.->|"media controls"| node_system

click node_app "https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/App.tsx"
click node_pages "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/pages"
click node_shell "https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/components/layout/AppShell.tsx"
click node_search "https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/components/search/useSearchWall.ts"
click node_discover "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/discover"
click node_home "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/home"
click node_library "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/library"
click node_artist_album "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/artist"
click node_track "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/track"
click node_player_ui "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/music"
click node_lyrics "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/music/lyrics"
click node_offline "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/offline"
click node_audio "https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src-tauri/src/audio/engine.rs"
click node_cache "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src-tauri/src/track_cache"
click node_settings_store "https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/stores/settings.ts"
click node_storage "https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/lib/tauri-storage.ts"
click node_subscription "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/subscription"
click node_auth "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/auth"
click node_system "https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src-tauri/src/app"

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_pages,node_shell toneBlue
class node_search,node_discover,node_home,node_library,node_artist_album,node_track toneAmber
class node_player_ui,node_lyrics,node_offline toneMint
class node_audio,node_cache,node_settings_store,node_storage toneRose
class node_subscription,node_auth,node_system,node_user toneIndigo
```

## Components

### App experience

- [App and routes](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/App.tsx): `desktop/src/App.tsx`
- [Feature pages](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/pages): `desktop/src/pages`
- [App shell](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/components/layout/AppShell.tsx): `desktop/src/components/layout/AppShell.tsx`

### Music discovery

- [Search wall](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/components/search/useSearchWall.ts): `desktop/src/components/search/useSearchWall.ts`
- [Discover catalog](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/discover): `desktop/src/components/discover`
- [Home feed](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/home): `desktop/src/components/home`
- [Library and playlists](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/library): `desktop/src/components/library`
- [Artist and album](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/artist): `desktop/src/components/artist`
- [Track details](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/track): `desktop/src/components/track`

### Playback and offline

- [Player controls](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/music): `desktop/src/components/music`
- [Lyrics and comments](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/music/lyrics): `desktop/src/components/music/lyrics`
- [Offline library](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/offline): `desktop/src/components/offline`

### Native runtime

- [Audio engine](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src-tauri/src/audio/engine.rs): `desktop/src-tauri/src/audio/engine.rs`
- [Track cache](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src-tauri/src/track_cache): `desktop/src-tauri/src/track_cache`
- [App settings](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/stores/settings.ts): `desktop/src/stores/settings.ts`
- [Persistent storage](https://github.com/zxcloli666/soundcloud-desktop/blob/main/desktop/src/lib/tauri-storage.ts): `desktop/src/lib/tauri-storage.ts`

### Account and integrations

- [Star subscription](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/subscription): `desktop/src/components/subscription`
- [Authentication](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src/components/auth): `desktop/src/components/auth`
- [Desktop services](https://github.com/zxcloli666/soundcloud-desktop/tree/main/desktop/src-tauri/src/app): `desktop/src-tauri/src/app`

### Other components

- **Listener**

## Connections

- Listener → App and routes: opens
- App and routes → Feature pages: routes to
- App and routes → App shell: renders
- Feature pages → Search wall: search feature
- Feature pages → Discover catalog: discovery feature
- Feature pages → Home feed: home feed
- Feature pages → Library and playlists: library feature
- Feature pages → Artist and album: catalog details
- Feature pages → Track details: track details
- Search wall → Feature pages: navigates results
- Player controls → Audio engine: playback commands
- Offline library → Track cache: offline files
- Audio engine → Track cache: loads cached tracks
- App settings → Persistent storage: persists state
- Feature pages → Star subscription: subscription feature
- Feature pages → Authentication: login feature
- Player controls → Lyrics and comments: lyrics feature
- Audio engine → Desktop services: media controls
