A lightweight starter kit for building modern single-page applications with Bun for tooling, React for UI logic, and Chakra UI for accessible, themeable components. This template is configured to let you ship quickly with sensible defaults and a clear project structure.
- ⚡️ Bun-first toolchain – fast installs, bundling, and dev server via Bun.
- ⚛️ React with TypeScript – strong typing and JSX out of the box.
- 🎨 Chakra UI – ready-to-use component library with dark mode support.
- 📦 Zero-config setup – scripts for local development and production builds already wired up.
- Bun
v1.0.0or later installed locally.
Install project dependencies with Bun:
bun installRun these commands from the project root:
| Command | Description |
|---|---|
bun dev |
Starts the development server with hot module reloading. |
bun start |
Serves the production build. |
bun test |
Executes unit tests (configure in bunfig.toml / src). |
ℹ️ Bun automatically loads variables from
.envfiles. No extra dotenv setup is required.
.
├── src/
│ ├── App.tsx # Root React component composed with Chakra UI
│ ├── components/ # Shared UI utilities (provider, color mode, etc.)
│ ├── frontend.tsx # React entry file imported by index.html
│ ├── index.css # Global styles
│ ├── index.html # HTML shell bundled by Bun
│ └── index.tsx # Bun server that serves the SPA
├── bunfig.toml # Bun configuration
├── package.json # Scripts and dependency manifest
├── tsconfig.json # TypeScript compiler options
└── README.md
- Adjust theming by updating
src/components/ui/provider.tsxto pass a custom theme or system intoChakraProvider. - Use the Chakra UI docs for component examples, recipes, and accessibility guidelines.
Create an optimized production bundle and serve it:
bun run build
bun startThe bun run build script should output static assets ready for static hosting
providers. Adjust your deployment pipeline to copy the generated files from the
./dist directory.
- Fork the repository and create a feature branch.
- Install dependencies with
bun install. - Run
bun test(and any other project-specific checks) before opening a PR. - Submit your pull request with a clear summary of the changes.
This project is open source and available under the MIT License. Feel free to use and adapt it for your own projects.