Skip to main content

desktop — Electron App

The frontend dashboard wrapped in Electron for Windows/ macOS/Linux, with auto-update, native notifications, and call/chat popups.

  • Stack: Vue 3 + TS + Vite renderer, Electron 44 main process (bumped from 37 in the 2026-10-26 sync), electron-builder
    • electron-updater. vite-plugin-electron compiles main + preload.
Sync policy

Desktop is synced from frontend at release time, not per-PR. Don't copy frontend changes into desktop during frontend work. White-label is a build flag, not a fork.

Current release: 0.8.8 (2026-11-13, c321be5). Releases since the last docs pass:

  • 0.8.5 (2026-10-26) — web sync; live session replays may load external stylesheets and fonts (CSP, 83a4200); Windows installers are signed with Azure Artifact Signing (azure/artifact-signing-action, AZURE_TENANT_ID / AZURE_CLIENT_ID / AZURE_CLIENT_SECRET CI secrets, knockknocksigning account, knockknock-desktop profile) instead of SSL.com (c481e71); release artifact names have no spaces so GitHub upload works (48dbcf7).
  • 0.8.6 (2026-11-04) — web sync; request-attention IPC for admin alert popups (f259521): restores/shows/focuses the window and, if still not focused, flashes the frame, bounces the macOS dock (critical) and shows a native notification until focus; CSP allows blob: scripts (56e961e); node_modules are no longer packed into app.asar (Vite already bundles everything — app.asar 349 MB → 32 MB, AppImage 220 → 148 MB, 7a10ba3).
  • 0.8.7 (2026-11-10) / 0.8.8 (2026-11-13) — web syncs (regulatory status card on call agents, Cal.com/Outlook assets); Stripe.js loads async with error handling (a402d76), matching the web app's boot change.

Earlier: 0.8.1 fixed the macOS crash on dock re-activate (IPC handlers registered once, e40c7ac) and opens external links in the OS browser (4b9f67f); 0.8.0 (2026-07-21) — a web-parity sync (dashboard restructure, wallet UI, members layout, etc.), plus heavy screens lazy-loaded out of startup and vite build warnings cleaned. CI note: vue-tsc OOMs at the default ~2 GB Node heap — CI raises it to 4 GB.

Electron architecture​

  • Main process (electron/main.ts): single-instance lock; BrowserWindow (Vite HMR in dev, file:// in prod); IPC handlers for call/chat popup windows, screen-share (desktopCapturer), launch-at-login, native notifications, external URLs, request-attention (alert popups); CSP headers allowing Twilio/Stripe/Firebase/Socket.IO; an asset-protocol handler resolving /assets/* from the packaged renderer (Windows path fix).
  • Preload (electron/preload.ts): exposes ipcRenderer (send/on/off/invoke) via contextBridge.
  • Auto-update (electron-updater): checks GitHub releases every ~5 min, shows a progress bar via IPC, one-click install + restart. Target repo depends on the white-label flag.

White-label​

vite.config.ts injects __WHITE_LABEL__ at build time, switching app name, icon, window title, menu links, the auto-updater repo, and default company name. Built via build:next / publish:next (WHITE_LABEL=true). The "Next Level AI" brand is the current white-label target.

Relationship to frontend​

The renderer is the frontend app (same router, stores, components, API layer). Desktop adds only Electron-specific glue: utils/platform.js isElectron(), socket disconnect-on-close handling, white-label detection, and the native notification bridge (desktop_notification_white_label.js). Router uses hash history under file://.

Build & publish​

electron-builder.config.js:

  • Inputs: dist/ (renderer) + dist-electron/main.js + preload.mjs.
  • Output: release/{version}/ (or release/next-level/{version}/).
  • Targets: macOS DMG+ZIP (x64/arm64, notarized, hardened runtime, mic/camera entitlements); Windows NSIS (x64, per-machine, signed in CI with Azure Artifact Signing); Linux AppImage (x64).
  • Publish: GitHub releases (KnockKnockAppLtd/KnockKnock or …/NextLevelAI) with delta updates.

Scripts: build / publish (standard), build:next / publish:next (white-label), dev / dev:next (hot reload).