Better-T-Stack Tailwind Templates

Better T Stack

Tanstack Router, Hono, tRPC, Better Auth, Drizzle, Tailwind Template

Better-T Stack

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.

šŸš€ Tech Stack

Core

  • Bun - Fast all-in-one JavaScript runtime
  • TypeScript - Type safety across the stack
  • tRPC - End-to-end type-safe APIs

Frontend

Backend

šŸ“ Project Structure

.
ā”œā”€ā”€ 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
│       └── ...

🚦 Getting Started

  1. Clone (or use github template) and install dependencies:

    npx degit AmanVarshney01/Better-T-Stack my-project
    cd my-project
    bun install
    
  2. Set up the database: ```bash

    Start local SQLite database with turso

    bun run db:local

Push database schema

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

šŸ“ Available Scripts

Root

  • bun dev - Start all development servers
  • bun dev:client - Start client development server
  • bun dev:server - Start server development server
  • bun db:local - Start local SQLite database
  • bun db:push - Push database schema changes
  • bun clean - Clean all node_modules and lock files

Client

  • bun typecheck - Run TypeScript type checking
  • bun build - Build for production
  • bun serve - Preview production build

Server

  • bun dev - Start development server with hot reload
  • bun wrangler:dev - Run with Cloudflare Workers locally
  • bun wrangler:deploy - Deploy to Cloudflare Workers

šŸ’» Development

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

Top categories

Loading Svelte Themes