ServerPilot is a standard Electron + React application with a Vite build pipeline. The entire source is available on GitHub and can be compiled to distributable Windows executables in a few commands. This page walks through the prerequisites, the development workflow, and producing release builds.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GKExpo/ServerPilot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Node.js 18 or newer — download from nodejs.org
- Git — download from git-scm.com
- Windows 10 or 11 — Electron Builder’s
.exetargets require a Windows host
Electron Builder can produce
.exe output on Linux or macOS only when Wine is installed, and native module compilation may still fail. A Windows host is strongly recommended for release builds.Tech Stack
| Layer | Technology |
|---|---|
| Desktop shell | Electron 42 |
| UI framework | React 18 with Vite 6 |
| Styling | Tailwind CSS 3 (PostCSS via postcss.config.cjs) |
| Code editor | Monaco Editor (@monaco-editor/react) |
| Charts | Recharts |
| Process metrics | pidusage |
| Persistence | electron-store |
| Packaging | Electron Builder 26 |
Build Steps
Install dependencies
Start the development app
concurrently:- Vite dev server — starts at
http://127.0.0.1:5173and serves the React renderer with hot module replacement. - Electron — waits for the Vite server to be ready (via
wait-on), then launches withVITE_DEV_SERVER_URL=http://127.0.0.1:5173set soelectron/main.jsloads the dev server instead of the built renderer.
src/ hot-reload instantly. Changes to files in electron/ require stopping the process (Ctrl+C) and running npm run dev again.Build the renderer only
vite build and outputs the compiled React app to dist-renderer/. This is the static bundle that the packaged Electron app loads via mainWindow.loadFile(...). You do not need to run this step separately before npm run dist — the dist script does it automatically.Compile release builds
npm run build (renderer) then electron-builder --win nsis portable. Electron Builder bundles the renderer output, the electron/ main process files, backend/, assets/, and storage/ into an ASAR archive and produces two Windows executables:x64 architecture as defined in electron-builder.json.Build Output
perMachine: false) and does not require UAC elevation. It creates a desktop shortcut and a Start Menu entry under ServerPilot V2. The user can choose a custom installation directory during setup.
The portable build is a single self-contained .exe — no installation required. Place it anywhere and run it.
Project Structure
Development Workflow Notes
Hot reload scope: Vite’s HMR covers everything undersrc/. Editing a React component, a hook, or a utility file updates the running window instantly without losing server state. Editing anything under electron/ (main process, preload, IPC handlers) requires a full restart of npm run dev because the main process is not managed by Vite.
Environment variable handoff: VITE_DEV_SERVER_URL is set by the dev script via cross-env. The main process checks for this variable at startup:
dist-renderer/index.html.
Tailwind compilation: Tailwind CSS classes are processed by Vite’s PostCSS pipeline on every build and during HMR. No separate Tailwind CLI step is required — postcss.config.cjs is picked up automatically by Vite.
App data location: During development, electron-store writes to the standard Electron userData path — %APPDATA%\serverpilot-v2\ on Windows. The store file is named serverpilot-v2.json. This is the same location used by production builds, so development data and release data coexist in the same store. Clear this file if you need a fresh state.
Devtools: The Electron DevTools can be opened in development with Ctrl+Shift+I (if enabled in main.js). The main process can be debugged by launching Node.js with the --inspect flag, but the npm run dev script does not add it by default — add --inspect to the Electron command in package.json if needed.