A CLI that scaffolds opinionated, production-ready Next.js applications. Composes Next 16 + tRPC + TanStack Query + Tailwind v4 + shadcn/ui + Prisma 7
- Better Auth + Resend into a working codebase that builds cleanly on the first try.
# Interactive (walks you through prompts)
npx create-codewave-app@latest my-app
# Non-interactive (flag-driven, suitable for CI)
npx create-codewave-app@latest my-app \
--db prisma-postgres \
--auth better-auth \
--auth-plugins 2fa,google,github \
--email \
--pm pnpm \
--src-dir \
--install \
--git \
--yesBoth modes produce identical output. --yes skips all confirms and uses
defaults for any unspecified flag.
A Next.js 16 App Router project with:
| Layer | Technology |
|---|---|
| Runtime | Next 16, React 19, TypeScript (strict) |
| Styling | Tailwind v4 (via @tailwindcss/postcss), shadcn/ui baseline |
| API | tRPC v11, TanStack Query v5, superjson |
| Database | Prisma 7 with prisma-client generator (optional) |
| Auth | Better Auth 1.x (optional, with plugins) |
| Resend + React Email (optional) | |
| Tooling | ESLint flat config, Prettier-friendly |
Every combination is covered by a scaffold integration test suite that verifies generated file structure, dependency lists, and generated content. End-to-end build smoke tests (install + next build) are run manually before each release.
--db prisma-postgres— Prisma 7 +@prisma/adapter-pg+pg. Connection viaDATABASE_URL.--db prisma-sqlite— Prisma 7 +@prisma/adapter-better-sqlite3+better-sqlite3.DATABASE_URL="file:./dev.db"by default.--auth better-auth— Better Auth wired to your Prisma db. Sign-in, sign-up, forgot-password, reset-password, verify-email, and a protected dashboard. AddsprotectedProcedureto tRPC.--auth-plugins 2fa— Two-factor (TOTP / email OTP / backup codes) page + form. Extends the PrismaUsermodel and adds aTwoFactormodel automatically.--auth-plugins google,github— Social OAuth providers. Each adds*_CLIENT_ID/*_CLIENT_SECRETenv vars.--email— Resend + React Email templates for verification, password reset, and OTP. When auth is selected without email, a stublib/email.tsis emitted so the build still works.
| Flag | Values | Default |
|---|---|---|
[name] (positional) |
., a name, or any path |
(prompt) |
--db |
prisma-postgres, prisma-sqlite, none |
prompt |
--auth |
better-auth, none |
prompt |
--auth-plugins |
csv of 2fa, google, github |
none |
--storage |
none |
none |
--email / --no-email |
boolean | prompt |
--src-dir / --no-src-dir |
boolean | true |
--pm |
npm, pnpm, yarn |
auto-detect |
--install / --no-install |
boolean | true |
--git / --no-git |
boolean | true |
-y / --yes |
flag | false |
The positional argument can be any of:
.— scaffold into the current directory (must be empty or contain only.git)my-app— scaffold into./my-appfoo/my-app— scaffold into./foo/my-app(creates the parent)/abs/path/my-app— scaffold into the absolute pathC:\Users\me\my-app— Windows path, same idea
The basename always becomes the name in the generated package.json.
cd my-app
cp .env.example .env.local # fill in secrets
pnpm install # if --no-install
pnpm exec prisma generate # if you picked Prisma
pnpm exec prisma db push # create your schema
pnpm dev # start the dev serverThe architecture is documented in progress-tracker.md.
Adding a new feature is one folder under src/features/<category>/<id>/
plus one line in src/core/registry.ts and one matrix entry. See any
existing feature (prisma-postgres is the simplest) for the pattern.
git clone <repo>
cd create-codewave-app
pnpm install
pnpm typecheck
pnpm lint
pnpm test # unit tests
pnpm test:scaffold # integration: scaffold + assert into tempdirsMIT.