FFFF
Skip to content

Repository files navigation

vite-electron-react-ts-boilerplate

An Electron application built using Vite, Electron, React, and TypeScript.

Features

  • ⚡ Fast bundling and live reloading with electron-vite
  • ⚛️ UI built with React 19 and Tailwind CSS
  • 🧰 TypeScript support in both main and renderer processes
  • 📦 Easy packaging with electron-builder
  • 🔄 Auto-update enabled using electron-updater
  • 📏 Linting and formatting with ESLint and Prettier
  • 🚦 Type-checking for both web and node contexts
  • 🔌 Modular router support with @tanstack/react-router

Recommended IDE Setup

Getting Started

Install dependencies

npm install

Development

Launch the application in development mode:

npm run dev

Format code

npm run format

Lint code

npm run lint

Type Checking

npm run typecheck

Build

Create a production build:

# Windows
npm run build:win

# macOS
npm run build:mac

# Linux
npm run build:linux

To generate unpacked output only:

npm run build:unpack

Release

Run production build and trigger release process:

npm run release

Folder Structure

.
├── scripts/                    # Utility scripts (e.g., version check)
├── src/                        # Source code
│   ├── main/                   # Electron main process
│   └── renderer/               # React renderer process
├── out/                        # Compiled output directory
├── tsconfig.*.json             # TypeScript configurations
├── vite.config.ts              # Vite configuration
└── package.json                # Project metadata and scripts

Notes

  • Ensure your Node.js version is ^20.19.0 or >=22.12.0.
  • Replace app-name with your actual application name wherever applicable.

License

MIT © CabbitKheema

About

An Electron app with Vite, React, and TypeScript – fast, modern, and cross-platform

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0