The same React codebase powers both the browser SPA and the Electron desktop app. Two Vite configs handle the difference.
| Config | Purpose |
|---|---|
vite.web.config.mts | Browser build. Outputs a static SPA. |
vite.renderer.config.mts | Electron renderer. Same source, different output target. |
vite.main.config.mts | Electron main process (window management, IPC, menus). |
vite.preload.config.mts | Electron preload script (IPC bridge). |
# Browser dev server (port 4200)
pnpm --filter @hype-stack/frontend dev
# Electron app with hot reload
pnpm --filter @hype-stack/frontend start:app
electron-forge and GitHub releaseshype-stack://)bg-red-500 are acceptable)Both targets import from the same src/ directory. Platform-specific code is handled through:
native-layout.tsx for the title bar)# Web production build
pnpm --filter @hype-stack/frontend build
# Electron production package
pnpm --filter @hype-stack/frontend package