Create a complete NestJS module with schema, DTOs, controller, service following Annota patterns
Create a new NestJS module for the Annota API following the existing patterns.
Module name: $ARGUMENTS
Read existing modules for reference patterns:
apps/api/src/exam/ for schema, controller, service, DTOs structureapps/api/src/common/ for shared filters and pipeslibs/shared/src/index.ts and libs/shared/src/api-contracts.ts for shared typesCreate the module directory at apps/api/src/$ARGUMENTS/
Create these files following the exact patterns from existing modules:
$ARGUMENTS.schema.ts - Mongoose schema with @Schema() decorator, timestamps, toJSON virtuals$ARGUMENTS.module.ts - NestJS module with MongooseModule.forFeature$ARGUMENTS.service.ts - Service with constructor injecting @InjectModel$ARGUMENTS.controller.ts - Controller with @Controller('$ARGUMENTS') and standard CRUD endpointsdto/create-$ARGUMENTS.dto.tsdto/update-$ARGUMENTS.dto.ts - Update DTO extending PartialType(CreateDto)Register the module in apps/api/src/app.module.ts
Add shared types to libs/shared/src/index.ts and libs/shared/src/api-contracts.ts
@Prop() decorators from @nestjs/mongooseDocument, use SchemaFactory.createForClass()id field mapping _id in toJSON@IsString(), @IsNotEmpty(), @IsOptional() from class-validatorApiResponse<T> from shared lib.lean() for read queries