Important
This repository is still very much in progress. Expect breaking changes and incomplete features as development continues.
A starter template for building desktop applications with Electrobun and React. It provides a solid foundation with modern tooling and best practices out of the box.
There are two ways to scaffold an app using the create-electrobun-react
starter:
Simply press the Use this template button on GitHub and clone your newly created repository locally.
git clone https://github.com/AugusDogus/create-electrobun-react.git
cd create-electrobun-react
bun install
# Install dependencies
bun install
# Start the development server
bun run dev
# Build for production
bun run build
This starter includes tooling and configurations for:
- Electrobun - Cross-platform desktop app framework
- React 18 - Modern UI library with hooks and concurrent features
- TypeScript - Static type checking for JavaScript
- Bun - Fast all-in-one JavaScript runtime and package manager
src/bun
: Main Electrobun process that creates and manages desktop windowssrc/mainview
: React application with TypeScript and modern component patterns
- 🚀 Fast Development - Hot module replacement with Bun's lightning-fast bundler
- 🎯 Type Safety - Full TypeScript support across the entire application
- 🏗️ Modern React - Hooks, functional components, and React 18 features
- 🖥️ Native Desktop - Cross-platform desktop application with native performance
- 📦 Zero Config - Sensible defaults with the ability to customize when needed
src/
├── bun/
│ └── index.ts # Main process - window management and app lifecycle
└── mainview/
├── App.tsx # Root React component
├── components/
│ └── FeatureDemo.tsx # Example interactive components
├── index.html # HTML shell
├── index.css # Global styles
└── index.tsx # React app entry point
- Bun - This project uses Bun as the JavaScript runtime. Install Bun
# Start development server with hot reload
bun run dev
# Build for production
bun run build
# Type check the project
bun run type-check
# Run tests (when added)
bun test
This template provides a solid foundation for building desktop applications. You can:
- Add new React components in
src/mainview/components/
- Extend the main process in
src/bun/index.ts
for native integrations - Add styling with CSS modules, styled-components, or your preferred solution
- Integrate APIs using Electrobun's built-in capabilities
When you're ready to distribute your app:
- Run
bun run build
to create a production build - Use Electrobun's packaging tools to create platform-specific installers
- Distribute your application through your preferred channels
- Electrobun Documentation - Learn about desktop app development
- React Documentation - Learn React fundamentals and advanced patterns
- Bun Documentation - Explore Bun's features and capabilities
Contributions are welcome! Please feel free to submit a Pull Request.