Electron Desktop App β
KuaDashboard ships as a native desktop application for Windows, macOS, and Linux powered by Electron.

How It Works β
The Electron app bundles the full backend (Express + WebSocket server) and frontend (Vue 3 built output) into a single package:
- Main process (
electron/main.js) β forks the Express server as a child process - Renderer β loads the frontend from the local Express server
- Preload (
electron/preload.js) β secure IPC bridge viacontextBridge
βββββββββββββββββββββββββββββββββββββββ
β Electron Main Process β
β βββββββββββββββββ βββββββββββββββ β
β β Express Serverβ β BrowserWindowβ β
β β (child fork) βββ (renderer) β β
β β :7190 β β Vue 3 SPA β β
β βββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββDevelopment β
bash
# Run Electron with live-reload (backend + Vite + Electron)
npm run electron:devThis starts three concurrent processes:
- Backend server with nodemon
- Vite dev server with HMR
- Electron window pointed at the dev server
Building β
Prerequisites β
bash
# Ensure dependencies are installed
npm install
cd frontend && npm install && cd ..
# Generate app icon (only needed once)
npm run icons:generateBuild for Current Platform β
bash
npm run electron:buildBuild for Specific Platform β
bash
# Windows only (NSIS installer)
npm run electron:build:win
# macOS only (DMG)
npm run electron:build:mac
# Linux only (AppImage + deb)
npm run electron:build:linux
# All platforms
npm run electron:build:allCross-Platform Builds
- Building for macOS requires running on macOS
- Building for Windows can be done from Windows or macOS
- Building for Linux requires running on Linux (or Docker with
electronuserland/builder) - Use CI/CD (GitHub Actions) for automated cross-platform builds β the project includes workflows that build for all three platforms
Build Output β
Built packages are placed in dist-electron/:
dist-electron/
βββ win-unpacked/ # Unpacked Windows app
βββ KuaDashboard-Setup-1.0.0.exe # Windows installer
βββ mac/ # Unpacked macOS app
βββ KuaDashboard-1.0.0.dmg # macOS disk image
βββ linux-unpacked/ # Unpacked Linux app
βββ KuaDashboard-1.0.0.AppImage # Linux AppImage
βββ kuadashboard_1.0.0_amd64.deb # Debian/Ubuntu packageCustom Icons β
Replace the placeholder icon with your own:
bash
# Place a 512Γ512 or larger PNG at:
assets/icon.png
# electron-builder auto-converts to .ico (Windows) and .icns (macOS)Or regenerate the default icon:
bash
npm run icons:generateSecurity Model β
The Electron app uses a secure sandboxed architecture:
| Setting | Value | Purpose |
|---|---|---|
contextIsolation | true | Renderer can't access Node.js |
nodeIntegration | false | No require() in renderer |
webSecurity | true | Standard CORS enforcement |
sandbox | false | Preload needs require() |
All communication between renderer and main process goes through the window.kuaElectron API exposed via contextBridge.
Auto-Updates β
Coming Soon
Auto-update via electron-updater will be added in a future release. For now, download new versions manually from the Releases page.
