Skip to content

aaronwittchen/electron-react-template

Repository files navigation

Electron + React + TypeScript + Vite (Bun)

A minimal starter template for building desktop apps with Electron, React, TypeScript, and Vite, powered by Bun.
Includes hot reloading for both frontend and Electron, TypeScript compilation, and ESLint integration.


Features

  • React + TypeScript + Vite for fast HMR development
  • Electron integration with a ready-to-use main process
  • Bun for fast dependency management and script running
  • ESLint setup for code quality and best practices
  • One-command dev experience: compiles TypeScript, starts Vite, and launches Electron

Quick Start

  1. Install dependencies:
bun install
  1. Run the development environment (React + Electron):
bun run dev

This will automatically compile TypeScript, start the Vite dev server, and launch Electron with hot reloading.

  1. Build the app:
bun run build
  1. Package your Electron app:
bun run dist:mac   # macOS
bun run dist:win   # Windows
bun run dist:linux # Linux

Project Structure

src/
  ├─ electron/        # Electron main process
  ├─ react/           # React frontend
dist/                  # Built files
scripts/               # Helper scripts (e.g., dev-all.js)
package.json
tsconfig.json
vite.config.ts

ESLint & Code Quality

  • TypeScript-aware lint rules included
  • React-specific lint rules via eslint-plugin-react-x and eslint-plugin-react-dom
  • Extend or modify .eslintrc.js or eslint.config.js for stricter rules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published