Skip to content

Repository files navigation

Bun fresh-bun

Single-page web app project template curated for performance, developer experience, and type safety.

🔧 Stack

✨ Features

  • 100% Type-Safe API: Full static type safety between the server and client. See api.ts and useApi.ts for simple HTTP and WebSocket examples.

  • Progressive Web App Capable: Meets PWA requirements for an installable, native app-like experience. Scores a near-perfect PageSpeed Insights report out of the box.

  • Offline Support: A service worker caches static assets, enabling offline functionality and faster subsequent loads with fewer requests to the server.

  • Production Ready: Includes a multi-stage Dockerfile that compiles the app into a standalone binary and runs it in a minimal distroless image. Pre-configured GitHub workflows for continuous integration and deploying to fly.io on pushes to the main branch.

🚀 Getting Started

Setup

  1. Install Bun

  2. Install dependencies:

bun install

Development

Run server and client concurrently with hot reloading on file-save:

bun dev

Production

Option 1: Build app and run standalone binary:

bun build:app
./dist/app

Option 2: Build Docker image and run in container:

docker build -t fresh-bun .
docker run -p 3000:3000 fresh-bun

About

Single-page web app project template curated for performance, developer experience, and type safety. Bun, Hono, Socket.IO, React, TanStack Router/Query.

Topics

Resources

Stars

25 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages