ποΈ Issue: User β Move DTOs into presentation layer and enforce validation
Description
The user module has DTOs outside of the presentation layer or mixed with domain code. To align with the architecture, DTOs (HTTP shapes + validation) should live under presentation/dto.
What is expected
- DTOs moved/created under
src/modules/user/presentation/dto/ (e.g., create-user.dto.ts, update-user.dto.ts).
- Use
class-validator/class-transformer for input validation.
- Controllers import these DTOs and apply the validation middleware.
What should be modified
- Create/move DTO files to
presentation/dto.
- Update controllers to use DTOs (no raw bodies).
- Remove duplicate/legacy DTO definitions elsewhere.
Tests
- Add/adjust tests to assert 400 on invalid payloads and success on valid ones.
Acceptance criteria
Rollback plan
- Keep pre-change branch/tag.
- If breakages occur, reintroduce DTOs gradually (endpoint by endpoint).
ποΈ Issue: User β Move DTOs into
presentationlayer and enforce validationDescription
The user module has DTOs outside of the
presentationlayer or mixed with domain code. To align with the architecture, DTOs (HTTP shapes + validation) should live underpresentation/dto.What is expected
src/modules/user/presentation/dto/(e.g.,create-user.dto.ts,update-user.dto.ts).class-validator/class-transformerfor input validation.What should be modified
presentation/dto.Tests
Acceptance criteria
presentation/dto.Rollback plan