Electron Desktop Guide
v3.8.1Last updated: 2026-05-13
Was this page helpful?
Loading OmniRoute...
Source of truth: workspace
Last updated: 2026-05-13 β v3.8.0
Electron 41 + electron-builder 26.10. The desktop app spawns the Next.js
standalone server as a child process, points a at it, and adds a
system tray, auto-updater, IPC bridge, and zero-config secret bootstrap.
:
+ waits for + launches Electron |
|
| for the current OS | |
| for HTTP 200, then shuts down |
workspace also exposes:
- /
β single-arch macOS builds
- β directory-only build for local testing (no installer)
and are CommonJS files, not TypeScript. The
renderer-side typings live in .
using
with and .
const VALID_CHANNELS = {
invoke: [
"get-app-info",
"open-external",
"get-data-dir",
"restart-server",
"check-for-updates",
"download-update",
"install-update",
"get-app-version",
],
send: ["window-minimize", "window-maximize", "window-close"],
receive: ["server-status", "port-changed", "update-status"],
};
β |
|
/ / |
|
/ / |
|
/ / |
disposer function rather than relying on
β this prevents listener accumulation when React components
remount.
spawns the Next.js standalone bundle directly with the Electron Node runtime to avoid native-module ABI mismatch with system Node:
spawn(process.execPath, [serverScript], {
cwd: NEXT_SERVER_PATH,
env: { ...serverEnv, PORT, NODE_ENV: "production", ELECTRON_RUN_AS_NODE: "1", NODE_PATH },
stdio: "pipe",
});
/ ) emit over IPC., ) stops and restarts the server, then reloads the BrowserWindow.
| (refuses if encrypted creds already exist) | |
. resolves to:
.
- , traffic-light at
.
-
- Open OmniRoute, Open Dashboard (external browser), Server Port submenu, Check for Updates, Quit.
. Notable directives:
,
- to
only
with the GitHub provider ().
- IPC:
, , , (with ), ,
- kills the server then calls
- )
.
- β re-stages into
and rewrites absolute paths inside + so the bundle is relocatable.
- packages
, , , and .
, lets the user choose the install directory, creates Desktop and Start-Menu shortcuts.
npm run electron:smoke:packaged
:
/ directories so it doesn't touch developer data., , , etc.). on Linux)., , , , , , .
does not wire signing credentials directly. Pass them via env vars to :
export APPLE_ID=<email> export APPLE_APP_SPECIFIC_PASSWORD=<password> export APPLE_TEAM_ID=<id> export CSC_LINK=path/to/cert.p12 export CSC_KEY_PASSWORD=<cert-password> npm run electron:build:mac
export CSC_LINK=path/to/cert.pfx export CSC_KEY_PASSWORD=<cert-password> npm run electron:build:win
if signing.
:
(Windows)
- ,
(macOS)
- ,
(Linux)
), which is also where checks for new versions.
| after Electron major bump | |
| for native module | and verify ABI matches Electron's Node |
| logs) | |
vars are exported, not just in |
|
,