# How to Scaffold a Next.js 16 App with gstack
gstack is an interactive CLI that turns one command into a Next.js application whose parts already fit together. You choose the stack — Prisma or Drizzle, NextAuth.js or Better Auth, Biome or ESLint — and it installs real, checked-in template files rather than generating code from strings. This guide walks through the whole flow from install to a running app.
## What you get
A gstack project ships with Next.js 16, React 19, TypeScript in strict mode, tRPC, Prisma or Drizzle, Tailwind CSS v4, shadcn/ui, Zod, a nonce-based production CSP, Vitest and Testing Library. Optional add-ons include Playwright, Sentry and a size-limit bundle budget.
## Step 1: Run the create command
Open a terminal and run:
npm create gstack@latest my-app
pnpm, yarn and bun are also supported. The CLI asks for the stack you want, installs dependencies, initialises Git and leaves you with an app that builds, typechecks and passes its tests before you have written a line.
## Step 2: Answer the prompts
gstack will ask you to pick an ORM, an auth provider, a linter and a package manager. The default is the recommended stack: NextAuth.js, Prisma, Tailwind, tRPC, shadcn/ui, Biome, PostgreSQL and the App Router. Every one of those is a prompt you can answer differently.
## Step 3: Verify the generated app
Change into the project directory and run:
npm run check
npm test
These should pass on the app gstack just generated. If they do not, the issue is in the scaffold, not in anything you wrote.
## Step 4: Start the dev server
npm run dev
The app runs at http://localhost:3000 with the starter UI, the auth routes and the tRPC API already wired.
## Headless mode for CI
For scripts and Dockerfiles, add --CI and feature flags:
npm create gstack@latest my-app -- --CI --trpc --tailwind --nextAuth --prisma --shadcn --biome --pm pnpm
This scaffolds with no prompts.
## What gstack does not do
gstack is a scaffolder, not a framework. It runs once, writes files and leaves. The generated app depends on Next.js and whatever you selected, never on create-gstack, so there is nothing to upgrade and nothing to remove later.
Frequently Asked Questions
Do I need to know the whole stack before using gstack?
No. The prompts explain each choice and the defaults are a sensible starting point. You can change any of them.
Can I use gstack in a Dockerfile?
Yes. Use the --CI flag plus explicit feature flags to scaffold without any interactive prompts.
Does gstack stay as a dependency?
No. It runs once and leaves. The generated app never depends on create-gstack.
Ready to transform your data infrastructure?
Let's discuss how these insights apply to your organization and create a roadmap for your data transformation journey.
