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.
.
āāā 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: ```bash
bun run db:local
bun run db:push
3. Start development servers:
```bash
# Start both client and server
bun run dev
# Or individually:
bun run dev:client
bun run dev:server
The 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 filesbun typecheck
- Run TypeScript type checkingbun build
- Build for productionbun serve
- Preview production buildbun dev
- Start development server with hot reloadbun wrangler:dev
- Run with Cloudflare Workers locallybun wrangler:deploy
- Deploy to Cloudflare WorkersThis template is configured for an optimal development experience out of the box: