next-nest-postgres-starter
v0.1.0
Published
Configurable Next.js + NestJS + PostgreSQL starter builder
Maintainers
Readme
Next.js + NestJS + PostgreSQL Starter Builder
A Spring Initializr-style CLI that generates and incrementally extends Next.js + NestJS + PostgreSQL projects. PostgreSQL is the default database. The frontend and backend frameworks are not interchangeable.
Install
pnpm install
pnpm build
pnpm link --globalOr run locally:
pnpm dev new my-app --defaults --yesCommands
starter new my-app
starter new my-app --defaults --yes
starter new my-app --dry-run
starter install auth
starter install stripe --dry-run
starter remove stripe
starter make:crud Product --fields name:string|required,slug:string|required|unique,price:decimal|required
starter make:resource Product
starter make:module Orders
starter doctor
starter validate
starter configThe interactive wizard asks for package manager, runtime, architecture, ORM, API style, auth, RBAC, UI, state, validation, storage, email, OAuth, payments, Redis, queues, WebSockets, search, monitoring, Docker, testing, CI/CD, and tenancy. It prints a file/package/environment plan and requires confirmation.
Generated project
Default layout (Turborepo):
apps/web Next.js App Router
apps/api NestJS REST API
packages/ types, api-client, config
prisma/ via apps/api/prisma
docker/
docs/
.cursor/rules/
starter.json
.env.exampleAcceptance target for a generated app: install, typecheck, lint, test, build, run locally, connect web to API and PostgreSQL, expose documented APIs, and enforce auth/authorization when selected.
Security
Secrets stay in environment variables. Cookies are httpOnly. Passwords are hashed. Refresh tokens rotate and can be revoked. Payment webhooks are signature-verified. Backend authorization is authoritative.
