WHAT: Production-ready Node.js backend patterns - Express/Fastify setup, layered architecture, middleware, error handling, validation, database integration, authentication, and caching. WHEN: User is building REST APIs, setting up Node.js servers, implementing authentication, integrating databases, adding validation/caching, or structuring backend applications. KEYWORDS: nodejs, node, express, fastify, typescript, api, rest, middleware, authentication, jwt, validation, zod, postgres, mongodb, redis, caching, rate limiting, error handling
Initial release — production-grade Node.js backend patterns. - Covers setup for Express and Fastify, including middleware and validation. - Layered architecture example for scalable code organization. - Standardized error handling with custom error classes and global handler. - Input validation best practices, including Zod middleware sample. - JWT authentication and role-based authorization middleware patterns. - Database integration guidance (PostgreSQL pool example included). - Emphasizes security and maintainability (“NEVER” rules outlined).