How xxhuberrr/mineradio works
Purpose and runtime
Mineradio is a Windows Electron immersive music player combining multi-provider playback, local music, beat-aware visuals, lyrics, 3D playlist shelf, fullscreen desktop, and Wallpaper Engine modes. Electron launches a local service and renderer UI; Windows NSIS packaging is defined under build/.
• desktop/main.js
• server.js
• build/installer.nsh
Process boundaries and entry points
The Electron main process owns windows, native desktop/fullscreen behavior, system integration, and local-library access. Preload scripts expose controlled renderer-to-main capabilities; the renderer starts from static HTML and a modular browser-side bootstrap.
• desktop/main.js
• desktop/preload.js
• desktop/overlay-preload.js
• public/index.html
• public/js/index-loader.js
Renderer state, scheduling, and scene runtime
The renderer is organized as ordered ES-module domains. Core stores hold application, preferences, playback, FX, and desktop power state; frame scheduling and performance probing govern visual workload. The main loop coordinates scene updates, UI, and playback-driven rendering.
• public/js/modules/00-state/00-core-stores.js
• public/js/modules/00-state/10-frame-scheduler.js
• public/js/modules/11-main-loop.js
• public/js/modules/01-scene/00-renderer-quality.js
Playback, providers, and entitlement boundary
Playback orchestration selects sources, starts audio, maintains queue/autoplay state, exposes audio-graph controls, and falls back across providers. Provider adapters sit outside the renderer module tree and include Kugou, QQ VIP, Spotify, and Qishui authentication/decryption integrations; account and paid-rights behavior must remain provider-boundary controlled.
• public/js/modules/05-playback/11-provider-fallback.js
• public/js/modules/05-playback/12-playback-switch-core.js
• public/js/modules/05-playback/13-playback-start-audio.js
• kugou-api.js
• qq-vip-api.js
• qishui-auth-v6.js
Content, lyrics, beat analysis, and automix
Search, playlists, track details, lyric retrieval/parsing, uploads, and timed lyric offsets feed playback and the visual stage. Beat analysis builds or retrieves tempo/beat maps, including DJ/podcast-specific analysis. Cuefield is a separate planning/evaluation subsystem that derives transition recipes and executes automated mixes through renderer integration.
• public/js/modules/06-lyrics/00-lyrics-fetch-parse.js
• public/js/modules/03-beat/01-audio-beat-analysis.js
• public/js/modules/03-beat/04-beat-map-runtime.js
• cuefield/recipe-planner.js
• public/js/modules/05-playback/18-cuefield-automix-integration.js
Visual presentation and desktop modes
Visual modules render particles, cover-driven scenes, lyrics meshes/shaders, palettes, and FX presets in response to playback and beat state. A 3D shelf provides playlist/queue interaction. Desktop runtimes support full-desktop, wallpaper, native icon layer, and Wallpaper Engine integration; these are native-window lifecycle concerns rather than ordinary web-page modes.
• public/js/modules/02-visual/14-stage-lyrics-rendering.js
• public/js/modules/02-visual/11-lyrics-shaders.js
• public/js/modules/04-shelf/01-manager-core.js
• desktop/full-desktop-mode-runtime.js
• desktop/wallpaper-engine-runtime.js
• desktop/desktop-native-icon-layer-runtime.js
Persistence, external services, and distribution
User-local state includes preferences, custom visual archives, covers, lyrics, local-library metadata, login state, and beat caches. The app uses GitHub Releases only for version detection and opens external download routes rather than self-updating binaries. Packaging targets Windows through electron-builder and NSIS.
• desktop/local-music-library.js
• public/js/modules/07-fx/08-cache-storage-settings.js
• public/default-user-fx-archive.json
• electron-builder.internal-beta.json
• build/after-pack.js
Main entry points: 12-playback-switch-core.js Playback orchestration · main.js Electron main · 11-main-loop.js Main loop · 14-stage-lyrics-rendering.js Visual stage
Components 21
Electron desktop
Native process and desktop-mode boundary.
- Electron main · Owns windows, native integration, and local-library access.
desktop/main.js - Renderer preload · Exposes controlled main-process capabilities.
desktop/preload.js - Overlay preload
desktop/overlay-preload.js - Desktop mode runtimes · Runs full-desktop, wallpaper, and native icon-layer modes.
desktop/full-desktop-mode-runtime.js - Wallpaper Engine runtime
desktop/wallpaper-engine-runtime.js
Renderer runtime
Browser-side playback and visual runtime.
- Renderer bootstrap
public/index.html - Module loader · Loads ordered renderer module domains.
public/js/index-loader.js - State & frame scheduling · Maintains stores and controls visual workload.
public/js/modules/00-state/10-frame-scheduler.js - Main loop · Coordinates scene, UI, and playback-driven rendering.
public/js/modules/11-main-loop.js - Playback orchestration · Selects sources, controls audio, queue, autoplay, and fallback.
public/js/modules/05-playback/12-playback-switch-core.js - Lyrics pipeline · Fetches, parses, and times lyric content.
public/js/modules/06-lyrics/00-lyrics-fetch-parse.js - Beat analysis & maps · Builds and supplies tempo and beat maps.
public/js/modules/03-beat/01-audio-beat-analysis.js - Cuefield automix · Executes planned automated transitions.
public/js/modules/05-playback/18-cuefield-automix-integration.js - Visual stage · Renders lyrics, cover scenes, particles, palettes, and FX.
public/js/modules/02-visual/14-stage-lyrics-rendering.js - 3D playlist shelf · Provides playlist and queue interaction.
public/js/modules/04-shelf/01-manager-core.js
Local services & providers
Server and provider integration boundary.
- Cuefield planner · Derives and evaluates transition recipes.
cuefield/recipe-planner.js - Local service
server.js - Provider adapters · Keeps account, decryption, and paid-rights behavior provider-bound.
kugou-api.js
User data & distribution
Local persistence and Windows packaging.
- Local music library · Indexes local music metadata for the desktop app.
desktop/local-music-library.js - User cache storage · Stores preferences, FX archives, covers, lyrics, login state, and beat caches.
public/js/modules/07-fx/08-cache-storage-settings.js - Windows packaging · Builds and installs the Windows distribution.
electron-builder.internal-beta.json
Connections 23
- Electron main → Renderer preload: loads
- Electron main → Overlay preload: loads overlay bridge
- Electron main → Desktop mode runtimes: owns lifecycle
- Desktop mode runtimes → Wallpaper Engine runtime: integrates
- Electron main → Local music library: accesses
- Renderer bootstrap → Module loader: starts
- Module loader → State & frame scheduling: initializes
- Module loader → Main loop: starts
- Renderer preload → Main loop: exposes native capabilities
- Main loop → Playback orchestration: coordinates
- Main loop → Visual stage: updates
- State & frame scheduling → Visual stage: budgets frames
- Playback orchestration → Provider adapters: requests sources / fallback
- Playback orchestration → Lyrics pipeline: requests timed lyrics
- Playback orchestration → Beat analysis & maps: supplies audio
- Beat analysis & maps → Visual stage: drives beat-aware visuals
- Lyrics pipeline → Visual stage: renders lyric data
- 3D playlist shelf → Playback orchestration: controls queue
- Cuefield planner → Cuefield automix: provides recipes
- Cuefield automix → Playback orchestration: executes transitions
- Playback orchestration → User cache storage: persists state and caches
- Beat analysis & maps → User cache storage: caches beat maps
- Electron main → Windows packaging: packaged as