Installation

Install dependencies and run the desktop app in development.

This page takes you from a fresh clone to the Electron development window. The development command runs electron-vite in watch mode and launches the main, preload, and renderer bundles together.

Prerequisites

ToolVersionNotes
Node.js`^20.19.0
pnpm11.1.3Pinned by packageManager in package.json. Use Corepack to stay on the pinned version.

No platform SDK is required for normal development. Signing, notarization, and target-specific installer validation come later on the Packaging page.

Install and run

Clone the template and enter the project directory.

git clone <your-repo-url> my-desktop-app
cd my-desktop-app

Install dependencies.

pnpm install

The postinstall script runs electron-builder install-app-deps so native Electron dependencies are rebuilt for your local platform.

Create local environment config.

cp .env.example .env

The current renderer validates VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY before it mounts. Leave the sample values only for a shell-only first look; replace them with a real Supabase project before testing auth, profile, avatar, todos, or billing.

Start the Electron development app.

pnpm dev

scripts/dev.mjs wraps electron-vite dev -w. On Linux it sets ELECTRON_DISABLE_SANDBOX=1 for developer machines that do not have the Electron SUID sandbox helper installed.

With default feature flags, auth and auto-update surfaces are on, billing is off, and the Showcase demo is on. Billing stays hidden until VITE_BILLING_ENABLED=true; the Supabase-backed auth/data examples need real Supabase values before they are useful.

Verify the installation

After pnpm dev starts, check these surfaces:

  • The desktop window opens with the custom titlebar and sidebar shell.
  • Home renders, and the Showcase plus Components entries appear while showcase flags are enabled.
  • Cmd/Ctrl+K opens the command palette.
  • Settings persists a change, such as theme or locale, after restart.
  • First-run onboarding appears until completed.
  • Logs and About render diagnostics without exposing secrets.

Scripts

CommandPurpose
pnpm devStart Electron and Vite in watch mode.
pnpm startPreview a built app with electron-vite preview.
pnpm lintRun ESLint and auto-fix.
pnpm lint:checkRun ESLint with --max-warnings=0.
pnpm typecheckRun tsc -b --noEmit across the node and web configs.
pnpm testRun the core Vitest suite.
pnpm test:allRun all Vitest configs.
pnpm test:smokeBuild the app and run Playwright smoke tests with VITE_E2E_BYPASS_AUTH=true.
pnpm build:macBuild a macOS distributable with electron-builder.
pnpm build:winBuild a Windows NSIS installer.
pnpm build:linuxBuild Linux AppImage, Snap, and Deb artifacts.
pnpm build:unpackBuild an unpacked app directory without installer packaging.
pnpm supabase:deployDeploy the Supabase Edge Functions in supabase/functions.
pnpm analyze:bundleInspect Electron/Vite bundle output.
pnpm rebrandRewrite product name, slug, app id, scheme, and related assets.

Minimum validation before changing the template:

pnpm lint:check
pnpm typecheck
pnpm test

Run pnpm test:smoke when you change routing, shell behavior, auth gates, or desktop IPC surfaces.

First-run failures

SymptomLikely causeFix
Vite or electron-vite refuses to startNode is below the supported rangeInstall Node ^20.19.0 or >=22.12.0.
pnpm warns about the package managerLocal pnpm does not match pnpm@11.1.3Enable Corepack and run corepack prepare pnpm@11.1.3 --activate.
Native module rebuild errorspostinstall could not completeRe-run pnpm install; if needed, delete node_modules and reinstall with the supported Node version.
Supabase configuration screen appearsMissing or invalid VITE_SUPABASE_URL / VITE_SUPABASE_PUBLISHABLE_KEYCopy .env.example to .env, set both values, and restart pnpm dev.
Linux fails before the window opensLocal sandbox helper is unavailableUse pnpm dev; the wrapper sets ELECTRON_DISABLE_SANDBOX=1 only on Linux development machines.
The dev server port is already usedAnother Vite/Electron session is runningStop the old session, or find and kill the process that owns the port.

On this page