Commit Graph

2 Commits

Author SHA1 Message Date
b460d8df39 refactor: Remove Base64String value object per YAGNI principle
Remove unnecessary Base64String value object:

  - Performance overhead (validation runs twice: value object + FluentValidation)

  - Unnecessary abstraction (Convert.FromBase64String already validates)

  - YAGNI principle: use string directly + extension methods if needed

Replaced with:

  - Direct string usage in DTOs

  - FluentValidation for Base64 format validation

  - FormatException handling in ExceptionHandlingMiddleware (maps to 400)

Result: Simpler code, better performance, same validation coverage
2026-07-07 19:00:43 +02:00
OlgunR
3a87ace144 Complete Phase 2: Domain Layer implementation
Updated ROADMAP.md to mark Phase 2 as completed and added detailed descriptions of completed tasks. Introduced three new value objects (`Base64String`, `TenantId`, and `PdfMetadata`) in the `DocumentOperator.Domain.Models.ValueObjects` namespace. These classes ensure type safety, immutability, and encapsulated validation.

- `Base64String`: Handles Base64 string creation, validation, and conversion.
- `TenantId`: Represents a tenant identifier with validation and normalization.
- `PdfMetadata`: Represents PDF metadata with computed properties.

Updated `DocumentOperator.Domain.csproj` to reflect the addition of these value objects. The project is now ready to begin Phase 3 (Infrastructure Layer).
2026-06-18 14:32:06 +02:00