Commit Graph

50 Commits

Author SHA1 Message Date
dc0af68d26 docs: Update API specification based on Marvin/Marlon feedback
CONTROLLER_ENDPOINTS.md changes:

  - Binary stream output for all operations (NO outputPath, NO base64)

  - PDF Operations: merge, stamp, annotate → return application/pdf stream

  - PDF Conversion: to-pdfa, from-pdfa → return application/pdf stream

  - Attachment Extraction: extract → return application/zip stream

  - Add Attachment endpoint (Phase 2): embed files in PDF/PDF/A-3

  - Swiss QR Code endpoint documented (already implemented)

  - PdfRenderController REMOVED (moved to .NET client library)

AGENTS.md changes:

  - Current Status: SwissQrCodeController  DONE (2 tests)

  - Current Status: PdfValidationController  Partial (4 tests)

  - Phase reorganization:

    - Phase 1: validate, validate-pdfa, check, extract (SwissQR), extract (attachments), merge

    - Phase 2: stamp, annotate, add-attachment

    - Phase 3: to-pdfa, from-pdfa

  - Removed PdfRenderController from all phases

Design decisions (team consensus):

  - Server endpoints stay granular (validate, check, extract separate)

  - Combined operations (validateANDextract) → .NET client library

  - Binary streams avoid filesystem dependencies

  - No base64 overhead (~33%), client library handles conversions

Result: Clean API spec, memory-based operations, client convenience layer
2026-07-08 15:46:10 +02:00
45bc90b8b8 test: Update integration tests for Controller-based API
Integration test updates:

  - PdfValidationControllerTests.cs (new)

    - Test /api/pdf/validation/validate endpoint

    - Test BOTH multipart/form-data AND Base64 JSON

  - ExtractSwissQrCodeEndpointTests.cs (updated)

    - Update endpoint path to /api/swissqrcode/extract

    - Test BOTH input formats

Unit test updates:

  - ValidatePdfHandlerTests.cs:

    - Update for Query + Handler co-location

    - Test AutoMapper integration

  - ExtractSwissQrCodeHandlerTests.cs:

    - Update for Query + Handler co-location

    - Test AutoMapper integration

Deleted:

  - DocumentEndpointsTests.cs (Minimal API tests, no longer relevant)

Result: 20/20 tests passing, Controller endpoint coverage
2026-07-07 19:01:35 +02:00
57e36fc004 refactor: Migrate from Minimal API to Controller-based API
Architecture decision change:

  - Previous: Minimal API (DocumentEndpoints.cs) - WRONG approach

  - Required: Controller-based API (per CONTROLLER_ENDPOINTS.md)

New controllers:

  - PdfValidationController:

    - POST /api/pdf/validation/validate

    - Accepts BOTH IFormFile (multipart) AND Base64 JSON

    - Returns PdfValidationResult

  - SwissQrCodeController:

    - POST /api/swissqrcode/extract

    - Accepts BOTH IFormFile (multipart) AND Base64 JSON

    - Returns SwissQrCodeExtractionResult

