A production-ready CLI scaffolding tool that generates a full-stack application with Next.js (App Router), NestJS, Prisma, PostgreSQL/SQLite, Tailwind CSS, shadcn/ui, JWT authentication, shared API contracts (Zod), Axios, Docker, and pnpm workspaces.
Releases: GitHub Releases
packages/contracts (API + web)apps/*, packages/*)dashboard, minimal, or api-onlystackforge doctor / stackforge info in generated projectsdocker compose up -d or pnpm dev from the project rootNode.js: 18+ supported; Node 22 is used in StackForge CI.
npx create-stackforge-app@latest
The generated projects use pnpm workspaces. Node.js includes corepack, which installs pnpm automatically. If you see a "pnpm: command not found" error, run:
corepack enable
corepack prepare pnpm@9 --activate
Then pnpm install, pnpm dev, etc. will work.
You will be prompted for:
| Preset | What you get |
|---|---|
dashboard (default) | Web + API: auth, user admin, dashboard, profile/settings |
minimal | Web + API without dashboard profile/settings UI and related API surface |
api | Backend only (apps/api); no apps/web |
Skip prompts entirely with -y/--yes, or pass individual flags to skip only those prompts:
# Defaults: PostgreSQL + Docker + auto-install
npx create-stackforge-app@latest my-app -y
# Custom, no prompts
npx create-stackforge-app@latest my-app -y --database sqlite --no-docker --no-install
npx create-stackforge-app@latest my-api -y --preset api
npx create-stackforge-app@latest my-app -y --preset minimal
| Flag | Description |
|---|---|
-d, --database <type> | Database: postgresql or sqlite |
-p, --preset <name> | dashboard (default), minimal, or api |
--docker / --no-docker | Generate or skip Docker support |
--install / --no-install | Install dependencies automatically or skip |
-y, --yes | Skip all prompts and use defaults |
-c, --cwd <path> | Working directory |
Inside a generated project:
pnpm run db:setup
pnpm dev
pnpm run doctor
pnpm run info
For PostgreSQL with generated Docker support, run docker compose up -d postgres before pnpm run db:setup. A full Docker stack uses docker compose up --build -d and applies existing migrations automatically.
Run pnpm dev from the project root so packages/contracts is built and watched (do not start only a single app filter unless you have already built contracts).
my-app/
├── apps/
│ ├── api/ # NestJS application
│ └── web/ # Next.js application (not included for `--preset api`)
├── packages/
│ ├── contracts/ # Zod schemas + shared API types
│ ├── eslint-config/
│ ├── typescript-config/
│ └── ui/ # shared UI stub
├── stackforge.json # StackForge project manifest (schema v2)
├── AGENTS.md # Architecture notes for humans and AI tools
├── .stackforge/ # Reserved for StackForge tooling metadata
├── docker-compose.yml
├── README.md
└── .env.example
Projects created with 1.2.x used frontend/ + backend/ (manifest v1). See docs/MIGRATION-monorepo.md.
PostgreSQL + Docker: Prisma Studio is exposed at http://127.0.0.1:5555 (localhost only).
Make sure pnpm is available (see corepack):
pnpm install
pnpm run build
node ./bin/create-stackforge-app.js
After changing templates or the CLI:
pnpm run smoke # SQLite + PostgreSQL generate smoke
pnpm run smoke:sqlite # SQLite (dashboard preset)
pnpm run smoke:postgresql # PostgreSQL (dashboard preset)
pnpm run smoke:presets # SQLite: dashboard, minimal, api
pnpm run smoke:docker # Docker build + API health + Prisma Studio query
See Phases-stack-forge.md, docs/file-ownership.md, and docs/tested-stack.md.
MIT
77 commits
TypeScript
56.6%
EJS
37.0%
JavaScript
5.9%
A production-ready CLI scaffolding tool that generates a full-stack application with Next.js (App Router), NestJS, Prisma, PostgreSQL/SQLite, Tailwind CSS, shadcn/ui, JWT authentication, shared API contracts (Zod), Axios, Docker, and pnpm workspaces.
Releases: GitHub Releases
packages/contracts (API + web)apps/*, packages/*)dashboard, minimal, or api-onlystackforge doctor / stackforge info in generated projectsdocker compose up -d or pnpm dev from the project rootNode.js: 18+ supported; Node 22 is used in StackForge CI.
npx create-stackforge-app@latest
The generated projects use pnpm workspaces. Node.js includes corepack, which installs pnpm automatically. If you see a "pnpm: command not found" error, run:
corepack enable
corepack prepare pnpm@9 --activate
Then pnpm install, pnpm dev, etc. will work.
You will be prompted for:
| Preset | What you get |
|---|---|
dashboard (default) | Web + API: auth, user admin, dashboard, profile/settings |
minimal | Web + API without dashboard profile/settings UI and related API surface |
api | Backend only (apps/api); no apps/web |
Skip prompts entirely with -y/--yes, or pass individual flags to skip only those prompts:
# Defaults: PostgreSQL + Docker + auto-install
npx create-stackforge-app@latest my-app -y
# Custom, no prompts
npx create-stackforge-app@latest my-app -y --database sqlite --no-docker --no-install
npx create-stackforge-app@latest my-api -y --preset api
npx create-stackforge-app@latest my-app -y --preset minimal
| Flag | Description |
|---|---|
-d, --database <type> | Database: postgresql or sqlite |
-p, --preset <name> | dashboard (default), minimal, or api |
--docker / --no-docker | Generate or skip Docker support |
--install / --no-install | Install dependencies automatically or skip |
-y, --yes | Skip all prompts and use defaults |
-c, --cwd <path> | Working directory |
Inside a generated project:
pnpm run db:setup
pnpm dev
pnpm run doctor
pnpm run info
For PostgreSQL with generated Docker support, run docker compose up -d postgres before pnpm run db:setup. A full Docker stack uses docker compose up --build -d and applies existing migrations automatically.
Run pnpm dev from the project root so packages/contracts is built and watched (do not start only a single app filter unless you have already built contracts).
my-app/
├── apps/
│ ├── api/ # NestJS application
│ └── web/ # Next.js application (not included for `--preset api`)
├── packages/
│ ├── contracts/ # Zod schemas + shared API types
│ ├── eslint-config/
│ ├── typescript-config/
│ └── ui/ # shared UI stub
├── stackforge.json # StackForge project manifest (schema v2)
├── AGENTS.md # Architecture notes for humans and AI tools
├── .stackforge/ # Reserved for StackForge tooling metadata
├── docker-compose.yml
├── README.md
└── .env.example
Projects created with 1.2.x used frontend/ + backend/ (manifest v1). See docs/MIGRATION-monorepo.md.
PostgreSQL + Docker: Prisma Studio is exposed at http://127.0.0.1:5555 (localhost only).
Make sure pnpm is available (see corepack):
pnpm install
pnpm run build
node ./bin/create-stackforge-app.js
After changing templates or the CLI:
pnpm run smoke # SQLite + PostgreSQL generate smoke
pnpm run smoke:sqlite # SQLite (dashboard preset)
pnpm run smoke:postgresql # PostgreSQL (dashboard preset)
pnpm run smoke:presets # SQLite: dashboard, minimal, api
pnpm run smoke:docker # Docker build + API health + Prisma Studio query
See Phases-stack-forge.md, docs/file-ownership.md, and docs/tested-stack.md.
MIT
77 commits
TypeScript
56.6%
EJS
37.0%
JavaScript
5.9%