~ init
01better-ts-stack
TypeScript projects, ready to run.
A CLI that scaffolds Express, NestJS, Next.js, and TanStack Start projects with a database, authentication, and Docker already set up.
npx better-ts-stack@latestRun it with no flags and it asks for each option. open builder ->
- npm
- 264
- downloads last week
- ci
- 276
- stacks tested per PR
- version
- v2.1.2
- on npm
~ stack.config
02~ my-app/
30 files03npx better-ts-stack my-app --framework nestjs --database prisma --auth --docker --yes
- + database
- + auth
- + docker
- + rate-limit
- + ci
- + agents
- + vscode
same list as --dry-run, read from the CLI templates
~ modules
10 modules0401Express
--framework express
Express 5 with security headers, CORS, a health check route, and tsx watch.
- express
- nestjs (no)
- next (no)
- tanstack (no)
02NestJS
--framework nestjs
NestJS 12 as ES modules, with security headers and a health controller.
- express (no)
- nestjs
- next (no)
- tanstack (no)
03Next.js
--framework nextjs
Next.js 16 App Router, React 19, Tailwind CSS v4, and shadcn-style components.
- express (no)
- nestjs (no)
- next
- tanstack (no)
04TanStack Start
--framework tanstack
File-based routing, Vite in development, and a Nitro production server.
- express (no)
- nestjs (no)
- next (no)
- tanstack
05Prisma
--database prisma
PostgreSQL with a starter schema, a client, and migration scripts.
- express
- nestjs
- next
- tanstack
06Drizzle
--database drizzle
PostgreSQL with a typed schema, a client, and drizzle-kit scripts.
- express
- nestjs
- next
- tanstack
07Mongoose
--database mongoose
MongoDB with a connection helper and a typed User model.
- express
- nestjs
- next
- tanstack
08Authentication
--auth
JWT, bcrypt, and Zod for backends. Better Auth with sign-in and sign-up pages for full-stack apps.
- express
- nestjs
- next
- tanstack
09Rate limiting
--rate-limit
Per-IP limits with express-rate-limit or @nestjs/throttler.
- express
- nestjs
- next (no)
- tanstack (no)
10Docker
--docker
A multi-stage Dockerfile, a Compose file, and scripts to run them.
- express
- nestjs
- next
- tanstack
| # | flag | module | Express | NestJS | Next.js | TanStack Start |
|---|---|---|---|---|---|---|
| 01 | --framework express | ExpressExpress 5 with security headers, CORS, a health check route, and tsx watch. | Yes | No | No | No |
| 02 | --framework nestjs | NestJSNestJS 12 as ES modules, with security headers and a health controller. | No | Yes | No | No |
| 03 | --framework nextjs | Next.jsNext.js 16 App Router, React 19, Tailwind CSS v4, and shadcn-style components. | No | No | Yes | No |
| 04 | --framework tanstack | TanStack StartFile-based routing, Vite in development, and a Nitro production server. | No | No | No | Yes |
| 05 | --database prisma | PrismaPostgreSQL with a starter schema, a client, and migration scripts. | Yes | Yes | Yes | Yes |
| 06 | --database drizzle | DrizzlePostgreSQL with a typed schema, a client, and drizzle-kit scripts. | Yes | Yes | Yes | Yes |
| 07 | --database mongoose | MongooseMongoDB with a connection helper and a typed User model. | Yes | Yes | Yes | Yes |
| 08 | --auth | AuthenticationJWT, bcrypt, and Zod for backends. Better Auth with sign-in and sign-up pages for full-stack apps. | Yes | Yes | Yes | Yes |
| 09 | --rate-limit | Rate limitingPer-IP limits with express-rate-limit or @nestjs/throttler. | Yes | Yes | No | No |
| 10 | --docker | DockerA multi-stage Dockerfile, a Compose file, and scripts to run them. | Yes | Yes | Yes | Yes |
~ ci.matrix
ubuntu · windows05276
stacks tested on every pull request
Every pull request generates each combination the CLI can produce, then installs, builds, type-checks, lints, and starts it.
- 1generate
- 2install
- 3build
- 4type-check
- 5lint
- 6start
on ubuntu-latest and windows-latest
| framework | none | prisma | drizzle | mongomongoose | total |
|---|---|---|---|---|---|
| Express | 24 | 24 | 24 | 24 | 96 |
| NestJS | 24 | 24 | 24 | 24 | 96 |
| Next.js | 6 | 12 | 12 | 12 | 42 |
| TanStack Start | 6 | 12 | 12 | 12 | 42 |
each cell × auth, rate limit (backends), docker, and npm / pnpm / bun. full-stack auth needs a database.
~ principles
06strict by default
Strict TypeScript in every template, with ESLint and Prettier configured.
only what you pick
Skip the database or auth and their packages and files are not there.
nothing left behind
A plain project you own. No generator runtime, no lock-in.