Relay – Node.js REST API Boilerplate

TypeScript Express API starter with JWT auth, RBAC, validation, OpenAPI docs, background jobs and 95% test coverage.

by Neha VermaVerified Author(104) 1,104 sales 35.5K viewsUpdated 06 Oct 2026
Relay – Node.js REST API Boilerplate — preview 1
1 / 3

Relay is an opinionated, well-tested foundation for REST APIs. It encodes the security and observability practices teams usually add too late.

Key features

  • JWT access/refresh tokens with rotation
  • Role-based access control middleware
  • Zod validation with typed handlers
  • OpenAPI 3.1 docs generated from routes
  • BullMQ jobs and scheduled tasks
  • Structured logging and request tracing

Tech stack

  • Node.js 20
  • Express 5
  • TypeScript
  • MongoDB
  • Redis

Requirements

  • Node.js 20+
  • MongoDB 6+
  • Redis 7+

Installation

  1. Copy .env.example to .env.local and fill in the database URL and secrets.
  2. Run npm install.
  3. Run npm run seed to load demo data.
  4. Start with npm run dev, then deploy with the included PM2 or Docker configuration.

What's included

  • Full source code with comments
  • Step-by-step documentation
  • Demo data and seed scripts where applicable
  • 12 months of author support and all future updates

More from this author

View all

Related in Web Scripts & Software

View all