This guide explains how to package and run this application as a standalone desktop app using Electron.
You'll need esbuild, electron, and electron-builder. Install them as development dependencies:
npm installThe package.json file is already configured with the necessary scripts and settings.
main: The entry pointdist/electron/main.jstells Electron where to find the main process script after building.scripts:npm run build: Bundles the application into thedistfolder.npm run start-electron: Builds the app and launches it in a development window.npm run package: Creates an installer for your current operating system.npm run package-win: Creates a Windows installer (.exe).npm run package-mac: Builds a signed.dmgfor macOS (requires macOS host or CI runner).npm run package-linux: Generates an AppImage for Linux distributions.npm run publish: Builds the app and uploads artifacts using the GitHub release provider configured inpackage.json.
build: This section configureselectron-builder.
Icon pipeline: place a single SVG (e.g. assets/app-icon.svg) in the project. The build script validates the SVG and rasterises it into platform assets automatically. If the SVG is missing or cannot be processed, a procedural fallback icon is generated. The resulting Windows (.ico), macOS (.icns), and Linux (.png) assets are saved to dist/icons and referenced by the Electron Builder configuration.
-
Build the application:
npm run build
This will create a
distfolder with the bundled app. -
Run in development mode:
npm run start-electron
This will build the app and launch it with Electron.
-
Package for Windows:
npm run package-win
This will create a Windows installer in a
releasefolder. -
Package for macOS:
npm run package-mac
Use this on macOS or a macOS-capable CI runner to produce a
.dmginstaller. -
Package for Linux:
npm run package-linux
The resulting AppImage is stored under
release/. -
Publish a Release Build:
npm run publish
This command runs the build pipeline and publishes installers and metadata to the GitHub release configured in
package.json.
Before cutting a release (manual or via CI), run through this checklist:
- Update versioning: Bump the
versionfield inpackage.jsonand align any in-app references if needed. - Refresh documentation & changelog: Review
README.md, the docs indocs/, and add a new entry todocs/CHANGELOG.mdsummarizing key fixes and enhancements. - Draft GitHub release copy: Use the latest changelog entry as the basis for the release notes you will paste into the GitHub release form.
- Verify builds: Run
npm run buildlocally and spot-check platform packages as required. - Tag & publish: Push the changes, create a Git tag (e.g.
git tag vX.Y.Z && git push --tags), and then runnpm run publishor draft the GitHub release with the prepared notes.
Keeping this list handy ensures that every GitHub release has consistent binaries, documentation, and notes.