How lyswhut/lx-music-desktop works
LX Music is an Electron/Vue desktop music application. The main user workflow is to discover music through supported online sources, manage lists, and play tracks, with downloads and synchronized data as additional capabilities. The desktop main process hosts the application windows and services; the primary Vue renderer provides the music UI, while a separate renderer handles desktop lyrics. The graph preserves documented integrations and major subsystems, but several renderer and music features are represented at directory level because their implementation was not sampled.
Main entry points: winMain/main.ts Main window · renderer/main.ts Renderer bootstrap · winLyric/main.ts Lyric window · app.ts Main app
Components 20
Desktop runtime
- Main app
src/main/app.ts - Main window
src/main/modules/winMain/main.ts - Renderer bootstrap
src/renderer/main.ts - Lyric window
src/main/modules/winLyric/main.ts
Music experience
- Main UI
src/renderer/App.vue - Music discovery
src/renderer/utils/musicSdk - Lists and search
src/renderer/views - Playback
src/renderer/core/player - Downloads
src/renderer/core/music/download.ts - Lyric renderer
src/renderer-lyric/App.vue
Data and settings
- Settings and state
src/renderer/store/setting.ts - Local database
src/main/worker/dbService/db.ts
Synchronization
- Sync server
src/main/modules/sync/server/server/server.ts - Sync client
src/main/modules/sync/client/client.ts
External interfaces
Other components
- Listener
- Music platforms
- Sync service
- Third-party callers
Connections 20
- Listener → Main window: opens app
README.md - Main app → Main window: checks window
src/main/app.ts - Main app → Local database: migrates data
src/main/app.ts - Main window → Renderer bootstrap: loads renderer
src/main/modules/winMain/main.ts - Renderer bootstrap → Main UI: mounts app
src/renderer/main.ts - Renderer bootstrap → Settings and state: initializes settings
src/renderer/main.ts - Main UI → Listener: presents controls
- Listener → Music discovery: requests music
- Music discovery → Music platforms: queries catalogs
README.md - Listener → Lists and search: manages lists
- Listener → Playback: starts playback
- Playback → Downloads: downloads tracks
- Main window → Lyric window: opens lyric window
- Lyric window → Lyric renderer: loads renderer
src/main/modules/winLyric/main.ts - Lyric renderer → Lyric window: sends IPC
src/renderer-lyric/App.vue - Listener → Sync client: configures sync
- Sync client → Sync service: synchronizes data
README.md - Sync server → Sync service: hosts service
README.md - Third-party callers → Open API: calls locally
README.md - Third-party callers → User API: uses API