What problem does it solve?
This skill captures and enforces consistent API structure and best practices to prevent business logic sprawl, inconsistent error handling, and unvalidated inputs in Next.js App Router backends so teams deliver reliable, maintainable endpoints.
Core Features & Use Cases
- Clear Layering: Enforces Route → Controller → Service → Repository to separate concerns and simplify testing.
- Validation & DTOs: Mandates use of DTOs and Zod validation to reduce runtime errors and improve input safety.
- Standardized Responses: Defines predictable success payloads and mapped error responses for client stability.
- Use Case: Implement a totem check-in API that validates attendee payloads, centralizes business rules in services, and confines Prisma access to repositories.
Quick Start
Design a Next.js App Router endpoint that follows Route → Controller → Service → Repository, uses DTOs and Zod for validation, returns standardized success and error responses, and keeps Prisma queries inside repositories.