Introduction
nestforge is a command-line tool that scaffolds a production-ready
NestJS backend. Run npx create-nestforge, answer a couple of prompts, and you
get a working application you can build on.
What you get
Section titled “What you get”The generated project ships with:
- Express + REST — a NestJS API with URI versioning (
/api/v1). - Express + GraphQL — pick it at scaffold time to layer an Apollo
(code-first)
/graphqlendpoint over the REST API, with auth and user resolvers plus per-request DataLoaders. - Auth-ready — Passport local and Google OAuth strategies, Redis-backed sessions, guards, DTO validation, email-verification codes, and password reset.
- WebSocket gateway — socket.io with gated, session-authenticated connections and per-user rooms for 1-to-1 messaging.
- Background jobs — BullMQ queues for mail and upload processing.
- Mailer —
@nestjs-modules/mailerwith Handlebars templates for verification and password-reset emails. - Prod-grade abstractions — repository pattern (
USER_REPOSITORYtoken) and an injectable upload service, so you swap implementations without touching callers. - Testing suite — Suites-based unit tests (
TestBed.solitary) with a configured Jest setup. - Security baseline — Helmet, CSRF double-submit cookies, global rate limiting with Redis-backed storage.
- Observability — Swagger/Scalar docs at
/api-docs, Terminus health checks, Winston logging with request context.
Boots without a database
Section titled “Boots without a database”Persistence is a no-op stub by default. USER_REPOSITORY resolves to an
in-memory repository, so the app boots and runs before you decide how to store
users. Swap in a real repository when you are ready.
What it is not
Section titled “What it is not”No database, no ORM, no opinion about your frontend. The baseline stays small and swappable — you add what your project needs.
Next steps
Section titled “Next steps”Dive into the Quickstart to scaffold your first project in under a minute.