Electron + TypeScript · free and open source
Electron TypeScript boilerplate, typed from database to UI
Strict mode in every process. No any across the IPC bridge.
Main, preload and renderer in strict TypeScript, and types that cross the process boundary: procedures, tables, settings, routes and translation keys are all checked by the compiler.
$ npx degit nick-keller/electron-appstack/template my-appTypeScript
tRPC
Zod
Drizzle ORM
- TanStack Router
i18next
React
Vite
- Electron
TypeScript setup
Types that cross the process boundary
Most templates type each file. Here the compiler also checks what goes from the database to the main process to React.
Typed IPC
The renderer imports the type of the tRPC router. Rename a procedure and the compiler points at every call.
Typed database
Tables are declared with Drizzle in TypeScript, queries return typed rows and migrations are generated from the schema.
Typed settings and translations
electron-store validated by a zod schema, and i18next keys checked at compile time.
Typed routes
TanStack Router generates a route tree, so links, params and search params are checked.
From database to UI
One type, from the table to the button
The input is validated with zod in the main process, the row type comes from Drizzle, and the renderer gets both through tRPC, without a single type written twice.
Read the IPC guide// src/main/trpc/routers/todos.ts (main process)
export const todosRouter = router({
create: licensedProcedure
.input(z.object({ title: z.string().trim().min(1).max(200) }))
.mutation(({ ctx, input }) =>
ctx.db.insert(todos).values(input).returning().get()
)
})
// src/renderer/src/routes/index.tsx (renderer)
const create = useMutation(trpc.todos.create.mutationOptions())
create.mutate({ title: 'Ship v1' }) // typed, validated, autocompletedAnd much more
Much more than an Electron TypeScript boilerplate
TypeScript is only the start. Electron AppStack includes 20 of the 22 features we compare boilerplates on, where the most popular other Electron TypeScript 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.
License keys and Stripe
Activation window, offline use and updates gated by license, with LicenseManager and Stripe.
Source code protection
V8 bytecode main process, Electron fuses and ASAR integrity, on by default.
Hot reload
electron-vite reloads the renderer instantly and restarts the main process on change.
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.
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.
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 TypeScript boilerplates
The most popular maintained Electron TypeScript 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 TypeScript 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
Is TypeScript strict mode on?
Yes, with noUnusedLocals and noUnusedParameters too. npm run typecheck checks the whole app, and npm run build runs it before every build.
Why two tsconfig files?
One for the main process and the preload script, with Node.js types, and one for the renderer, with DOM types. The renderer cannot import Node.js APIs by accident, and each side gets the right globals.
Which TypeScript version does it use?
TypeScript 7. Vite only strips types during development, so the type check runs separately with npm run typecheck, in your editor and in CI.
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 TypeScript desktop app today
Free, production-ready, and yours from the first command.
$ npx degit nick-keller/electron-appstack/template my-app