electron-vite + Vite · free and open source
Electron Vite boilerplate that goes all the way to release
Instant hot reload while you build. Signed installers when you ship.
Built on electron-vite: one config for the main process, the preload script and the renderer, hot reload in development, bytecode in production. And everything that comes after npm run dev.
$ npx degit nick-keller/electron-appstack/template my-appVite
- electron-vite
React
TypeScript
Tailwind CSS
tRPC
SQLite
V8 bytecode
- Electron
Vite setup
electron-vite, configured for a real app
The fastest Electron build tool, set up with the plugins, aliases and production options a shipped app needs.
One config, three processes
electron.vite.config.ts builds the main process, the preload script and the renderer, with shared path aliases.
Hot reload everywhere
The renderer updates instantly with Vite HMR, and the main process restarts on change.
V8 bytecode in production
electron-vite compiles the main process to bytecode, so the packaged app ships no readable JavaScript for it.
Vite plugins ready
React, TanStack Router and Tailwind CSS plugins in the renderer. Add any Vite plugin next to them.
electron.vite.config.ts
The whole build in one file
Main, preload and renderer share their aliases. Production builds turn the main process into V8 bytecode with one option.
Read the development guideexport default defineConfig({
main: {
resolve: { alias },
// Main process compiled to V8 bytecode in production
build: { bytecode: { transformArrowFunctions: false } }
},
preload: { resolve: { alias } },
renderer: {
resolve: { alias },
plugins: [tanstackRouter({ target: 'react' }), react(), tailwindcss()]
}
})And much more
Much more than an Electron Vite boilerplate
Vite is only the start. Electron AppStack includes 20 of the 22 features we compare boilerplates on, where the most popular other Electron Vite boilerplates average 10: a typed backend, a database, auto update, signed releases, source code protection and license keys, all wired together and documented.
Features included
Set up, working together and tested in a shipped commercial app.
17 guidesDocumentation
From the first run to signing, notarizing, updating and selling your app.
v45Latest Electron
The latest Electron, React, Vite and TypeScript, kept current.
$0MIT License
No paid tier. Build commercial apps and sell them.
Typed IPC with tRPC
Call the main process from React with typed, zod-validated procedures.
License keys and Stripe
Activation window, offline use and updates gated by license, with LicenseManager and Stripe.
Modern React stack
React 19 with type-safe file-based routing from TanStack Router and TanStack Query.
Design system
shadcn/ui components and Tailwind CSS v4, with system, light and dark themes built in.
Typed app config
electron-store validated by a zod schema, read and written from anywhere.
Local database
SQLite with Drizzle ORM: typed queries, generated migrations applied automatically on startup.
Auto update
electron-updater checks GitHub Releases and installs new versions.
Dark mode
System, light or dark theme, from the native menu or the settings.
Translations
i18next with typed keys, shared by the renderer and the native menu.
Signed releases
Changesets and GitHub Actions to build, sign, notarize and publish for every platform.
Icons and images
Conventions for the app icon, DMG background and renderer images.
Ready for AI agents
AGENTS.md, CLAUDE.md and skills so Claude Code, Cursor, Codex and Copilot follow the conventions.
Unit tests
Vitest tests for the main process, on an in-memory database, without Electron.
Compare
Electron AppStack vs other Vite boilerplates
The most popular maintained Electron Vite boilerplates, side by side. Electron AppStack is #1 of 19 in our ranking.
| Feature | Electron AppStack | electron-shadcn | Electron React Boilerplate | Electron Forge (vite-typescript) |
|---|---|---|---|---|
| Developer experience | ||||
| AI agent instructionsAGENTS.md or rules so coding agents follow the conventions. | ✓ | × | × | × |
| Frontend | ||||
| UI componentsA component library or design system. | ✓ | ✓ | × | × |
| Backend | ||||
| Typed IPCCalls from the renderer to the main process are typed end to end. | ✓ | ✓ | – | × |
| Local databaseAn embedded database with migrations. | ✓ | × | × | × |
| Shipping | ||||
| Auto updateThe app downloads and installs new versions. | ✓ | ✓ | ✓ | – |
| Release workflowCI builds and publishes installers for every platform. | ✓ | ✓ | ✓ | × |
| Code signingSigning and notarization wired into the build. | ✓ | × | ✓ | – |
| Selling | ||||
| Source code protectionBytecode compilation, Electron fuses or ASAR integrity. | ✓ | – | × | – |
| License keysActivation, validation and offline use of license keys. | ✓ | × | × | × |
✓Included–Partial or manual setup×Not includedHover a cell for details.
One command
Create your Vite Electron app
Copy the template, install, run. Hot reload starts with the example app: a todo list stored in SQLite and a settings page with light and dark themes.
Read the getting started guidenpx degit nick-keller/electron-appstack/template my-app
cd my-app
npm install
npm run devFAQ
Frequently asked questions
Does it use electron-vite or vite-plugin-electron?
electron-vite, the build tool made for Electron: one config per process, dependencies kept external in the main process and bytecode compilation for source code protection. vite-plugin-electron, used by the electron-vite-react and electron-vite-vue templates, adds Electron to a regular Vite project instead.
How is it different from the create electron-vite templates?
The official electron-vite templates give you a window and a build. Electron AppStack uses the same build tool and adds routing, UI components, typed IPC with tRPC, a SQLite database, auto update, a signed release workflow and license keys.
Which versions of Vite and electron-vite?
Vite 8 with electron-vite 6, on the latest Electron. The data file behind our comparison pages is refreshed with a script, so you can check the versions of every template.
Does it use Electron Forge?
No. Development and builds go through electron-vite, packaging through electron-builder and updates through electron-updater, which publishes to GitHub Releases.
Is it really free?
Yes. Electron AppStack is open source under the MIT License, with no paid tier. Use it for commercial apps and sell them. LicenseManager is free up to 100 active licenses, and Stripe only charges a fee on the payments you receive.
Is it a framework I depend on?
No. You copy the template once with degit and the code is yours. There is no package to update and nothing to eject.
Same template
Looking for another stack?
One boilerplate covers all of them: pick the page that matches your search.
Start your Vite desktop app today
Free, production-ready, and yours from the first command.
$ npx degit nick-keller/electron-appstack/template my-app