Aitaouss/StackForge

TypeScript

7

77 commits

updated Sep 24, 2026

See the code

See what people are saying

SourceMessageScoreDate

create-stackforge-app — full-stack monorepo generator (Next 14, Nest 10, Prisma, JWT, Docker) (r/SideProject)

Hey everyone, I’ve been working on StackForge — an open-source CLI that generates a pnpm monorepo with: • apps/web — Next.js (App Router), Tailwind, shadcn-style UI • apps/api — NestJS, Prisma, JWT auth, Swagger • packages/contracts — Zod schemas + types shared by API and web (so you’re not…

1

Sep 24, 2026

README

create-stackforge-app

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

Features

  • Next.js 14 with App Router and TypeScript
  • 🛡️ NestJS backend with JWT authentication
  • 📜 Shared contracts — Zod schemas and types in packages/contracts (API + web)
  • 🗄️ Prisma ORM with PostgreSQL or SQLite
  • 🎨 Tailwind CSS + shadcn/ui components
  • 🐳 Docker and docker-compose support
  • 🔍 Prisma Studio in Docker (PostgreSQL stacks; bound to localhost)
  • 📦 pnpm workspaces (apps/*, packages/*)
  • 🎛️ Presetsdashboard, minimal, or api-only
  • 🔧 stackforge doctor / stackforge info in generated projects
  • 🔐 Auth flow: register, login, protected users API
  • 🚀 Run with docker compose up -d or pnpm dev from the project root

Node.js: 18+ supported; Node 22 is used in StackForge CI.

Usage

npx create-stackforge-app@latest

Requirements for generated projects

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:

  • Project name
  • Project description
  • Database (PostgreSQL or SQLite)
  • Docker support
  • Automatic dependency installation

Presets

PresetWhat you get
dashboard (default)Web + API: auth, user admin, dashboard, profile/settings
minimalWeb + API without dashboard profile/settings UI and related API surface
apiBackend only (apps/api); no apps/web

Non-interactive mode

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
FlagDescription
-d, --database <type>Database: postgresql or sqlite
-p, --preset <name>dashboard (default), minimal, or api
--docker / --no-dockerGenerate or skip Docker support
--install / --no-installInstall dependencies automatically or skip
-y, --yesSkip 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).

Generated Project Structure

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).

Development

Install dependencies

Make sure pnpm is available (see corepack):

pnpm install

Build

pnpm run build

Run locally

node ./bin/create-stackforge-app.js

Smoke-test generated apps (maintainers)

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.

License

MIT

Contributors

Aitaouss

77 commits

Aitaouss/StackForge

TypeScript

7

77 commits

updated Sep 24, 2026

See the code

See what people are saying

SourceMessageScoreDate

create-stackforge-app — full-stack monorepo generator (Next 14, Nest 10, Prisma, JWT, Docker) (r/SideProject)

Hey everyone, I’ve been working on StackForge — an open-source CLI that generates a pnpm monorepo with: • apps/web — Next.js (App Router), Tailwind, shadcn-style UI • apps/api — NestJS, Prisma, JWT auth, Swagger • packages/contracts — Zod schemas + types shared by API and web (so you’re not…

1

Sep 24, 2026

README

create-stackforge-app

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

Features

  • Next.js 14 with App Router and TypeScript
  • 🛡️ NestJS backend with JWT authentication
  • 📜 Shared contracts — Zod schemas and types in packages/contracts (API + web)
  • 🗄️ Prisma ORM with PostgreSQL or SQLite
  • 🎨 Tailwind CSS + shadcn/ui components
  • 🐳 Docker and docker-compose support
  • 🔍 Prisma Studio in Docker (PostgreSQL stacks; bound to localhost)
  • 📦 pnpm workspaces (apps/*, packages/*)
  • 🎛️ Presetsdashboard, minimal, or api-only
  • 🔧 stackforge doctor / stackforge info in generated projects
  • 🔐 Auth flow: register, login, protected users API
  • 🚀 Run with docker compose up -d or pnpm dev from the project root

Node.js: 18+ supported; Node 22 is used in StackForge CI.

Usage

npx create-stackforge-app@latest

Requirements for generated projects

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:

  • Project name
  • Project description
  • Database (PostgreSQL or SQLite)
  • Docker support
  • Automatic dependency installation

Presets

PresetWhat you get
dashboard (default)Web + API: auth, user admin, dashboard, profile/settings
minimalWeb + API without dashboard profile/settings UI and related API surface
apiBackend only (apps/api); no apps/web

Non-interactive mode

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
FlagDescription
-d, --database <type>Database: postgresql or sqlite
-p, --preset <name>dashboard (default), minimal, or api
--docker / --no-dockerGenerate or skip Docker support
--install / --no-installInstall dependencies automatically or skip
-y, --yesSkip 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).

Generated Project Structure

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).

Development

Install dependencies

Make sure pnpm is available (see corepack):

pnpm install

Build

pnpm run build

Run locally

node ./bin/create-stackforge-app.js

Smoke-test generated apps (maintainers)

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.

License

MIT

Contributors

Aitaouss

77 commits

Languages

TypeScript

56.6%

EJS

37.0%

JavaScript

5.9%