# yuazhi/yesplaymusic architecture

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

- Interactive diagram: https://gitdiagram.com/yuazhi/yesplaymusic
- Repository: https://github.com/yuazhi/yesplaymusic

## Overview

YesPlayMusic is a Vue-based third-party player for NetEase Cloud Music, available as a web app and Electron desktop app. Users browse or search music, authenticate when needed, select tracks, and play them with lyrics and playlist controls. The graph also preserves documented product capabilities such as MV playback, daily recommendations, Last.fm scrobbling, and desktop media controls. Source excerpts establish the app shell, routing, search, playback state, and track API; some feature links are documented by the README or remain unverified because their implementation was not sampled.

Main entry points: [`src/App.vue`](https://github.com/yuazhi/yesplaymusic/blob/master/src/App.vue) (App shell), [`src/api/track.js`](https://github.com/yuazhi/yesplaymusic/blob/master/src/api/track.js) (Track APIs), [`src/utils/request.js`](https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/request.js) (HTTP client), [`src/views/search.vue`](https://github.com/yuazhi/yesplaymusic/blob/master/src/views/search.vue) (Search views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App shell<br/>[App.vue]"]
  node_router["Route access<br/>[index.js]"]
  node_login["Login views<br/>[login.vue]"]
  node_settings["Settings<br/>[settings.vue]"]
end

subgraph group_catalog["Music discovery"]
  node_search["Search views<br/>[search.vue]"]
  node_search_types["Typed search<br/>[searchType.vue]"]
  node_catalog_views["Catalog pages"]
  node_track_lists["Track lists<br/>[TrackList.vue]"]
  node_media_rows["Media rows<br/>[CoverRow.vue]"]
end

subgraph group_playback["Playback and state"]
  node_store["Vuex state<br/>[index.js]"]
  node_player["Playback engine<br/>[Player.js]"]
  node_player_ui["Player controls<br/>[Player.vue]"]
  node_lyrics["Lyrics view<br/>[lyrics.vue]"]
  node_local_db[("Local cache<br/>[db.js]")]
end

subgraph group_services["Music services"]
  node_api_catalog["Catalog APIs<br/>[others.js]"]
  node_api_playlist["Playlist APIs<br/>[playlist.js]"]
  node_api_track["Track APIs<br/>[track.js]"]
  node_api_auth["Authentication API<br/>[auth.js]"]
  node_api_lastfm["Last.fm API<br/>[lastfm.js]"]
  node_request["HTTP client<br/>[request.js]"]
end

subgraph group_desktop["Desktop integration"]
  node_electron_main["Electron IPC<br/>[ipcMain.js]"]
  node_electron_renderer["Renderer bridge<br/>[ipcRenderer.js]"]
  node_desktop_media["Desktop media<br/>[mpris.js]"]
end

node_listener(("Listener"))
node_netease{{"NetEase API"}}
node_lastfm_service{{"Last.fm"}}

node_listener -->|"uses"| node_app
node_app -->|"renders routes"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_catalog_views
node_app -->|"dispatches fetches"| node_store
node_search -->|"searches"| node_api_catalog
node_search -->|"loads details"| node_api_track
node_search_types -->|"searches"| node_api_catalog
node_search_types -->|"loads details"| node_api_track
node_search -->|"renders results"| node_track_lists
node_search -->|"renders results"| node_media_rows
node_search_types -->|"renders results"| node_track_lists
node_catalog_views -.->|"loads playlists"| node_api_playlist
node_api_catalog -->|"sends requests"| node_request
node_api_playlist -->|"sends requests"| node_request
node_api_track -->|"sends requests"| node_request
node_api_auth -->|"sends requests"| node_request
node_request -->|"calls"| node_netease
node_api_track -->|"caches tracks"| node_local_db
node_api_track -->|"caches lyrics"| node_local_db
node_store -->|"creates"| node_player
node_app -->|"shows controls"| node_player_ui
node_app -->|"shows lyrics"| node_lyrics
node_player_ui -.->|"controls"| node_player
node_lyrics -->|"loads track data"| node_api_track
node_settings -->|"uses integration"| node_api_lastfm
node_api_lastfm -.->|"scrobbles"| node_lastfm_service
node_app -->|"initializes bridge"| node_electron_renderer
node_electron_renderer -.->|"sends IPC"| node_electron_main
node_electron_main -.->|"media controls"| node_desktop_media
node_electron_main -.->|"controls playback"| node_player

click node_app "https://github.com/yuazhi/yesplaymusic/blob/master/src/App.vue"
click node_router "https://github.com/yuazhi/yesplaymusic/blob/master/src/router/index.js"
click node_login "https://github.com/yuazhi/yesplaymusic/blob/master/src/views/login.vue"
click node_settings "https://github.com/yuazhi/yesplaymusic/blob/master/src/views/settings.vue"
click node_search "https://github.com/yuazhi/yesplaymusic/blob/master/src/views/search.vue"
click node_search_types "https://github.com/yuazhi/yesplaymusic/blob/master/src/views/searchType.vue"
click node_catalog_views "https://github.com/yuazhi/yesplaymusic/tree/master/src/views"
click node_track_lists "https://github.com/yuazhi/yesplaymusic/blob/master/src/components/TrackList.vue"
click node_media_rows "https://github.com/yuazhi/yesplaymusic/blob/master/src/components/CoverRow.vue"
click node_api_catalog "https://github.com/yuazhi/yesplaymusic/blob/master/src/api/others.js"
click node_api_playlist "https://github.com/yuazhi/yesplaymusic/blob/master/src/api/playlist.js"
click node_api_track "https://github.com/yuazhi/yesplaymusic/blob/master/src/api/track.js"
click node_api_auth "https://github.com/yuazhi/yesplaymusic/blob/master/src/api/auth.js"
click node_api_lastfm "https://github.com/yuazhi/yesplaymusic/blob/master/src/api/lastfm.js"
click node_request "https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/request.js"
click node_store "https://github.com/yuazhi/yesplaymusic/blob/master/src/store/index.js"
click node_player "https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/Player.js"
click node_player_ui "https://github.com/yuazhi/yesplaymusic/blob/master/src/components/Player.vue"
click node_lyrics "https://github.com/yuazhi/yesplaymusic/blob/master/src/views/lyrics.vue"
click node_local_db "https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/db.js"
click node_electron_main "https://github.com/yuazhi/yesplaymusic/blob/master/src/electron/ipcMain.js"
click node_electron_renderer "https://github.com/yuazhi/yesplaymusic/blob/master/src/electron/ipcRenderer.js"
click node_desktop_media "https://github.com/yuazhi/yesplaymusic/blob/master/src/electron/mpris.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_router,node_login,node_settings toneBlue
class node_search,node_search_types,node_catalog_views,node_track_lists,node_media_rows toneAmber
class node_store,node_player,node_player_ui,node_lyrics,node_local_db,node_netease toneMint
class node_api_catalog,node_api_playlist,node_api_track,node_api_auth,node_api_lastfm,node_request toneRose
class node_electron_main,node_electron_renderer,node_desktop_media,node_listener,node_lastfm_service toneIndigo
```

## Components

### App experience

- [App shell](https://github.com/yuazhi/yesplaymusic/blob/master/src/App.vue): `src/App.vue`
- [Route access](https://github.com/yuazhi/yesplaymusic/blob/master/src/router/index.js): `src/router/index.js`
- [Login views](https://github.com/yuazhi/yesplaymusic/blob/master/src/views/login.vue): `src/views/login.vue`
- [Settings](https://github.com/yuazhi/yesplaymusic/blob/master/src/views/settings.vue): `src/views/settings.vue`

### Music discovery

- [Search views](https://github.com/yuazhi/yesplaymusic/blob/master/src/views/search.vue): `src/views/search.vue`
- [Typed search](https://github.com/yuazhi/yesplaymusic/blob/master/src/views/searchType.vue): `src/views/searchType.vue`
- [Catalog pages](https://github.com/yuazhi/yesplaymusic/tree/master/src/views): `src/views`
- [Track lists](https://github.com/yuazhi/yesplaymusic/blob/master/src/components/TrackList.vue): `src/components/TrackList.vue`
- [Media rows](https://github.com/yuazhi/yesplaymusic/blob/master/src/components/CoverRow.vue): `src/components/CoverRow.vue`

### Playback and state

- [Vuex state](https://github.com/yuazhi/yesplaymusic/blob/master/src/store/index.js): `src/store/index.js`
- [Playback engine](https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/Player.js): `src/utils/Player.js`
- [Player controls](https://github.com/yuazhi/yesplaymusic/blob/master/src/components/Player.vue): `src/components/Player.vue`
- [Lyrics view](https://github.com/yuazhi/yesplaymusic/blob/master/src/views/lyrics.vue): `src/views/lyrics.vue`
- [Local cache](https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/db.js): `src/utils/db.js`

### Music services

- [Catalog APIs](https://github.com/yuazhi/yesplaymusic/blob/master/src/api/others.js): `src/api/others.js`
- [Playlist APIs](https://github.com/yuazhi/yesplaymusic/blob/master/src/api/playlist.js): `src/api/playlist.js`
- [Track APIs](https://github.com/yuazhi/yesplaymusic/blob/master/src/api/track.js): `src/api/track.js`
- [Authentication API](https://github.com/yuazhi/yesplaymusic/blob/master/src/api/auth.js): `src/api/auth.js`
- [Last.fm API](https://github.com/yuazhi/yesplaymusic/blob/master/src/api/lastfm.js): `src/api/lastfm.js`
- [HTTP client](https://github.com/yuazhi/yesplaymusic/blob/master/src/utils/request.js): `src/utils/request.js`

### Desktop integration

- [Electron IPC](https://github.com/yuazhi/yesplaymusic/blob/master/src/electron/ipcMain.js): `src/electron/ipcMain.js`
- [Renderer bridge](https://github.com/yuazhi/yesplaymusic/blob/master/src/electron/ipcRenderer.js): `src/electron/ipcRenderer.js`
- [Desktop media](https://github.com/yuazhi/yesplaymusic/blob/master/src/electron/mpris.js): `src/electron/mpris.js`

### Other components

- **Listener**
- **NetEase API**
- **Last.fm**

## Connections

- Listener → App shell: uses (evidence: `src/App.vue`)
- App shell → Route access: renders routes (evidence: `src/App.vue`)
- Route access → Login views: routes to (evidence: `src/router/index.js`)
- Route access → Catalog pages: routes to (evidence: `src/router/index.js`)
- App shell → Vuex state: dispatches fetches (evidence: `src/App.vue`)
- Search views → Catalog APIs: searches (evidence: `src/views/search.vue`)
- Search views → Track APIs: loads details (evidence: `src/views/search.vue`)
- Typed search → Catalog APIs: searches (evidence: `src/views/searchType.vue`)
- Typed search → Track APIs: loads details (evidence: `src/views/searchType.vue`)
- Search views → Track lists: renders results (evidence: `src/views/search.vue`)
- Search views → Media rows: renders results (evidence: `src/views/search.vue`)
- Typed search → Track lists: renders results (evidence: `src/views/searchType.vue`)
- Catalog pages → Playlist APIs: loads playlists
- Catalog APIs → HTTP client: sends requests (evidence: `src/api/others.js`)
- Playlist APIs → HTTP client: sends requests (evidence: `src/api/playlist.js`)
- Track APIs → HTTP client: sends requests (evidence: `src/api/track.js`)
- Authentication API → HTTP client: sends requests (evidence: `src/api/auth.js`)
- HTTP client → NetEase API: calls (evidence: `README.md`)
- Track APIs → Local cache: caches tracks (evidence: `src/api/track.js`)
- Track APIs → Local cache: caches lyrics (evidence: `src/api/track.js`)
- Vuex state → Playback engine: creates (evidence: `src/store/index.js`)
- App shell → Player controls: shows controls (evidence: `src/App.vue`)
- App shell → Lyrics view: shows lyrics (evidence: `src/App.vue`)
- Player controls → Playback engine: controls
- Lyrics view → Track APIs: loads track data (evidence: `src/views/lyrics.vue`)
- Settings → Last.fm API: uses integration (evidence: `src/views/settings.vue`)
- Last.fm API → Last.fm: scrobbles (evidence: `README.md`)
- App shell → Renderer bridge: initializes bridge (evidence: `src/App.vue`)
- Renderer bridge → Electron IPC: sends IPC
- Electron IPC → Desktop media: media controls
- Electron IPC → Playback engine: controls playback
