[ From Zero to Production ]

The production-ready monorepo. One command. Everything wired.

Stop rebuilding auth, databases, Docker configs, and API middleware. Scaffold a complete Turborepo with Better Auth, Prisma, Express, and Kubernetes in minutes.

100% Free & Open Source ยท MIT Licensed250 monthly downloads
$ pnpm dlx stackbase@latest init my-saas
bash
$

Built on a modern, production-grade stack

Turborepo
Next.js
Express
Better Auth
Prisma
shadcn/ui
Tailwind
Docker
[ Why Stackbase ]

Skip the boilerplate, keep the best practices

Get a production-ready foundation in minutes, without giving up control over your stack.

CLI-first approach

Interactive prompts guide you through setup. No configuration files to write. Just answer a few questions and go.

Opinionated structure

A monorepo with clear separation of concerns and best practices baked in from the start.

Essentials built-in

Auth, email, rate limiting, and environment handling configured out of the box, saving you 20+ hours of setup.

Extensible templates

Choose base, web, or api. Start from a solid foundation and customize freely, without fighting the setup.

Modern stack

TypeScript, React 19, Next.js 16, Tailwind v4, and Better Auth, all on current versions.

CI-ready with upgrades

Pre-configured CI/CD workflows and stackbase upgrade to keep your project in sync with upstream improvements.

[ Save 20+ Hours ]

What you skip when you use Stackbase

Every Stackbase project includes what would take days to configure manually.

Building from scratch

  • 4 hrsTurborepo workspace, task pipelines, caching
  • 4 hrsAuth setup, OAuth, email verification, 2FA
  • 3 hrsPrisma schema, migrations, Studio integration
  • 3 hrsExpress API, middleware, CORS, health checks
  • 2 hrsDocker Compose, production Dockerfiles
  • 2 hrsGitHub Actions CI/CD pipelines
  • 2 hrsReact Email templates + Resend wiring
  • 1 hrRate limiting, Redis, env validation
~21+ hours of setup

Using Stackbase

$ pnpm dlx stackbase@latest init my-saas

Ready in minutes. Everything configured.

Auth & 2FA
Database & ORM
Express API
Email Templates
Docker & K8s
CI/CD Pipelines
Rate Limiting
UI Components
Type Safety
Observability
[ End-to-End Lifecycle ]

The 4-step developer experience

From initial project scaffolding to database migrations, parallel local dev, and multi-container deployment.

bash
$pnpm dlx stackbase init my-saas
โœ“Initializing Turborepo monorepo in ./my-saas
โœ“Configuring Better Auth, Prisma PostgreSQL, & Express API
โœ“Scaffolded apps/web, apps/api, and packages/contracts
โœ“Pre-wired Docker Compose & GitHub Actions CI workflows
๐ŸŽ‰ Project ready! Run cd my-saas && pnpm dev
[ End-to-End Type Safety ]

Interactive TypeFlow architecture trace

A single schema in packages/contracts flows unbroken from database models to Express API validation and Next.js React hooks.

packages/contracts
Context:Define your Zod schemas and TypeScript models once in the shared contracts package.
1import { z } from "zod";
2ย 
3export const CreateUserRequest = z.object({
4 email: z.string().email("Valid email required"),
5 name: z.string().min(2, "Name must be at least 2 chars"),
6 role: z.enum(["USER", "ADMIN"]).default("USER"),
7});
8ย 
9export type CreateUserInput = z.infer<typeof CreateUserRequest>;
10export type UserResponse = { id: string; email: string; name: string | null };
[ Templates ]

Choose your starting point

Three standalone templates, each optimized for a different architecture.

Recommended
base

Full-Stack Starter

Complete application starter

Includes:

  • Next.js Web App
  • Express API
  • Auth & 2FA
  • Database & ORM
  • Email Templates
  • UI Components
  • Rate Limiting
  • Storage
  • Docker & K8s
  • Observability
  • CI/CD
web

Web Application

Frontend-led products

Includes:

  • Next.js Web App
  • Auth & 2FA
  • Database & ORM
  • Email Templates
  • UI Components
  • Storage
  • Docker
api

API Service

Backend services & microservices

Includes:

  • Express API
  • Auth & 2FA
  • Database & ORM
  • Rate Limiting
  • Storage
  • Contracts
  • Docker
  • Observability
  • CI/CD
[ What you get ]

Everything wired up, out of the box

Every layer of a real product, pre-configured and working together.

[ How it works ]

Three steps from zero to deployed

01

Install and initialize

Run a single command to create your project. The CLI walks you through your package manager and template-aware options for Docker, Kubernetes, Observability, and Prisma Studio.

02

Pick a template

Choose base (full-stack), web, or api. Everything is pre-configured and each template is standalone with dedicated resources.

03

Start building

Your project is ready with authentication, API routes, database schema, and CI/CD. Focus on features, not infrastructure.

[ FAQ ]

Frequently asked questions

Everything you need to know about Stackbase.

How is Stackbase different from Create T3 App?

T3 is great for a single Next.js app using tRPC. Stackbase is designed for when you need a real monorepo: a standalone Express API, shared package workspace, Docker/K8s configs, and an upgrade CLI to pull upstream improvements later.

Why Better Auth instead of NextAuth or Clerk?

Better Auth runs directly against your database via Prisma. You aren't paying monthly active user (MAU) fees to Clerk, and you get two-factor auth (TOTP), session management, and email verification out of the box.

Is Stackbase really free?

Yes, completely. It's licensed under MIT. You can use it for personal projects, client work, or commercial products without restrictions or paid tiers.

How does stackbase upgrade work?

When you scaffold a project, the CLI records your template commit in .stackbase.json. Running stackbase upgrade runs a 3-way git merge between your code, the original template, and the latest release so you can pull bugfixes without overwriting your custom changes.

Do I need Docker or Kubernetes?

Not at all. For day-to-day dev, you just run pnpm dev. Docker and Kubernetes are optional prompts during stackbase init for when you're ready to containerize or deploy to production.

What templates are available?

There are three: base (the full monorepo with Next.js frontend, Express API, and all shared packages), web (just the Next.js app and database), and api (standalone Express API service).

Can I add or remove packages after scaffolding?

Yes. It's a standard Turborepo. You can delete any folder in packages/ you don't need or drop in new ones, then update pnpm-workspace.yaml as usual.

Can I use Drizzle instead of Prisma?

Prisma is the default because it's already wired up with Better Auth and migrations. You can swap it out for Drizzle inside packages/db, but Prisma is what comes configured out of the box.

Stop configuring. Ship your product today.

100% free and open source under the MIT license. Self-host anywhere. No paywalls, no upsells, and zero vendor lock-in.

$ pnpm dlx stackbase@latest init my-saas