How algerkong/algermusicplayer works
Alger Music Player is a Vue/Electron music player with desktop, web, and mobile interfaces. A typical playback journey starts in the app’s discovery views, retrieves song data through renderer APIs, and hands a selected track to the playback controller, which coordinates URL/detail loading and audio playback. Separate product branches cover lyrics, accounts and collections, local music and downloads, and desktop services. The README documents these capabilities; sampled source confirms the playback, preload bridge, download, local-file, and startup links shown here. Unsampled feature wiring is intentionally left out.
Main entry points: index.ts IPC bridge · App.vue App shell · playbackController.ts Playback controller · index.vue Search and browse
Components 26
App experience
- App shell
src/renderer/App.vue - Routes and views
src/renderer/router/index.ts - Settings UI
src/renderer/views/set/index.vue
Music discovery
- Search and browse
src/renderer/views/search/index.vue - Catalog APIs
src/renderer/api/search.ts - Music API
src/renderer/api/music.ts
Playback and lyrics
- Playback controller
src/renderer/services/playbackController.ts - Track and lyric loading
src/renderer/hooks/usePlayerHooks.ts - Player state
src/renderer/store/modules/playerCore.ts - Audio service
src/renderer/services/audioService.ts - Lyrics display
src/renderer/components/lyric/MusicFull.vue
Library and files
- Account and user
src/renderer/store/modules/user.ts - Favorites and history
src/renderer/store/modules/favorite.ts - Playlist state
src/renderer/store/modules/playlist.ts - Local music
src/renderer/store/modules/localMusic.ts - Local scanner
src/main/modules/localMusicScanner.ts - Download controls
src/renderer/hooks/useDownload.ts - Download manager
src/main/modules/downloadManager.ts
Desktop services
- IPC bridge
src/preload/index.ts - Electron main
src/main/index.ts - Local music API
src/main/server.ts - File and local audio
src/main/modules/fileManager.ts - Desktop configuration
src/main/modules/config.ts - Custom source runner
src/renderer/services/LxMusicSourceRunner.ts
Other components
- Listener
- Music catalog services
Connections 28
- Listener → App shell: uses
- App shell → Routes and views: mounts routes
- Listener → Search and browse: searches and browses
- Search and browse → Catalog APIs: requests catalog
- Catalog APIs → Music catalog services: fetches listings
- Search and browse → Playlist state: selects tracks
- Listener → Playback controller: starts playback
- Playback controller → Track and lyric loading: loads track data
- Track and lyric loading → Music API: resolves song and lyrics
- Music API → Music catalog services: requests music data
- Playback controller → Player state: updates playback
- Playback controller → Audio service: starts audio
- Playback controller → Favorites and history: records play history
- Track and lyric loading → Lyrics display: provides lyrics
- App shell → Local music: loads and scans
- Local music → IPC bridge: requests folder scan
- IPC bridge → Local scanner: invokes scan
- Listener → Download controls: downloads tracks
- Download controls → IPC bridge: sends download tasks
- IPC bridge → Download manager: dispatches download IPC
- App shell → IPC bridge: uses desktop bridge
- IPC bridge → Electron main: sends IPC
- Electron main → Local music API: starts local API
- Electron main → Desktop configuration: reads and saves settings
- IPC bridge → File and local audio: invokes file operations
- Listener → Settings UI: configures app
- Settings UI → App shell: updates preferences
- App shell → Custom source runner: initializes custom source