Subham Haldar
personal

Node.js Starter Template

Author and maintainer · Dec 2023 – Sep 2026

Node.js Starter Template — production-grade REST API boilerplate built for humans and AI coding agents alike. TypeScript, Express, PostgreSQL, Prisma, JWT, Zod, Vitest, Docker.

A published GitHub template for production Node.js/TypeScript APIs: feature modules, a repository pattern that keeps the ORM out of controllers, Zod-validated env and requests, revocable JWT refresh tokens, and CI against real PostgreSQL.

Built with

Node.jsTypeScriptExpressPrismaPostgreSQLZodJWTVitestDockerGitHub ActionsSwagger

The tour

CI is a two-stage GitHub Actions pipeline: lint, typecheck and format, then integration tests against a real PostgreSQL service container with coverage reports published as artifacts. Images build multi-stage and run as a non-root user.

Why another starter: TypeScript strict mode, Zod for env and requests, feature-module architecture, repository pattern, one error-handling path.
Architecture: every feature module is five files — schema, repository, service, controller, routes.
JWT auth: 15-minute access tokens, 7-day refresh tokens stored in the database and rotated on every use.
Every route documented: Swagger UI generated from JSDoc.
Quality bar: Vitest and Supertest against real Postgres, GitHub Actions on every push, multi-stage Docker build, Husky and commitlint.
Built for the AI-agent era: AGENTS.md and CLAUDE.md document the module pattern so coding agents follow it.
Use this template: npm install, setup, migrate, seed and run dev.