# xl1126/sodamusic-download architecture

> Architecture diagram of the GitHub repository xl1126/sodamusic-download, 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/xl1126/sodamusic-download
- Repository: https://github.com/xl1126/sodamusic-download

## Overview

Soda Download is a local Vue/Express application for signing in to Soda Music, resolving shared tracks or videos, browsing playlists and recommendations, and downloading individual or batched media. Its main workflow runs from a user-selected page through frontend API clients to Express route handlers, which obtain metadata or media and return results for display or download. The README documents capabilities beyond the sampled implementation; those are represented at their documented module paths, without assuming unsampled call wiring.

Main entry points: [`server/apis/index.js`](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/index.js) (Route registry), [`src/App.vue`](https://github.com/xl1126/sodamusic-download/blob/main/src/App.vue) (App navigation), [`server/index.js`](https://github.com/xl1126/sodamusic-download/blob/main/server/index.js) (HTTP server), [`src/pages/SingleTrackPage.vue`](https://github.com/xl1126/sodamusic-download/blob/main/src/pages/SingleTrackPage.vue) (Track resolver UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_app["App navigation<br/>[App.vue]"]
  node_single["Track resolver UI"]
  node_playlists["Playlist browser"]
  node_recommend["Recommendations<br/>[RecommendPage.vue]"]
  node_account["Account view"]
  node_login["Login dialog<br/>[LoginModal.vue]"]
  node_detail["Resource details"]
  node_batchui["Batch download UI"]
  node_authstore["Local auth state<br/>[authStorage.js]"]
end

subgraph group_client["Frontend API"]
  node_authclient["Auth client<br/>[auth.js]"]
  node_trackclient["Track client<br/>[tracks.js]"]
  node_videoclient["Video client<br/>[videos.js]"]
  node_playlistclient["Playlist client<br/>[playlists.js]"]
  node_recommendclient["Recommend client<br/>[recommend.js]"]
  node_shareclient["Share client<br/>[share.js]"]
end

subgraph group_server["Express API"]
  node_server["HTTP server<br/>[index.js]"]
  node_registry["Route registry<br/>[index.js]"]
  node_authroutes["Authentication routes<br/>[auth-qrcode.js]"]
  node_trackroutes["Track routes<br/>[track-v2.js]"]
  node_videoroutes["Video routes<br/>[video-v2.js]"]
  node_playlistroutes["Playlist routes<br/>[playlist-detail.js]"]
  node_batchroutes["Batch download routes"]
  node_recommendroutes["Recommendation routes"]
  node_shareroute["Share resolution<br/>[share-resolve.js]"]
end

subgraph group_media["Media processing"]
  node_download["Media downloads<br/>[track-download.js]"]
  node_videoextract["Video audio extraction"]
  node_batchprogress[("Batch progress state")]
end

node_user(("User"))
node_upstream{{"Soda Music service"}}
node_localstorage[("Browser storage")]

node_user -->|"navigates"| node_app
node_app -->|"shows page"| node_single
node_app -->|"shows page"| node_playlists
node_app -->|"shows page"| node_recommend
node_app -->|"shows page"| node_account
node_app -->|"opens login"| node_login
node_app -->|"reads and writes"| node_authstore
node_authstore -->|"persists auth"| node_localstorage
node_single -->|"shows details"| node_detail
node_playlists -->|"starts batch"| node_batchui
node_login -->|"requests login"| node_authclient
node_single -->|"resolves share"| node_shareclient
node_single -->|"requests track"| node_trackclient
node_single -->|"requests video"| node_videoclient
node_playlists -->|"loads playlists"| node_playlistclient
node_recommend -->|"loads recommendations"| node_recommendclient
node_authclient -->|"HTTP requests"| node_server
node_trackclient -->|"HTTP requests"| node_server
node_videoclient -->|"HTTP requests"| node_server
node_playlistclient -->|"HTTP requests"| node_server
node_recommendclient -->|"HTTP requests"| node_server
node_shareclient -->|"HTTP requests"| node_server
node_server -->|"loads routes"| node_registry
node_registry -->|"registers"| node_authroutes
node_registry -->|"registers"| node_trackroutes
node_registry -->|"registers"| node_videoroutes
node_registry -->|"registers"| node_playlistroutes
node_registry -->|"registers"| node_batchroutes
node_registry -->|"registers"| node_recommendroutes
node_registry -->|"registers"| node_shareroute
node_authroutes -->|"authenticates"| node_upstream
node_trackroutes -->|"fetches metadata"| node_upstream
node_videoroutes -->|"fetches metadata"| node_upstream
node_playlistroutes -->|"fetches playlist"| node_upstream
node_recommendroutes -->|"fetches recommendations"| node_upstream
node_shareroute -->|"resolves share"| node_upstream
node_trackroutes -.->|"downloads track"| node_download
node_videoroutes -.->|"extracts audio"| node_videoextract
node_batchroutes -->|"tracks progress"| node_batchprogress
node_batchroutes -.->|"downloads media"| node_download
node_batchroutes -.->|"converts video"| node_videoextract

click node_app "https://github.com/xl1126/sodamusic-download/blob/main/src/App.vue"
click node_single "https://github.com/xl1126/sodamusic-download/blob/main/src/pages/SingleTrackPage.vue"
click node_playlists "https://github.com/xl1126/sodamusic-download/blob/main/src/pages/MyPlaylistsPage.vue"
click node_recommend "https://github.com/xl1126/sodamusic-download/blob/main/src/pages/RecommendPage.vue"
click node_account "https://github.com/xl1126/sodamusic-download/blob/main/src/pages/AccountInfoPage.vue"
click node_login "https://github.com/xl1126/sodamusic-download/blob/main/src/components/LoginModal.vue"
click node_detail "https://github.com/xl1126/sodamusic-download/blob/main/src/components/ResourceDetailModal.vue"
click node_batchui "https://github.com/xl1126/sodamusic-download/blob/main/src/components/PlaylistBatchDownloadModal.vue"
click node_authstore "https://github.com/xl1126/sodamusic-download/blob/main/src/utils/authStorage.js"
click node_authclient "https://github.com/xl1126/sodamusic-download/blob/main/src/api/auth.js"
click node_trackclient "https://github.com/xl1126/sodamusic-download/blob/main/src/api/tracks.js"
click node_videoclient "https://github.com/xl1126/sodamusic-download/blob/main/src/api/videos.js"
click node_playlistclient "https://github.com/xl1126/sodamusic-download/blob/main/src/api/playlists.js"
click node_recommendclient "https://github.com/xl1126/sodamusic-download/blob/main/src/api/recommend.js"
click node_shareclient "https://github.com/xl1126/sodamusic-download/blob/main/src/api/share.js"
click node_server "https://github.com/xl1126/sodamusic-download/blob/main/server/index.js"
click node_registry "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/index.js"
click node_authroutes "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/auth-qrcode.js"
click node_trackroutes "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/track-v2.js"
click node_videoroutes "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/video-v2.js"
click node_playlistroutes "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/playlist-detail.js"
click node_batchroutes "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/playlist-batch-download.js"
click node_recommendroutes "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/recommend-song-tab.js"
click node_shareroute "https://github.com/xl1126/sodamusic-download/blob/main/server/apis/share-resolve.js"
click node_download "https://github.com/xl1126/sodamusic-download/blob/main/server/utils/track-download.js"
click node_videoextract "https://github.com/xl1126/sodamusic-download/blob/main/server/utils/video-audio-extractor.js"
click node_batchprogress "https://github.com/xl1126/sodamusic-download/blob/main/server/utils/batch-progress-store.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_single,node_playlists,node_recommend,node_account,node_login,node_detail,node_batchui,node_authstore,node_user toneBlue
class node_authclient,node_trackclient,node_videoclient,node_playlistclient,node_recommendclient,node_shareclient,node_localstorage toneAmber
class node_server,node_registry,node_authroutes,node_trackroutes,node_videoroutes,node_playlistroutes,node_batchroutes,node_recommendroutes,node_shareroute toneMint
class node_download,node_videoextract,node_batchprogress toneRose
class node_upstream toneIndigo
```

## Components

### User interface

- [App navigation](https://github.com/xl1126/sodamusic-download/blob/main/src/App.vue): `src/App.vue`
- [Track resolver UI](https://github.com/xl1126/sodamusic-download/blob/main/src/pages/SingleTrackPage.vue): `src/pages/SingleTrackPage.vue`
- [Playlist browser](https://github.com/xl1126/sodamusic-download/blob/main/src/pages/MyPlaylistsPage.vue): `src/pages/MyPlaylistsPage.vue`
- [Recommendations](https://github.com/xl1126/sodamusic-download/blob/main/src/pages/RecommendPage.vue): `src/pages/RecommendPage.vue`
- [Account view](https://github.com/xl1126/sodamusic-download/blob/main/src/pages/AccountInfoPage.vue): `src/pages/AccountInfoPage.vue`
- [Login dialog](https://github.com/xl1126/sodamusic-download/blob/main/src/components/LoginModal.vue): `src/components/LoginModal.vue`
- [Resource details](https://github.com/xl1126/sodamusic-download/blob/main/src/components/ResourceDetailModal.vue): `src/components/ResourceDetailModal.vue`
- [Batch download UI](https://github.com/xl1126/sodamusic-download/blob/main/src/components/PlaylistBatchDownloadModal.vue): `src/components/PlaylistBatchDownloadModal.vue`
- [Local auth state](https://github.com/xl1126/sodamusic-download/blob/main/src/utils/authStorage.js): `src/utils/authStorage.js`

### Frontend API

- [Auth client](https://github.com/xl1126/sodamusic-download/blob/main/src/api/auth.js): `src/api/auth.js`
- [Track client](https://github.com/xl1126/sodamusic-download/blob/main/src/api/tracks.js): `src/api/tracks.js`
- [Video client](https://github.com/xl1126/sodamusic-download/blob/main/src/api/videos.js): `src/api/videos.js`
- [Playlist client](https://github.com/xl1126/sodamusic-download/blob/main/src/api/playlists.js): `src/api/playlists.js`
- [Recommend client](https://github.com/xl1126/sodamusic-download/blob/main/src/api/recommend.js): `src/api/recommend.js`
- [Share client](https://github.com/xl1126/sodamusic-download/blob/main/src/api/share.js): `src/api/share.js`

### Express API

- [HTTP server](https://github.com/xl1126/sodamusic-download/blob/main/server/index.js): `server/index.js`
- [Route registry](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/index.js): `server/apis/index.js`
- [Authentication routes](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/auth-qrcode.js): `server/apis/auth-qrcode.js`
- [Track routes](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/track-v2.js): `server/apis/track-v2.js`
- [Video routes](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/video-v2.js): `server/apis/video-v2.js`
- [Playlist routes](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/playlist-detail.js): `server/apis/playlist-detail.js`
- [Batch download routes](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/playlist-batch-download.js): `server/apis/playlist-batch-download.js`
- [Recommendation routes](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/recommend-song-tab.js): `server/apis/recommend-song-tab.js`
- [Share resolution](https://github.com/xl1126/sodamusic-download/blob/main/server/apis/share-resolve.js): `server/apis/share-resolve.js`

### Media processing

- [Media downloads](https://github.com/xl1126/sodamusic-download/blob/main/server/utils/track-download.js): `server/utils/track-download.js`
- [Video audio extraction](https://github.com/xl1126/sodamusic-download/blob/main/server/utils/video-audio-extractor.js): `server/utils/video-audio-extractor.js`
- [Batch progress state](https://github.com/xl1126/sodamusic-download/blob/main/server/utils/batch-progress-store.js): `server/utils/batch-progress-store.js`

### Other components

- **User**
- **Soda Music service**
- **Browser storage**

## Connections

- User → App navigation: navigates
- App navigation → Track resolver UI: shows page
- App navigation → Playlist browser: shows page
- App navigation → Recommendations: shows page
- App navigation → Account view: shows page
- App navigation → Login dialog: opens login
- App navigation → Local auth state: reads and writes
- Local auth state → Browser storage: persists auth
- Track resolver UI → Resource details: shows details
- Playlist browser → Batch download UI: starts batch
- Login dialog → Auth client: requests login
- Track resolver UI → Share client: resolves share
- Track resolver UI → Track client: requests track
- Track resolver UI → Video client: requests video
- Playlist browser → Playlist client: loads playlists
- Recommendations → Recommend client: loads recommendations
- Auth client → HTTP server: HTTP requests
- Track client → HTTP server: HTTP requests
- Video client → HTTP server: HTTP requests
- Playlist client → HTTP server: HTTP requests
- Recommend client → HTTP server: HTTP requests
- Share client → HTTP server: HTTP requests
- HTTP server → Route registry: loads routes
- Route registry → Authentication routes: registers
- Route registry → Track routes: registers
- Route registry → Video routes: registers
- Route registry → Playlist routes: registers
- Route registry → Batch download routes: registers
- Route registry → Recommendation routes: registers
- Route registry → Share resolution: registers
- Authentication routes → Soda Music service: authenticates
- Track routes → Soda Music service: fetches metadata
- Video routes → Soda Music service: fetches metadata
- Playlist routes → Soda Music service: fetches playlist
- Recommendation routes → Soda Music service: fetches recommendations
- Share resolution → Soda Music service: resolves share
- Track routes → Media downloads: downloads track
- Video routes → Video audio extraction: extracts audio
- Batch download routes → Batch progress state: tracks progress
- Batch download routes → Media downloads: downloads media
- Batch download routes → Video audio extraction: converts video
