Generate NestJS modules with controllers, services, and dependency injection
Create a NestJS module for:
Module Name: {{MODULE_NAME}}
Features: {{FEATURES}}
Database ORM: {{ORM}} (TypeORM/Prisma/Mongoose)
Authentication: {{AUTH_NEEDED}} (yes/no)
Generate complete NestJS structure:
1. **Module (module.ts):**
- Module decorator configuration
- Imports array
- Controllers registration
- Providers registration
- Exports configuration
2. **Controller (controller.ts):**
- Route decorators
- HTTP method handlers
- Parameter decorators
- Response decorators
- Guards application
- Interceptors usage
- Swagger documentation
3. **Service (service.ts):**
- Injectable decorator
- Constructor injection
- Business logic methods
- Transaction handling
- Error handling
4. **DTOs (dto/):**
- Request DTOs
- Response DTOs
- Validation decorators
- Transformation decorators
- Swagger decorators
5. **Entities (entities/):**
- TypeORM/Prisma models
- Relationships
- Indexes
- Hooks/subscribers
6. **Guards (guards/):**
- Authentication guard
- Authorization guard
- Custom guards
7. **Interceptors (interceptors/):**
- Transform interceptor
- Logging interceptor
- Cache interceptor
8. **Pipes (pipes/):**
- Validation pipe
- Transform pipe
- Custom pipes
9. **Tests:**
- Unit tests with mocks
- e2e tests
- Test utilities
Include OpenAPI/Swagger documentation setup.Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{MODULE_NAME][{FEATURES][{ORM][{AUTH_NEEDED]