What problem does it solve?
This Skill helps you structure a scalable Node.js backend so your API code stays maintainable, testable, and reliable as features grow.
Core Features & Use Cases
- Clean architecture separation: Organize pure business logic in
src/core/ and side effects (HTTP/DB/external APIs) in src/infra/ to reduce coupling.
- Robust API layer: Implement route handlers with input validation (e.g., Zod), consistent responses, and dependency injection via a composition root.
- First-class error handling: Use domain errors with status codes plus a global Express error handler to standardize failures.
- Reliable persistence patterns: Apply repository and transaction patterns for data access and multi-step operations like transfers.
- Testing strategy: Add unit tests for core services and integration tests for API endpoints using Supertest.
Quick Start
Build an Express or Fastify backend using a clean folder structure with validated request parsing, repository-based DB access, domain-error handling, and both unit and integration tests.