What problem does it solve?
This Skill provides battle-tested patterns and best practices for building scalable, maintainable, and production-ready Node.js backend applications using TypeScript, covering everything from project structure to advanced features like authentication and caching.
Core Features & Use Cases
- Structured Project Architecture: Implements a layered architecture (controllers, services, repositories) for clear separation of concerns.
- Robust Error Handling: Includes custom error classes and a global error handler for consistent error management.
- Input Validation: Integrates Zod for schema-based request validation.
- Authentication & Authorization: Provides JWT-based authentication and role-based authorization middleware.
- Database Integration: Demonstrates connection pooling and transaction patterns for PostgreSQL.
- Caching & Rate Limiting: Implements caching with Redis and rate limiting for API protection.
- Use Case: When starting a new Express or Fastify API project, use these patterns to establish a solid foundation, ensuring security, maintainability, and scalability from the outset.
Quick Start
Use the nodejs-patterns skill to set up a new Express.js server with JWT authentication and Zod validation.