A minimal template for building desktop applications using Electron, React, TypeScript, and Vite. Features hot-reload in development and proper production builds.
- Vite - Lightning fast build tool
- React 18 with TypeScript
- Electron 28+ with proper security defaults
- SWC - Speedy Rust-based compiler with built-in minification for js/ts (Babel alternative)
- HMR for both React and Electron
- Shadcn/UI + Tailwind CSS for styling
- TypeScript for type safety
- Zustand for state management
- Bun for fast package management
- Clone the repository:
git clone <https://github.com/stratum-labs/vert-desktop-starter.git
cd vert-desktop-starter- Install dependencies:
bun install- Start the development server:
# Start in development mode with hot reload
bun run electron:devbun dev- Start the app in development modebun build- Build the app for productionbun preview- Preview the production build locallybun lint- Run ESLintbun type-check- Run TypeScript type checking
vert-desktop-starter/
├── electron/ # Electron main process files
├── public/ # Static assets
├── src/
│ ├── assets/ # Media assets
│ ├── components/ # React components
│ │ └── ui/ # Shadcn/UI components
│ └── lib/ # Utility functions
└── package.json
- The app uses a custom title bar on Windows/Linux and native traffic lights on macOS
- Hot reload is enabled for both the renderer (React) and main (Electron) processes
- Security best practices are enforced by default:
- Context isolation enabled
- Remote content disabled
- Node integration disabled
- CSP configured for development
# Build the app
bun build
# Preview the production build
bun previewThis project is licensed under the MIT License - see the LICENSE file for details.
