This project is a boilerplate for creating desktop applications using Electron, React, and TypeScript. It leverages Vite for fast bundling, Tailwind CSS for styling, and ESLint to maintain code quality.
Using bun:
bun install
Or using yarn:
yarn install
Start the application in development mode (with hot reloading):
bun run dev
This command launches the Vite development server for the renderer process and opens the Electron window.
Generate optimized files for production:
bun run build
If you use a packaging tool (e.g., Electron Builder), run:
bun run package
Check your code with ESLint:
bun run lint
To automatically fix some of the detected issues (when possible):
bun run lint -- --fix
Below is an overview of the folders and files in this boilerplate:
.
├── main/
│ ├── lib/
│ ├── index.ts
│ ├── preload.ts
│ └── tsconfig.json
├── node_modules/
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ │ ├── .gitkeep
│ │ ├── CloseButtons.tsx
│ │ ├── Header.tsx
│ │ └── Main.tsx
│ ├── hooks/
│ ├── lib/
│ ├── model/
│ ├── App.tsx
│ ├── electron.tsx
│ └── main.tsx
├── .env.example
├── .gitignore
├── bun.lockb
├── electron-builder.config.js
├── esbuild.config.mjs
├── eslint.config.js
├── package.json
├── postcss.config.cjs
├── readme.md
├── vite-env.d.ts
└── vite.config.js
index.ts
, preload.ts
, etc.).This project includes an ESLint configuration to keep your code consistent and to prevent common errors. You can modify the rules in eslint.config.js
according to your needs.
Contributions are welcome! If you have any suggestions or find any bugs, please open an issue or submit a pull request.
This project is distributed under the MIT License.
Enjoy building your Electron + React application!