What problem does it solve?
Building and maintaining backend APIs can become fragile and unmanageable without clear separation of concerns, consistent validation, and reliable error handling. This Skill prescribes a layered architecture and patterns to keep business logic pure, isolate side effects, and ensure predictable behavior from development through production.
Core Features & Use Cases
- Layered project structure separating core business logic, infrastructure, HTTP, and configuration for maintainability.
- Factory-function route composition and dependency injection to wire repositories into Express/Fastify handlers.
- Repository pattern with Kysely, validated configuration and request schemas with Zod, and domain-specific error types with a global error handler.
- Transaction patterns for atomic DB operations, unit and integration testing strategies, and examples for common tasks such as user creation and fund transfers.
Quick Start
Set up an Express-based API wiring a Kysely DB client to a UserRepository, expose createUser routes with Zod request validation, and include a global errorHandler and test suite.