Electron + Vite + React template with TypeScript
A modern Electron desktop application template with Vite, React, and TypeScript.
# Clone the repository
git clone https://github.com/nesalia-inc/electron-vite-react-template.git
# Install dependencies
pnpm install
# Approve build scripts (for electron)
pnpm approve-builds
# Start development server
pnpm dev
The app will open at http://127.0.0.1:8888
# Build for production
pnpm build
# Run tests
pnpm test
# Run tests with UI
pnpm test:ui
# Run linter
pnpm lint
# Run type checking
pnpm typecheck
src/
├── main/ # Electron main process
│ └── index.ts # Main process entry point
├── preload/ # Preload scripts
│ └── index.ts # Preload script entry point
└── renderer/ # React application
├── src/
│ ├── components/ # React components
│ │ └── ui/ # shadcn/ui components
│ ├── hooks/ # Custom React hooks
│ ├── i18n/ # Internationalization
│ ├── lib/ # Utilities
│ ├── stores/ # Zustand stores
│ └── main.tsx # Renderer entry point
└── index.html # HTML entry point
Configuration for electron-vite build tool.
Tailwind CSS configuration with custom theme variables.
TypeScript configuration (node + web split).
Vitest testing configuration.
The template includes a theme provider that supports:
The theme automatically detects system theme changes in real-time.
The template supports multiple languages:
The language is automatically detected from the system locale.
| Category | Technology |
|---|---|
| Framework | Electron |
| Build Tool | Vite |
| UI | React |
| Language | TypeScript |
| State | TanStack Query + Zustand |
| Routing | TanStack Router |
| Styling | Tailwind CSS |
| Components | shadcn/ui |
| i18n | react-i18next |
| Testing | Vitest |
| Linting | ESLint |
MIT
Nesalia