node-api-boilerplate

MIT · TypeScript

Why this exists

Every Node project starts with the same three days of undifferentiated work: auth, validation, error handling, tests. This repository is my personal answer — the skeleton I deploy before writing a single line of business logic.

What’s included

  • TypeScript strict mode, from tsconfig to the last route
  • JWT auth with refresh rotation, ready to use
  • A consistent error envelope so clients never parse exceptions
  • Zod validation at every boundary
  • Vitest suite covering the critical paths, not the decorative ones

Quick start

Clone it, set two environment variables, and npm run dev gives you a documented API with a working auth flow in under a minute.

Philosophy

Boilerplate earns its keep by being boring. There are no clever abstractions here — the code reads like the framework’s own docs, so the first thing you do is describe your domain, not decode mine.