What problem does it solves?
Inconsistent API design and implementation can lead to confusion for frontend developers, security vulnerabilities, and difficult maintenance. This Skill standardizes API development with NestJS, ensuring clarity, security, and scalability.
Core Features & Use Cases
- Layered Architecture: Implement controllers, use cases, and repositories for clear separation of concerns, making the API logic easy to understand and maintain.
- Swagger Documentation: Automatically generate and maintain comprehensive API documentation using
@nestjs/swagger, simplifying integration for consumers.
- Authentication & Authorization: Secure endpoints with route guards and custom decorators (e.g.,
@Public, @MemberRoles), ensuring proper access control.
- Use Case: When creating a new API endpoint for fetching articles, ensure it uses the correct
@Get decorator, integrates with a GetArticlesQuery, and is documented with @ApiTags and @Swagger.getItems for clear API contract.
Quick Start
Help me create a new NestJS controller for managing 'Comments', including a @Post endpoint to create a comment and a @Get endpoint to retrieve comments, with basic Swagger documentation.