Skip to content

mikndotdev/bunstack

Repository files navigation

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

About

Build a React SPA with Bun and TanStack Router

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published