mirror of
https://github.com/mikndotdev/bunstack.git
synced 2026-08-18 02:47:36 +00:00
Build a React SPA with Bun and TanStack Router
https://bunstack.pages.dev
- TypeScript 90.5%
- CSS 6.4%
- HTML 3.1%
| src | ||
| .gitignore | ||
| .tool-versions | ||
| biome.json | ||
| build.ts | ||
| bun.lock | ||
| bunfig.toml | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Bunstack (Bun + React + TanStack Router Template)
A modern web application starter template using Bun, React 19, TanStack Router, and TailwindCSS. No Vite required!
Features
- ⚡ Bun - Fast JavaScript runtime and package manager
- ⚛️ React 19 - Latest React version with improved performance
- 🧭 TanStack Router - Type-safe file-based routing
- 🎨 TailwindCSS v4 - Utility-first CSS framework
- 🔄 HMR - Hot Module Replacement for quick development
- 🧰 TypeScript - Type safety for better development experience
- 🔍 Biome - Fast code formatter and linter
Getting Started
Prerequisites
- Bun installed on your machine
Installation
# Clone the repository
git clone https://github.com/mikndotdev/bunstack.git
cd bun-react-template
# Install dependencies
bun install
Development
Start the development server with hot reloading:
bun dev
Building for Production
Build the application for production:
bun build
This will generate a dist/ directory containing the production build. Set this as the build output directory in the static site hosting service of your choice.
Preview Production Build
Preview the production build locally:
bun preview
Project Structure
├── src/
│ ├── assets/ # Static assets
│ ├── components/ # Reusable components
│ ├── routes/ # File-based routes
│ └── index.tsx # Application entry point
├── build.ts # Build script (required as the Tailwind plugin cannot be accessed via the CLI)
├── package.json
└── tsconfig.json
Credits
- Partly inspired by Bunfun