https://github.com/bskimball/react-router-rsc-hono-bun
React Router RSC with Hono server
https://github.com/bskimball/react-router-rsc-hono-bun
bun hono react react-router rsc
Last synced: about 1 month ago
JSON representation
React Router RSC with Hono server
- Host: GitHub
- URL: https://github.com/bskimball/react-router-rsc-hono-bun
- Owner: bskimball
- Created: 2025-08-22T12:34:17.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-08-22T14:28:20.000Z (about 2 months ago)
- Last Synced: 2025-08-22T14:48:13.944Z (about 2 months ago)
- Topics: bun, hono, react, react-router, rsc
- Language: TypeScript
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to React Router! (Experimental RSC)
โ ๏ธ **EXPERIMENTAL**: This template demonstrates React Server Components with React Router. This is experimental technology and not recommended for production use.
A modern template for exploring React Server Components (RSC) with React Router, powered by Vite and served with Hono. Built for speed with Bun and formatted with Biome.
## Features
- ๐งช **Experimental React Server Components**
- ๐ Server-side rendering with RSC
- โก๏ธ Hot Module Replacement (HMR)
- ๐ฆ Asset bundling and optimization with Vite
- ๐ Data loading and mutations
- ๐ TypeScript by default
- ๐ TailwindCSS for styling
- ๐ **Hono** - Fast, lightweight web framework for the server
- โก **Bun** - Fast JavaScript runtime for package management and production server
- ๐งน **Biome** - Fast formatter and linter for consistent code style
- ๐ [React Router docs](https://reactrouter.com/)
- ๐ [React Server Components guide](https://reactrouter.com/how-to/react-server-components)
- ๐ฅ [Hono documentation](https://hono.dev/)
- ๐โโ๏ธ [Bun documentation](https://bun.sh/)
- โก [Biome documentation](https://biomejs.dev/)## Getting Started
### Installation
Install the dependencies with Bun:
```bash
bun install
```### Development
Start the development server with HMR:
```bash
bun run dev
```Your application will be available at `http://localhost:5173`.
## Building for Production
Create a production build:
```bash
bun run build
```## Running Production Build
Run the production server (powered by Hono and Bun):
```bash
bun run start
```The production server uses:
- **Bun** as the JavaScript runtime for optimal performance
- **Hono** as the web framework for fast, efficient request handling
- Compression middleware and static asset serving
- Customizable port via the `PORT` environment variable (defaults to 3000)## Understanding React Server Components
This template includes three entry points:
- **`entry.rsc.tsx`** - React Server Components entry point
- **`entry.ssr.tsx`** - Server-side rendering entry point
- **`entry.browser.tsx`** - Client-side hydration entry pointThe production server (`server.js`) uses Hono to:
- Serve static assets from the build output
- Handle compression with built-in middleware
- Route all requests through the RSC handler
- Provide fast, efficient request processingLearn more about React Server Components with React Router in our [comprehensive guide](https://reactrouter.com/how-to/react-server-components).
## Code Quality
This project uses **Biome** for fast, consistent code formatting and linting:
### Formatting
Format your code:
```bash
bun run format
```### Linting
Check for code issues:
```bash
bun run lint
```### Combined Check
Run both formatting and linting:
```bash
bun run check
```Biome is configured to:
- Use double quotes for JavaScript/TypeScript
- Use tab indentation
- Enable recommended linting rules
- Automatically organize imports## Styling
This template comes with [Tailwind CSS](https://tailwindcss.com/) already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
---
Built with โค๏ธ using React Router, Hono, Bun, and Biome.