Skip to main content
The apps/desktop directory contains a desktop application built with Electron and electron-vite. It shares packages with the web and mobile apps so an agent writes a feature once and it runs across all platforms.

Overview

A cross-platform desktop app that consumes the same design system, auth, analytics, and observability packages as the web apps. The renderer is a React app bundled by Vite. The main process handles window management, IPC, and auto-updates.
cd apps/desktop && bun run dev

Features

  • Design System: shadcn/ui components and Tailwind CSS via @repo/design-system.
  • Authentication: Clerk auth via @repo/auth.
  • Backend: Real-time data from Convex via @repo/convex.
  • Analytics: PostHog event tracking via @repo/analytics.
  • Observability: Sentry error tracking via @repo/observability.
  • Auto-updates: electron-updater checks for updates on launch.
  • Cross-platform packaging: DMG for macOS, NSIS for Windows, AppImage and deb for Linux.

Architecture

Electron splits into three processes, each with its own build:
ProcessEntryBundlerPurpose
Mainsrc/main/index.tselectron-viteWindow management, IPC, auto-updater
Preloadsrc/preload/index.tselectron-viteContext bridge between main and renderer
Renderersrc/renderer/src/main.tsxVite + ReactUI, same components as web
The renderer imports from @repo/design-system directly. Same Button, Card, and Dialog components that run in the web app.

Packaging

Build installers with electron-builder:
bun run build:mac     # DMG (universal)
bun run build:win     # NSIS (x64, arm64)
bun run build:linux   # AppImage + deb (x64, arm64)
Configuration lives in electron-builder.yml. Auto-updates publish to GitHub Releases by default.

TypeScript

The desktop app uses two shared TypeScript configs from @repo/typescript-config:
ConfigUsed by
electron.jsonMain process and preload scripts
electron-renderer.jsonRenderer (Vite + React)

Environment variables

Set in apps/desktop/.env:
VariableRequiredDescription
VITE_CONVEX_URLYesConvex deployment URL