Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/amanvarshney01/create-better-t-stack/llms.txt

Use this file to discover all available pages before exploring further.

Build your TypeScript stack, your way

Better-T-Stack is a modern CLI tool that scaffolds end-to-end type-safe TypeScript projects with best practices and customizable configurations. Unlike traditional boilerplates, Better-T-Stack lets you pick exactly what you need—nothing more, nothing less.

Type-safe end-to-end

Full TypeScript type safety across frontend, backend, API layer, and database

Zero bloat

Minimal templates with only the dependencies you choose

Latest dependencies

Always uses current, stable versions by default

Free and open source

MIT licensed and community-driven forever

Philosophy

Better-T-Stack is built on four core principles:

Roll your own stack

You pick only the parts you need, nothing extra. Choose from a wide range of frontend frameworks, backend servers, databases, ORMs, API layers, and addons. Want a full-stack Next.js app with Hono backend and Drizzle ORM? Done. Need just a backend API with Express? Easy. Frontend-only React app? No problem.

Minimal templates

Bare-bones scaffolds with zero bloat. Every file generated has a purpose. No unnecessary abstractions, no unused dependencies, no example code you’ll delete anyway. Just clean, production-ready TypeScript code.

Latest dependencies

Always use current, stable versions by default. No outdated packages or legacy patterns. Your project starts with the latest versions of React, Next.js, Hono, Drizzle, and everything else you choose.

Free and open source

Forever. Better-T-Stack is MIT licensed and built by the community. No paid tiers, no vendor lock-in, no hidden fees. Contribute on GitHub.

Key Features

Better-T-Stack supports a comprehensive set of modern technologies:
  • React: TanStack Router, React Router, TanStack Start (SSR)
  • Next.js: App Router with full TypeScript support
  • Vue: Nuxt with file-based routing
  • Svelte: SvelteKit with type-safe routing
  • Solid: SolidJS with SolidStart
  • React Native: Expo with NativeWind or Unistyles
  • None: Backend-only or headless projects
  • Hono: Modern, lightweight web framework (supports Bun, Node.js, Cloudflare Workers)
  • Express: Traditional Node.js framework
  • Fastify: High-performance Node.js framework
  • Elysia: Bun-first framework with end-to-end type safety
  • Convex: Real-time backend-as-a-service
  • Self: API routes within your frontend framework (Next.js, Nuxt, etc.)
  • None: Frontend-only projects
Databases:
  • SQLite (local or cloud with Turso)
  • PostgreSQL (self-hosted, Neon, Supabase, or Prisma Postgres)
  • MySQL (self-hosted or PlanetScale)
  • MongoDB (self-hosted or MongoDB Atlas)
ORMs:
  • Drizzle (TypeScript-first, lightweight)
  • Prisma (feature-rich with migrations)
  • Mongoose (for MongoDB)
  • tRPC: End-to-end type-safe APIs (works with React frameworks)
  • oRPC: OpenAPI-compatible type-safe APIs (works with all frameworks)
  • None: REST or custom API implementation
  • Better-Auth: Email/password authentication with session management
  • Clerk: Authentication for Convex backends
  • Polar: Payment processing (requires Better-Auth)
  • Bun: Fast all-in-one JavaScript runtime
  • Node.js: Traditional JavaScript runtime (v20+)
  • Cloudflare Workers: Serverless edge runtime (with Hono backend only)
  • Turborepo: Monorepo build system for faster builds
  • PWA: Progressive Web App support
  • Tauri: Desktop application wrapper
  • Biome: Fast linter and formatter
  • Lefthook or Husky: Git hooks
  • Starlight or Fumadocs: Documentation site generators
  • Oxlint: Experimental fast linter
  • And more: Ruler, MCP, Ultracite, OpenTUI, WXT, Skills
  • Todo App: Full CRUD example with database and API
  • AI Chat: AI-powered chat interface using Vercel AI SDK

Type Safety End-to-End

Better-T-Stack generates projects with full type safety across your entire stack:
// Define your API endpoint (server)
export const router = t.router({
  getTodos: t.procedure
    .input(z.object({ userId: z.string() }))
    .query(async ({ input }) => {
      return db.select().from(todos).where(eq(todos.userId, input.userId))
    }),
})

// Call it from your frontend with full type safety
const { data } = trpc.getTodos.useQuery({ userId: "123" })
//    ^? Todo[] - fully typed!
No manual type synchronization, no REST API type mismatches, no runtime errors from type issues.

Clean Monorepo Layout

Every Better-T-Stack project is organized as a clean monorepo:
my-app/
├── apps/
│   ├── web/          # Frontend application
│   ├── server/       # Backend API (if not using Convex or self)
│   ├── native/       # Mobile app (optional)
│   └── docs/         # Documentation site (optional)
├── packages/
│   ├── config/       # Shared configuration
│   ├── api/          # Shared API types (tRPC/oRPC)
│   ├── db/           # Database schema and client
│   ├── auth/         # Authentication setup
│   └── env/          # Environment variables
└── package.json
Shared code lives in packages/, apps live in apps/. Simple, predictable, and scalable.

Zero Lock-In

You choose only what you need, and you can change it later. All generated code is yours:
  • Don’t like the file structure? Reorganize it.
  • Want to switch from Drizzle to Prisma? You can.
  • Need to add a new framework? Just add it.
  • Want to eject completely? There’s nothing to eject from.
Better-T-Stack is a scaffolding tool, not a framework. Once your project is generated, it’s 100% yours.

Next Steps

Ready to build your stack?

Installation

Install Better-T-Stack and verify your environment

Quickstart

Create your first project in under 2 minutes

CLI Reference

Explore all CLI commands and options

Stack Builder

Visually configure your stack and generate the command

Build docs developers (and LLMs) love