Repo of the Day
ArcherGu/fast-vite-nestjs-electron
Published: Apr 13, 2025
Open repository ↗This electron vite and nest combination looks sick. I think that the lack of a good structure in the BE for electron can be a pain in the ass. This might be a good way to try and structure an app to have nest do all the electron stuff and expose it to the renderer.
Summary
fast-vite-nestjs-electron is a project template that combines Vite, Vue, Electron, and NestJS into a single starter, so the renderer, the Electron main process, and a Node backend can share one codebase and toolchain. The main process is structured as a NestJS application, and the build/run flow is wired together with the Doubleshot toolset. The repository is published under the MIT license.
What it is useful for
This template is useful when you want to build a desktop application with Electron but write the main process using NestJS patterns (modules, controllers, providers) instead of a flat Electron script. It also fits teams that may later need to expose the same backend logic to a regular browser/server deployment, because the main process already looks like a NestJS service.
Specific pieces the README documents:
- A Vite plugin,
vite-plugin-doubleshot, to run or build the Electron main process and an associated Node backend. - An IPC transport for NestJS, which lets renderer code call main-process services through NestJS-style communication.
- A NestJS Electron module for creating and managing Electron windows.
- A build pipeline that uses
tsdownfor bundling andelectron-builderfor packaging, both wrapped by@doubleshot/builder.
The same author publishes React and Svelte variants of this template if Vue is not your framework of choice.
How engineers can use it
The README describes a short start path:
- Generate a new project from the GitHub template button, or clone the repository directly.
- Install dependencies. The README states
pnpmis required as the package manager:pnpm install - Start the development loop:
pnpm dev - Produce a packaged build:
pnpm build
A documented caveat: because electron-builder does not follow pnpm's symlinked layout, the README instructs you to set one of the following in .npmrc: node-linker=hoisted, public-hoist-pattern=*, or shamefully-hoist=true. Without one of these, the build is known to fail.
The README does not document Windows- or Linux-specific commands, CI usage, or signing, so engineers deploying to those environments should consult the README and the Doubleshot documentation directly.