Commit Graph

9 Commits

Author SHA1 Message Date
0e88b349d7 Rebrand project: DocumentOperator to DocumentService
This commit implements a complete rebranding of the project:
- Updated all namespaces from `DocumentOperator` to `DocumentService`.
- Renamed file paths, embedded resources, and test data references.
- Updated configuration keys, logging paths, and Redis instance names.
- Revised documentation to reflect the new project name.
- Modified project and solution files to align with the new structure.
- Updated class names, DTOs, commands, queries, and handlers.
- Adjusted middleware, controllers, and API endpoints.
- Updated Swagger metadata and API titles to `DocumentService API`.
- Refactored test namespaces, resource paths, and embedded resources.
- Updated build and deployment configurations for the new name.
- Replaced all references to `DocumentOperator` in comments and literals.

These changes ensure consistency across the codebase and documentation.
2026-07-30 14:02:56 +02:00
94123cd1be Add ZUGFeRD detection and extraction functionality
Introduced `ZugferdController` to handle ZUGFeRD-related operations, including detection and extraction of ZUGFeRD XML from PDFs via file upload or Base64-encoded payloads. Integrated `MediatR` for query/command handling.

Added `ZugferdSettings` for configurable file names and patterns, and updated `appsettings.json` and `Program.cs` to support this configuration.

Implemented `HasZugferdQuery` and `ExtractZugferdCommand` with their respective handlers and validators. Added DTOs (`ZugferdCheckResult`, `ZugferdExtractionResult`) for operation results.

Included `ZUGFeRD-Example.pdf` for testing and integrated `Serilog.Ui.Core.Extensions` for logging.
2026-07-30 10:16:43 +02:00
080c2ac2a0 refactor(api): Pass IConfiguration to AddApplication
- Update AddApplication call with builder.Configuration parameter
- Required for license key reading from appsettings.json
2026-07-21 16:52:32 +02:00
2804993ea6 feat(api): Enable conditional Swagger/Scalar in production
Program.cs changes:
- Add Scalar.AspNetCore using
- Register SwaggerSettings with Options Pattern
- Pass IConfiguration to AddSwaggerDocumentation()
- Conditional middleware: Development OR EnableInProduction=true
- Add Swagger UI with custom endpoint configuration
- Add Scalar UI at /scalar/v1 (DeepSpace theme, C# HttpClient target)

Access URLs:
- Swagger UI: https://localhost:7186/swagger
- Scalar UI: https://localhost:7186/scalar/v1
- Serilog UI: https://localhost:7186/serilog-ui

Production behavior: Swagger+Scalar enabled by default (configurable)
2026-07-21 15:01:56 +02:00
536413bafe feat(logging): Configure Serilog SQLite sink + UI
appsettings.json:
- Add Application:LogDirectory configuration
- Add Serilog WriteTo.SQLite sink (logs.db in LogDirectory)
- Logs table with UTC timestamps

Program.cs:
- Add Serilog.UI usings
- Configure Serilog.UI with SQLite provider
- Mount UI at /serilog-ui endpoint

Web-based log viewer accessible at: https://localhost:7186/serilog-ui
2026-07-21 14:39:32 +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
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
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
4d427c10fe Add project files. 2026-06-12 13:38:48 +02:00