What problem does it solve?
This Skill streamlines the creation of robust Next.js API routes by providing a standardized template that incorporates essential features like authentication, authorization, input validation, and database operations.
Core Features & Use Cases
- Standardized API Endpoints: Generates
GET, POST, PATCH, and DELETE handlers for resource management.
- Integrated Auth & RBAC: Seamlessly integrates with Better Auth for authentication and role-based access control.
- Input Validation: Utilizes Zod for robust request body and query parameter validation.
- Drizzle ORM Support: Includes patterns for performing type-safe database operations with Drizzle ORM.
- Use Case: Quickly scaffold a new API endpoint for managing user profiles, ensuring secure access and data integrity from the outset.
Quick Start
Generate a new API route for managing 'products' in the 'src/app/api/products/' directory.