A modern TypeScript monorepo template powered by Hono, tRPC, TanStack Router, Tailwind CSS, shadcn/ui, Better-Auth, and Drizzle with libSQL - all bundled together with Bun for maximum performance.
- Bun - Fast all-in-one JavaScript runtime
- TypeScript - Type safety across the stack
- tRPC - End-to-end type-safe APIs
- TanStack Router - Type-safe routing
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Re-usable components
- Hono - Ultrafast web framework
- Better-Auth - Modern authentication solution
- Drizzle ORM - TypeScript ORM
- libSQL - SQLite-compatible database engine
.
├── packages/
│ ├── client/ # Frontend React application
│ │ ├── src/
│ │ │ ├── components/ # UI components
│ │ │ ├── routes/ # TanStack Router routes
│ │ │ └── lib/ # Utilities and configurations
│ │ └── ...
│ └── server/ # Backend Hono API
│ ├── src/
│ │ ├── db/ # Database schema and config
│ │ ├── lib/ # Auth and tRPC setup
│ │ └── routers/ # tRPC routers
│ └── ...- Clone (or use github template) and install dependencies:
npx degit AmanVarshney01/Better-T-Stack my-project
cd my-project
bun install- Set up the database:
# Start local SQLite database with turso
bun run db:local
# Push database schema
bun run db:push- Start development servers:
# Start both client and server
bun run dev
# Or individually:
bun run dev:client
bun run dev:serverThe client will be available at http://localhost:3001
bun dev- Start all development serversbun dev:client- Start client development serverbun dev:server- Start server development serverbun db:local- Start local SQLite databasebun db:push- Push database schema changesbun clean- Clean all node_modules and lock files
bun typecheck- Run TypeScript type checkingbun build- Build for productionbun serve- Preview production build
bun dev- Start development server with hot reloadbun wrangler:dev- Run with Cloudflare Workers locallybun wrangler:deploy- Deploy to Cloudflare Workers
This template is configured for an optimal development experience out of the box:
- Full-stack TypeScript configuration
- End-to-end type safety with tRPC
- Modern authentication with Better-Auth
- Beautiful UI components from shadcn/ui
- Fast development server with Bun
- Production-ready with Cloudflare Workers support