What problem does it solve?
Developing scalable and maintainable Node.js microservices requires strict adherence to architectural patterns. This Skill provides a comprehensive guide to building robust backend APIs with Node.js, Express, and TypeScript, ensuring consistency, testability, and efficient error handling across your services.
Core Features & Use Cases
- Layered Architecture: Implement a clear separation of concerns with dedicated layers for routes, controllers, services, and repositories, enhancing maintainability and testability.
- Type-Safe Validation & Configuration: Utilize Zod for robust input validation and
unifiedConfig for type-safe, environment-agnostic configuration, eliminating process.env pitfalls.
- Sentry Error Tracking & Async Handling: Integrate Sentry for comprehensive error monitoring and apply
asyncErrorWrapper for consistent async error handling, preventing unhandled rejections.
- Use Case: You need to create a new API endpoint for user management. Use this Skill to define the route, implement a controller extending
BaseController, write business logic in a service, interact with the database via a repository, and ensure all input is validated with Zod and errors are tracked by Sentry.
Quick Start
Generate a new Express route /api/products with a GET endpoint that lists all products, ensuring it uses a controller, service, and repository pattern, and validates any query parameters with Zod.