Build a React SPA with Bun and TanStack Router https://bunstack.pages.dev
  • TypeScript 90.5%
  • CSS 6.4%
  • HTML 3.1%
Find a file
2025-03-11 23:26:50 +09:00
src fix: packages 2025-03-11 23:23:20 +09:00
.gitignore init 2025-03-11 23:01:35 +09:00
.tool-versions bun version for cf 2025-03-11 23:02:17 +09:00
biome.json init 2025-03-11 23:01:35 +09:00
build.ts init 2025-03-11 23:01:35 +09:00
bun.lock init 2025-03-11 23:01:35 +09:00
bunfig.toml init 2025-03-11 23:01:35 +09:00
LICENSE feat: add LICENSE and update README with credits 2025-03-11 23:21:28 +09:00
package.json fix: packages 2025-03-11 23:23:20 +09:00
README.md docs: update README with production build output directory information 2025-03-11 23:26:50 +09:00
tsconfig.json init 2025-03-11 23:01:35 +09:00

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