StackForge
npm
What's new in v1.5.1

Ship full-stack apps in seconds, not weekends

The opinionated CLI that scaffolds typed, end-to-end architectures. Shared Zod contracts, Next.js App Router, NestJS API, Prisma migrations, shadcn/ui, JWT auth, health checks, tests, optional production Docker images, and generated GitHub Actions CI—out of the box.

npx create-stackforge-app@latest
create-stackforge-app

$ npx create-stackforge-app@latest

? Project name my-saas-app

Built with the stack you already trust

StackForge wires familiar tools into one generate command—apps/web, apps/api, database, containers, and CI templates aligned with what we ship on npm today.

  • Next.js

    App Router UI

  • React

    Frontend

  • TypeScript

    End-to-end types

  • NestJS

    REST API

  • Node.js

    Runtime

  • Prisma

    ORM & migrations

  • PostgreSQL

    Primary DB

  • SQLite

    Local DB

  • Docker

    Compose stack

  • pnpm

    Monorepo

  • Tailwind CSS

    Styling

  • Zod

    Contracts + env

  • Jest

    Unit & e2e tests

  • ESLint

    Linting

  • GitHub Actions

    Generated CI

Included based on your preset

Not just logos—working code, configs, and scripts. Web, Docker, and dashboard pieces depend on preset and options you choose at scaffold time.

  • packages/contracts — shared Zod schemas for API requests, responses, and web types
  • JWT auth: register, login, /auth/me session hydration, protected routes
  • Bcrypt password hashing and per-project JWT_SECRET
  • Prisma migrations (PostgreSQL & SQLite) with db:deploy
  • GET /health — API uptime and database status
  • Zod-validated environment, Helmet, throttling, request IDs
  • shadcn/ui + Tailwind dashboard, React Query, Axios API client
  • Backend unit tests, Supertest e2e, ESLint & typecheck scripts
  • Multi-stage Docker images: Postgres, apps/api, apps/web, Prisma Studio (127.0.0.1)
  • Presets: dashboard (full), minimal (auth + simple UI), api (NestJS-only)
  • stackforge.json v2, stackforge doctor & info, AGENTS.md, generated CI

Everything you need to start shipping

One command generates a typed full-stack foundation—shared contracts, auth, data layer, security, tests, and deploy paths included.

Full-stack monorepo

pnpm workspaces under apps/web and apps/api plus packages/* — shared dev, lint, typecheck, test, and build scripts.

Shared Zod contracts

packages/contracts keeps NestJS DTO validation and web API types aligned—one source of truth for auth and users.

Secure auth baseline

End-to-end JWT authentication: bcrypt passwords, /auth/me hydration, login redirects, and protected users API.

Prisma migrations

PostgreSQL or SQLite with migrate deploy, Docker Postgres on :5433, and Prisma Studio in compose (localhost-only).

Production baseline

GET /health, Zod env validation, Helmet, rate limits, request IDs, and consistent API error responses.

Tests & CI template

Jest unit tests, Supertest e2e, ESLint on web and API, plus .github/workflows/ci.yml in every app.

Docker that runs

Multi-stage production images for API and web, PostgreSQL health checks, migrations, and localhost-only Prisma Studio.

CLI, presets & manifest

--preset dashboard | minimal | api, stackforge.json v2, stackforge doctor/info, and AGENTS.md for tooling.

Architecture at a glance

A pnpm workspace with apps/ and packages/ so the web app, API, contracts, and shared config stay easy to navigate.

project structure
my-app/
├── apps/
│   ├── api/              # NestJS + Prisma + JWT
│   └── web/              # Next.js 14 App Router
├── packages/
│   ├── contracts/        # Zod schemas + shared API types
│   ├── typescript-config/
│   ├── eslint-config/
│   └── ui/               # shared stub
├── .github/workflows/ci.yml
├── stackforge.json       # manifest v2
├── docker-compose.yml
├── AGENTS.md
└── pnpm-workspace.yaml

Shared contracts

packages/contracts defines Zod schemas and inferred types—nestjs-zod DTOs in apps/api and typed services in apps/web.

Authentication included

Register and login UI, JWT guards, /auth/me hydration, middleware, and hashed passwords—a secure baseline you can extend.

Presets & diagnostics

dashboard, minimal, or api-only scaffolds; then pnpm run doctor and pnpm run info inside the project.

CLI flags & automation

Use interactive prompts locally, or pass flags in CI and scripts for repeatable scaffolds. Build your command →

FlagDescription
-y, --yesSkip all prompts and use defaults (PostgreSQL, Docker, auto-install)
-p, --preset <name>dashboard (default), minimal, or api (NestJS-only, no web app)
-d, --database <type>Database: postgresql or sqlite
--docker / --no-dockerGenerate or skip Docker support
--install / --no-installInstall dependencies automatically or skip
-c, --cwd <path>Working directory for project output

Examples

npx create-stackforge-app@latest my-app -y
npx create-stackforge-app@latest my-api -y --preset api
npx create-stackforge-app@latest my-app -y --preset minimal --database sqlite --no-docker

Inside a generated project: pnpm run doctor and pnpm run info from the generated project root.

How to use create-stackforge-app

Install nothing globally—run via npx. Generated apps use pnpm workspaces (Node 18+). Full documentation →

1. Scaffold a new project

Answer prompts for name, description, database, Docker, and dependency installation.

npx create-stackforge-app@latest

2. Enable pnpm (if needed)

Corepack ships with Node.js and can activate pnpm for generated projects.

corepack enable
corepack prepare pnpm@9 --activate

3. Run locally

For PostgreSQL with generated Docker support, start the database before setup. Skip that command for SQLite or an existing PostgreSQL server.

cd my-app && pnpm install
cd my-app && docker compose up -d postgres
cd my-app && pnpm run db:setup
cd my-app && pnpm dev

Run pnpm dev from the project root so contracts are built and watched.

4. Or run the full Docker stack

When Docker support was generated, Compose waits for PostgreSQL and applies existing migrations through the API container.

cd my-app && docker compose up --build -d

5. Verify and customize

Check diagnostics, then extend auth, API routes, or UI from the monorepo baseline.

cd my-app && pnpm run doctor
cd my-app && pnpm run info

Read full documentation for presets, contracts, and Docker.

Tap to open the StackForge chatbot