Single-page web app project template curated for performance, developer experience, and type safety.
- Bun - server runtime, package manager
- Hono - web app framework
- Socket.IO - real-time client/server communication
- React - user interface
- TanStack Router - client-side routing
- TanStack Query, Zustand - state management
- TypeScript, Biome, Lefthook - code quality/style
- Vite - dev server, bundler
-
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
Dockerfilethat 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 themainbranch.
-
Install Bun
-
Install dependencies:
bun installRun server and client concurrently with hot reloading on file-save:
bun devOption 1: Build app and run standalone binary:
bun build:app
./dist/appOption 2: Build Docker image and run in container:
docker build -t fresh-bun .
docker run -p 3000:3000 fresh-bun