Controller best practices:

  - Primary constructors (C# 12)

  - Thin controllers (pass request to MediatR directly)

  - No manual mapping (AutoMapper handles domain -> DTO)

  - XML documentation for Swagger

  - [ProducesResponseType] attributes

Deleted:

  - API/Endpoints/v1/DocumentEndpoints.cs (Minimal API)

  - ROADMAP.md (conflicting guidance with CONTROLLER_ENDPOINTS.md)

Result: Controller-based API, dual input support (multipart + JSON)
2026-07-07 19:01:20 +02:00
d6e3a5fda1 refactor: Restructure Application layer with vertical slices and AutoMapper
Vertical slice architecture:

  - Move Features/Documents/{UseCase}/ to {UseCase}/Queries/

  - Query + Handler in SAME file (co-located)

  - Validator in separate file (single responsibility)

New structure:

  - ValidatePdf/Queries/ValidatePdfQuery.cs (Query + Handler)

  - ValidatePdf/Queries/ValidatePdfQueryValidator.cs

  - SwissQrCode/Queries/ExtractSwissQrCodeQuery.cs (Query + Handler)

  - SwissQrCode/Queries/ExtractSwissQrCodeQueryValidator.cs

AutoMapper integration:

  - Add Common/Mapping/MappingProfile.cs

  - Map PdfMetadata -> PdfValidationResult (domain -> DTO)

  - Map SwissQrCodeData -> SwissQrCodeExtractionResult (domain -> DTO)

  - Controllers now thin: pass request to MediatR, AutoMapper handles mapping

DTO improvements:

  - Rename: ValidatePdfResponse -> PdfValidationResult (business-friendly)

  - Rename: ExtractSwissQrCodeResponse -> SwissQrCodeExtractionResult

  - Support BOTH byte[] and Base64Pdf string (XOR validation)

  - Use modern C# 12 collection expressions

Code quality:

  - Use PascalCase for primary constructor parameters

  - Fix LoggingBehavior logging format

Deleted old structure:

  - Features/Documents/ValidatePdf/ (old horizontal structure)

  - Features/Documents/ExtractSwissQrCode/ (old horizontal structure)

  - Common/DTOs/{Request|Response} (replaced with {Result})

Result: Vertical slices, AutoMapper v16.2.0, thin controllers
2026-07-07 19:01:05 +02:00
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
398651964e chore: Upgrade AutoMapper to v16.2.0 and fix DI registration
- Upgrade AutoMapper from 12.0.1 to 16.2.0

- Remove deprecated AutoMapper.Extensions.Microsoft.DependencyInjection v12.0.1

  (deprecated 25 May 2023, DI moved to main package in v13.0+)

- Update DI registration: AddAutoMapper(cfg => {}, typeof(MappingProfile))

  (v13.0+ requires Action<IMapperConfigurationExpression> + marker type)

Security fix:

  - Resolves NU1903 vulnerability (GHSA-rvv3-g6hj-g44x DoS in v12.0.1)

Result: AutoMapper v16.2.0, 0 security warnings, all tests passing
2026-07-07 19:00:29 +02:00
f8690b9417 docs: Add AGENTS.md architecture guidance for AI agents
Comprehensive architecture documentation including:

  - Clean Architecture with Controller-based API (NOT Minimal API)

  - Vertical slice architecture pattern

  - Exception-based error handling (no Result<T>)

  - Feature-driven development approach

  - Primary constructor coding standards

  - Git commit guidelines

  - Swiss QR Bill backward compatibility decisions

Key decisions documented:

  - Windows-only targeting (no Linux support needed)

  - Support BOTH multipart/form-data AND Base64 JSON

  - Separate endpoints for Combined Address (K-Type) legacy support

  - Multi-tenancy deferred until after all sync features complete
2026-07-07 19:00:12 +02:00
077eb1e017 docs: Add XML documentation comments to API layer
Add missing XML doc comments to resolve CS1591 warnings:

  - SerilogConfiguration: Class comment

  - SwaggerConfiguration: Class and AddSwaggerDocumentation() method

  - ExceptionHandlingMiddleware: Constructor and InvokeAsync() method

  - RequestLoggingMiddleware: Placeholder class comment

  - TenantResolutionMiddleware: Placeholder class comment

  - Program: Partial class comment for integration test access

Result: 0 CS1591 warnings in DocumentOperator.API project
2026-07-07 18:56:23 +02:00
8b154e7378 fix: Replace CreateBitmap with CreateDXBitmap for cross-platform compatibility
- Replace System.Drawing.Bitmap with DevExpress.Drawing.DXBitmap

- Fix CA1416 warnings (Windows-specific API usage)

- Fix CS0618 warning (TryInverted property moved to Options.TryInverted)

- Add [SupportedOSPlatform(windows)] attribute to DecodeQrCodeFromImage()

- Add Swiss QR Bill backward compatibility documentation

- Suppress CS0618 for AddressLine1/AddressLine2 (deprecated since Nov 2025)

- Use modern C# 12 collection expression syntax

Technical changes:

  - CreateBitmap() to CreateDXBitmap() (returns DXBitmap)

  - Convert DXBitmap to PNG stream to System.Drawing.Bitmap for ZXing

  - Add using DevExpress.Drawing and System.Runtime.Versioning

Result: 0 CA1416 warnings, 0 CS0618 warnings in DevExpressSwissQrCodeProcessor
2026-07-07 18:56:09 +02:00
a12d529d9e Add documentation for DocumentOperator service
Added `CONTROLLER_ENDPOINTS.md` to define REST API endpoints and
`REQUIRED_FEATURES.md` to outline required functions and features
for the `DocumentOperator` service. These documents include
detailed specifications for controllers, input/output formats,
usage scenarios, and technical requirements.

Updated `DocumentOperator.sln` to include the new documentation
files under a "Solution Items" section for better visibility.

Defined a prioritization strategy for feature implementation,
technical requirements, and a comprehensive test strategy.
Referenced relevant standards (e.g., PDF/A, ZUGFeRD) and
documented usage of the DevExpress Office File API.
2026-07-06 10:33:01 +02:00
OlgunR
d03806e622 It seems your list of code changes is empty. Could you provide the descriptions of the changes made to the files? Once you do, I can help craft a concise and comprehensive commit message for you! 2026-06-26 10:21:40 +02:00
OlgunR
84c0a54c1e Enhance ExtractSwissQrCode feature documentation
Updated `DocumentEndpoints` to include detailed requirements, return values, and use case for the `ExtractSwissQrCode` endpoint.

Marked Feature 2 (`ExtractSwissQrCode`) as completed in `PHASENPLAN.md` and `ROADMAP.md`, summarizing achievements and outlining next steps for Feature 3 (`ExtractAttachments`).

Enhanced `ExtractSwissQrCodeRequest` and `ExtractSwissQrCodeResponse` DTOs with example JSON payloads for clarity.

Expanded `SwissQrCodeDataDto` and `AddressDataDto` with detailed field-level documentation to improve usability and adherence to Swiss QR Bill Standard 2.0.
2026-06-26 08:58:25 +02:00
OlgunR
c5db216f15 Add Swiss QR Code extraction endpoint
Added a new `/extract-swiss-qr-code` endpoint to extract and parse Swiss QR Codes from the last page of a PDF document. Implemented the `ExtractSwissQrCode` handler method, along with helper methods to map domain value objects (`SwissQrCodeData` and `AddressData`) to DTOs.

Updated `ExceptionHandlingMiddleware` to handle the new `SwissQrCodeNotFoundException` with a 404 Not Found response.

Added integration tests in `ExtractSwissQrCodeEndpointTests` to validate the endpoint's behavior for valid requests, invalid Base64 input, empty references, and empty PDFs. Introduced a helper method to load embedded PDF resources as Base64 strings for testing.

Updated `using` directives to include necessary namespaces for the new feature and exception handling.
2026-06-26 08:50:07 +02:00
OlgunR
586fd4a207 Add Swiss QR Code extraction feature
Introduced DTOs for request and response to handle Swiss QR Code extraction from PDF documents. Implemented `ExtractSwissQrCodeHandler` to process the extraction using `ISwissQrCodeProcessor`. Added validation for the query with `ExtractSwissQrCodeValidator`. Developed unit tests to ensure correct behavior for successful and failure scenarios.
2026-06-26 08:46:42 +02:00
OlgunR
47cba50d0f Add ExtractSwissQrCode feature and update feature order
Updated PHASENPLAN.md and ROADMAP.md to reflect the new
feature order, making "ExtractSwissQrCode" Feature 2 and
renumbering previous Features 2-5 to 3-6. Added detailed
steps, endpoints, and acceptance criteria for the new
feature.

Implemented `ISwissQrCodeProcessor` interface with
`DevExpressSwissQrCodeProcessor` for extracting and parsing
Swiss QR Codes using DevExpress and Codecrete libraries.
Registered the new service in DependencyInjection.cs.

Introduced `SwissQrCodeData` value object and
`SwissQrCodeNotFoundException` for domain modeling and
error handling. Updated project dependencies to include
libraries for QR code processing.

Adjusted existing feature descriptions and steps to align
with the new feature order.
2026-06-26 08:39:44 +02:00
OlgunR
18e956c2cf Enhance PDF attachment detection and counting
Refactored `DevExpressPdfProcessor` to improve attachment detection:
- Changed `DetectEmbeddedFiles` return type to a tuple for better
  handling of attachment presence and count.
- Enhanced logic to parse `/Names` arrays and count object references
  for accurate attachment detection.
- Implemented robust search for `/EmbeddedFiles` to handle multiple
  occurrences and ensure proper context validation.

Updated PHASENPLAN.md and ROADMAP.md to reflect these changes, including
the addition of fixes for attachment detection and counting logic.

Added new tests in `DevExpressPdfProcessorTests`:
- Verified detection of multiple attachments and accurate counts.
- Ensured no crashes when processing PDFs with `/EmbeddedFiles`.

Included a new test resource (`pdfWithMoreThanOneAttachment.pdf`) for
validating multiple attachment scenarios.
2026-06-25 17:17:32 +02:00
OlgunR
1b38d5a729 Implement attachment detection in ValidatePDF
Updated PHASENPLAN.md and ROADMAP.md to reflect a complete restructuring of the development plan and added a "Bugfix: Attachment Detection" entry.

Implemented attachment detection in DevExpressPdfProcessor.cs using the new `DetectEmbeddedFiles` method, which scans raw PDF data for the `/EmbeddedFiles` keyword. Updated the `hasAttachments` property to use this method and set `attachmentCount` to `-1` when attachments are detected.

Added a new test, `ValidateAsync_PdfWithoutAttachments_ReturnsNoAttachments`, in DevExpressPdfProcessorTests.cs to verify that PDFs without attachments are correctly identified. Included a note about future testing for PDFs with attachments using ZUGFeRD files.

All related tests are passing (12/12 green).
2026-06-25 16:25:16 +02:00
OlgunR
930b76ecb5 Add ValidatePDF feature with API, Swagger, and tests
Implemented the ValidatePDF feature end-to-end:
- Added `/api/v1/documents/validate` Minimal API endpoint.
- Introduced centralized ExceptionHandlingMiddleware.
- Configured Swagger with `AddSwaggerDocumentation` extension.
- Enabled XML comments in `DocumentOperator.API.csproj`.
- Updated DTOs with XML comments and added `FileSizeMB`.
- Added integration tests for the ValidatePDF endpoint (3 tests).
- Registered infrastructure services (e.g., `IPdfProcessor`).
- Refactored `Program.cs` to include middleware and endpoints.
- Updated PHASENPLAN.md and ROADMAP.md to reflect progress.
- Cleaned up code and made `Program` accessible for tests.
2026-06-25 16:01:33 +02:00
OlgunR
afc0e34312 Complete Step 1.1: ValidatePDF Application Layer
Updated PHASENPLAN and ROADMAP to reflect progress on Feature 1 - ValidatePDF (75% complete). Marked Step 1.1 as completed, including MediatR setup, pipeline behaviors (`ValidationBehavior`, `LoggingBehavior`), ValidatePDF feature (Query, Handler, Validator), and DTOs.

Added `DependencyInjection.cs` for Application Layer DI configuration. Introduced `LoggingBehavior` and `ValidationBehavior` for MediatR pipelines. Implemented `ValidatePdfHandler`, `ValidatePdfQuery`, and `ValidatePdfValidator`.

Created DTOs (`ValidatePdfRequest`, `ValidatePdfResponse`) for the ValidatePDF feature. Added unit tests for `ValidatePdfHandler` to verify metadata handling and exception propagation.

Removed unused folder references in `DocumentOperator.Application.csproj`.
2026-06-25 15:23:58 +02:00
OlgunR
62c67d86d4 Refactor project docs for feature-driven development
Updated PROJECT_STATUS.md, ROADMAP.md, and PHASENPLAN.md to adopt a feature-driven development approach. Replaced the layer-by-layer methodology with a focus on delivering complete, testable features.

Key changes:
- PROJECT_STATUS.md: Added detailed status updates, milestones, and removed Azure dependencies in favor of local solutions (e.g., temp folders, in-memory queues).
- ROADMAP.md: Restructured tasks by feature (e.g., ValidatePDF, ExtractAttachments) with detailed steps and acceptance criteria. Introduced cross-cutting concerns like multi-tenancy and resilience.
- PHASENPLAN.md: Introduced a week-by-week breakdown, progress tracking, and next steps for each feature.

These changes improve clarity, align tasks with deliverables, and provide a clear roadmap for project completion.
2026-06-25 14:58:07 +02:00
OlgunR
91f479dd0a Update project status and add detailed roadmap
Updated `PROJECT_STATUS.md` to reflect the current progress, including updates to the project status, phase overview, and milestones. Added a new section summarizing completed milestones (Phases 1-2.5) and detailed progress for Phase 3.

Created `STATUS_UPDATE_17_01_2025.md` to document the latest project status, including the availability of the DevExpress Universal License, completed phases, and a step-by-step plan for the next sprint. Highlighted action items such as cleaning up the Application Layer and implementing the `DevExpressPdfProcessor` using TDD.

These changes ensure alignment between the roadmap and the actual project status while providing clear next steps for stakeholders.
2026-06-23 13:21:57 +02:00
OlgunR
5ac0777e5b Remove duplicate using directive in DevExpressPdfProcessor.cs
Eliminated a redundant `using DevExpress.Pdf;` statement to improve code readability and maintain cleaner imports. This change has no functional impact but enhances code clarity.
2026-06-23 13:09:58 +02:00
OlgunR
0c16294f79 Update ROADMAP.md: Phase 3 completion, Phase 4 start
Updated the ROADMAP.md file to reflect the completion of Phase 3 (Infrastructure Layer) and the transition to Phase 4 (Application Layer).

Marked Step 3.2 (DevExpressPdfProcessor implementation) as completed, including sub-steps such as creating tests, implementing the processor, and preparing for execution.

Added a new Phase 4 section detailing next steps, including MediatR setup. Removed references to incomplete Phase 3 steps, as they are now finished.

Highlighted a major update noting production-ready features and added architectural notes for multi-tenancy, async processing, file storage, and resilience using Polly.
2026-06-23 11:52:49 +02:00
OlgunR
1b39ec502b Update progress and details for Phase 3 completion
Updated project documentation to reflect the completion of the `DevExpressPdfProcessor` implementation in Phase 3. Adjusted progress in `PROJECT_STATUS.md` to 75% and updated the overall progress to ~28%.

Documented the successful execution of all six tests for `DevExpressPdfProcessor` and added implementation details, including the use of `PdfDocumentProcessor` from `DevExpress.Document.Processor` (v26.1.3), exception handling, and metadata extraction. Deferred attachment handling to Phase 6 due to API limitations.

Updated the "Last Updated" date in `PROJECT_STATUS.md` and `ROADMAP.md` to **17.01.2025** and adjusted the estimated time effort for the implementation to ~2 days.
2026-06-23 11:09:19 +02:00
OlgunR
b1d48418cf Migrate to DevExpress.Document.Processor library
Replaced `DevExpress.Pdf.Core` with `DevExpress.Document.Processor` in `DocumentOperator.Infrastructure.csproj` to adopt a newer library for PDF processing. Removed the `Services\PdfProcessing\` folder reference.

Updated `DevExpressPdfProcessorTests` to reflect changes in the `ValidateAsync` method's behavior.

Introduced the `DevExpressPdfProcessor` class, implementing the `IPdfProcessor` interface. This class validates PDF documents and extracts metadata using the `DevExpress.Pdf` library. Added defensive input validation, metadata extraction, and exception handling for domain consistency.
2026-06-23 10:33:43 +02:00
OlgunR
10cfb0c838 Refactor: Remove Azure dependencies, use local storage
Replaced Azure Blob Storage and Storage Queue with local
temp folders and an in-memory queue for file storage and
async processing. Updated `IFileStorage` and `IJobQueue`
interfaces to support the new architecture.

Modified `TenantSettings` and `ApplyStampHandler` to use
local file paths. Updated `JobProcessorService` to handle
in-memory queue jobs. Added file cleanup policies to
`LocalFileStorage`.

Revised roadmap and documentation to reflect the shift
to local-first architecture, emphasizing simplicity,
reduced cloud dependencies, and single-server readiness.
Logging now uses file-based storage instead of Application
Insights. Adjusted production deployment and health check
phases to align with the new approach.
2026-06-22 14:14:57 +02:00
OlgunR
d50e30f7ac Update roadmap with production-ready architecture
The roadmap has been updated to reflect a shift towards a
scalable, resilient, and production-ready architecture. Key
changes include:

- Multi-tenancy with EF Core, SQLite, and Redis Cache.
- Async processing using Azure Storage Queue and workers.
- File storage abstraction with Azure Blob and local storage.
- Resilience with Polly (retry, circuit breaker, timeout).
- Early health checks for Kubernetes readiness/liveness.
- Enhanced logging with Correlation IDs, Seq, and App Insights.
- Expanded roadmap to 11 phases with new production features.
- Added Swagger updates for API-Key auth and response examples.
- Introduced EF Core tenant management with CRUD operations.
- Added background services for async jobs and temp cleanup.
- Updated testing strategy for resilience and async processing.
- Documented 11 key learnings and updated best practices.
2026-06-22 13:35:48 +02:00
OlgunR
64be11f7ad Add tests for DevExpressPdfProcessor and roadmap updates
Updated ROADMAP.md to reflect progress on the TDD process for
DevExpressPdfProcessor, including the creation of unit tests
(6 tests in the Red Phase). Updated progress to 4/7 mini-steps
completed and outlined the next step (Green Phase).

Added `DevExpressPdfProcessorTests.cs` with unit tests to
validate PDF files and extract metadata. Tests cover valid
PDFs, null/empty inputs, corrupted PDFs, and file size
calculations. Used `FluentAssertions` for assertions.

Cleaned up `DocumentOperator.Tests.csproj` by removing an
unused folder reference. No functional changes to the project
structure.
2026-06-19 14:38:12 +02:00
OlgunR
b88f011701 It seems your list of code changes is empty. Could you provide the descriptions of the changes made to the files? Once you do, I can help craft a concise and comprehensive commit message for you! 2026-06-19 12:54:15 +02:00
OlgunR
b8c9e1b6a6 Update ROADMAP and test structure for DevExpressPdfProcessor
Updated ROADMAP.md to reflect progress on Phase 3, Step 3.2:
- Created test folder structure under Unit/Infrastructure/Services/PdfProcessing.
- Updated progress status to 2/7 mini-steps completed.
- Documented next step (adding a test PDF file) and marked DevExpressPdfProcessor.cs implementation as "IN PROGRESS."
- Highlighted availability of the DevExpress Universal License.

Modified DocumentOperator.Tests.csproj:
- Added the new test folder structure to the project file.
2026-06-19 12:44:29 +02:00
OlgunR
09cc64eff0 Refactor: Remove ProcessDocument and update roadmap
Removed the obsolete `ProcessDocument` folder and its files
(`ProcessDocumentCommand.cs`, `ProcessDocumentHandler.cs`,
`ProcessDocumentValidator.cs`) as part of Application Layer
cleanup. Updated `ROADMAP.md` to reflect progress, including
the start of `DevExpressPdfProcessor` implementation (Step 3.2)
and actionable steps for creating a test folder structure.
Documented the availability of the `DevExpress Universal License`.
2026-06-19 11:36:16 +02:00
OlgunR
867e0b2655 Remove unused UnitTest1 class and empty test method
The `UnitTest1` class in the `DocumentOperator.Tests` namespace was removed, including the `Test1` method, which was an empty test marked with the `[Fact]` attribute. This cleanup suggests the test class is no longer needed or has been replaced by other tests.
2026-06-19 11:08:53 +02:00
OlgunR
fc79665241 Update ROADMAP and add STATUS_UPDATE for project status
Extensively updated `ROADMAP.md` to reflect the current
project status, including documentation of the DevExpress
Universal License, completion of Phases 1 and 2, and
progress in Phase 3. Clarified discrepancies in the
Application Layer and identified gaps in the Tests Layer
and Infrastructure Services.

Created `STATUS_UPDATE_17_01_2025.md` to summarize the
current status, key learnings, and next steps. Outlined
a TDD-driven approach for implementing the
`DevExpressPdfProcessor` and cleaning up the Application
Layer. Confirmed build success and updated documentation
to align with the latest roadmap.
2026-06-19 11:08:36 +02:00
OlgunR
196f6d9cfb Update test project dependencies and add project references
Updated `Microsoft.NET.Test.Sdk` to version 17.11.1 and `xunit` to version 2.9.3. Updated `xunit.runner.visualstudio` to version 2.8.2 with additional metadata for asset inclusion and private asset behavior.

Added new dependencies: `FluentAssertions` (7.0.0) and `Moq` (4.20.72).

Introduced project references to `DocumentOperator.Domain`, `DocumentOperator.Application`, and `DocumentOperator.Infrastructure` to the test project.

No changes were made to the `coverlet.collector` dependency or the `<Using Include="Xunit" />` directive.
2026-06-18 16:35:56 +02:00
OlgunR
498b6758bf Add DocumentOperator.Tests project for unit testing
Added a new test project, `DocumentOperator.Tests`, to the solution targeting .NET 8.0. Configured the project as a non-packable test project with support for nullable reference types and implicit usings. Included dependencies for `xunit`, `Microsoft.NET.Test.Sdk`, and `coverlet.collector` for testing and code coverage.

Added a placeholder test class, `UnitTest1`, with a single test method, `Test1`, marked with the `[Fact]` attribute.
2026-06-18 16:23:41 +02:00
OlgunR
49d1f43822 Add IPdfProcessor interface and update ROADMAP.md
The `IPdfProcessor` interface was added to the `Application/Common/Interfaces/` directory. It includes the `ValidateAsync` method for validating PDFs and extracting metadata, with proper XML documentation and dependency on domain value objects.

Updated `ROADMAP.md` to mark Step 3.1 as completed, detailing the creation of the `IPdfProcessor` interface and its implementation status.

Removed the `<Folder Include="Common\Interfaces\" />` entry from `DocumentOperator.Application.csproj` to reflect the transition from a placeholder folder structure to actual implementation.
2026-06-18 16:02:32 +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
OlgunR
cdb942210c Complete Step 2.2: Add enums for business concepts
Updated ROADMAP.md to mark Step 2.2 ("Enums erstellen") as completed, documenting the creation of `DocumentOperationType` and `ProcessingStatus` enums.

Added `DocumentOperationType` and `ProcessingStatus` enums under the `DocumentOperator.Domain.Models.Enums` namespace to represent document operations and processing statuses, respectively.

Modified `DocumentOperator.Domain.csproj` to remove the `Models\Enums\` folder from the `<ItemGroup>` section, reflecting changes in the inclusion strategy for enums.
2026-06-17 16:43:03 +02:00
OlgunR
9512913866 Refactor ROADMAP.md for pragmatic TDD approach
The roadmap document was restructured to reflect a pragmatic, iterative, and test-driven development (TDD) approach. Key updates include:

- Title updated to "Pragmatic Edition" with revised last updated date.
- Table of contents reorganized with new sections (e.g., "Development Philosophy," "Testing Strategy").
- Expanded "Core Features" and "Business Workflow" sections with additional details and updated flow diagrams.
- Revised "Architecture & Design Decisions" to emphasize minimal domain layers, dependency rules, and vertical slice architecture.
- Updated "CQRS with MediatR" and "Minimal APIs" sections with examples and best practices.
- Added "Development Philosophy," "Testing Strategy," and "Key Learnings & Decisions" sections.
- Updated "Technology Stack" to include testing libraries and remove unused dependencies.
- Reflected new folder structure, including a `Tests` project for unit and integration tests.
- Rewrote "Development Roadmap" with detailed steps for each phase, focusing on TDD and outside-in development.
- Updated "References & Best Practices" and "Update Log" to align with the new approach.

These changes aim to improve clarity, maintainability, and alignment with modern .NET practices.
2026-06-17 16:23:13 +02:00
OlgunR
758d32d8e0 Update ROADMAP.md with detailed project roadmap
- Added "Last Updated" timestamp, current status, and phase.
- Introduced a "TABLE OF CONTENTS" for easier navigation.
- Expanded "PROJECT OVERVIEW" with vision, purpose, and workflow.
- Detailed "ARCHITECTURE & DESIGN DECISIONS" with key patterns.
- Listed frameworks, libraries, and components in "TECH STACK."
- Provided a breakdown of the solution's folder structure.
- Outlined development phases in "DEVELOPMENT ROADMAP."
- Documented progress in "CURRENT STATUS" and added "UPDATE LOG."
- Included "LEARNING NOTES" and references to best practices.
- Improved formatting for clarity and readability.
2026-06-17 15:12:44 +02:00
OlgunR
d7c416256c Add domain exceptions and update project structure
Implemented a structured exception-handling mechanism in the
domain layer with the addition of `DomainException`,
`DomainValidationException`, `NotFoundException`, and
`PdfProcessingException` classes. These exceptions provide
specific error handling for domain logic and integrate with
centralized middleware.

Updated `ROADMAP.md` to mark Step 2.1 (Domain Exceptions) as
completed and Step 2.2 (Value Objects) as the next task.
Added timeline entries to reflect progress.

Cleaned up `DocumentOperator.Domain.csproj` by removing
unused folder inclusions, indicating a project structure
reorganization.
2026-06-16 16:38:19 +02:00
OlgunR
5d3ec27128 Enhance ROADMAP.md structure and readability
- Updated section headers with emojis for better navigation.
- Added "Last Updated" date and project status to the header.
- Corrected German umlauts and special characters for encoding.
- Improved formatting of "TABLE OF CONTENTS" and "PROJECT OVERVIEW."
- Replaced ASCII diagrams with modern box-based structures.
- Clarified dependency rules and workflow diagrams with arrows (→).
- Highlighted benefits using checkmarks () for key sections.
- Removed Ardalis.Result and marked it with  in "TECHNOLOGY STACK."
- Enhanced "DEVELOPMENT ROADMAP" with emoji-based phase statuses.
- Improved overall consistency, clarity, and visual appeal.
2026-06-16 14:54:25 +02:00
OlgunR
d5fc0c2e51 Add detailed project roadmap for DocumentOperator
Introduced a comprehensive roadmap in `ROADMAP.md` to outline
the vision, purpose, and development phases of the
`DocumentOperator` service. Key additions include:

- Table of contents for navigation.
- Project overview with problem statement, solution, and core
  features.
- Business workflow description for API operations.
- Architecture and design decisions:
  - Clean Architecture principles and dependency rules.
  - CQRS with MediatR and Vertical Slice Architecture.
  - Exception-based error handling and Minimal APIs.
- Multi-tenancy strategy using API keys.
- Technology stack and detailed project structure.
- Development roadmap with nine phases, highlighting current
  progress (Phase 1 completed, Phase 2 in progress).
- Learning notes, references, and an update log.

The roadmap serves as a living document to guide development
and ensure alignment on goals and strategies.
2026-06-16 14:26:44 +02:00
OlgunR
7272b26105 Remove Ardalis.Result package dependency
The `<PackageReference Include="Ardalis.Result" Version="10.1.0" />` was removed from the `DocumentOperator.Application.csproj` file. This indicates that the project no longer relies on the `Ardalis.Result` library. Other package references remain unchanged.
2026-06-16 13:56:56 +02:00
OlgunR
d8f3143c8a Integrate Serilog and add configuration classes
Enhanced logging with Serilog, including request logging and
structured exception handling during startup. Added support
for the Options Pattern with new configuration classes:
`DocumentOperatorSettings`, `RedisSettings`, and
`ApiKeySettings`. Introduced `TenantInfo` class for tenant
management. Updated project files to include new dependencies
and removed unused `Configuration` folder reference.
2026-06-16 11:21:03 +02:00
OlgunR
87d7262d0a Replace Logging with Serilog; add new configurations
Replaced the `Logging` configuration in both `appsettings.json`
and `appsettings.Development.json` with Serilog, enabling
structured logging with configurable sinks and enrichment.

Added `DocumentOperatorSettings` to manage temporary files
and logging details. Introduced `RedisSettings` for Redis
integration, including connection string and cache settings.

Added `ApiKeySettings` to support tenant-specific API key
validation with detailed configuration for each tenant.

These changes improve logging, caching, and configuration
management for better maintainability and extensibility.
2026-06-16 09:28:39 +02:00
OlgunR
297f760e7f Refactor project structure and add new features
Restructured project files across all layers:
- Removed `Controllers` folder reference from `DocumentOperator.API.csproj`.
- Added folder structure to `DocumentOperator.Application`, `DocumentOperator.Domain`, and `DocumentOperator.Infrastructure` projects for better organization.

Introduced new API configurations and middleware:
- Added `SerilogConfiguration` and `SwaggerConfiguration` classes.
- Added `ExceptionHandlingMiddleware`, `RequestLoggingMiddleware`, and `TenantResolutionMiddleware`.

Implemented new document processing feature:
- Added `ProcessDocumentCommand`, `ProcessDocumentHandler`, and `ProcessDocumentValidator` classes in the application layer.
2026-06-15 16:21:43 +02:00
OlgunR
b25d593771 Add dependencies for API, Application, and Infrastructure
Added `Asp.Versioning.Http`, `Microsoft.Extensions.Caching.StackExchangeRedis`, and `Serilog.AspNetCore` to `DocumentOperator.API` for API versioning, Redis caching, and structured logging.

Added `Ardalis.Result`, `FluentValidation`, `FluentValidation.DependencyInjectionExtensions`, and `MediatR` to `DocumentOperator.Application` for result handling, validation, and mediator pattern support.

Added `DevExpress.Pdf.Core` and `Microsoft.Extensions.Options.ConfigurationExtensions` to `DocumentOperator.Infrastructure` for PDF processing and configuration management.
2026-06-15 11:00:22 +02:00
OlgunR
4d427c10fe Add project files. 2026-06-12 13:38:48 +02:00
OlgunR
456c03c179 Add .gitattributes and .gitignore. 2026-06-12 13:38:44 +02:00