Skip to content

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

Notifications You must be signed in to change notification settings

better-t-stack/Better-T-Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  1. Set up the database:
# Start local SQLite database with turso
bun run db:local

# Push database schema
bun run db:push
  1. Start development servers:
# 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

Releases

No releases published

Packages

No packages published