phongnguyend/Practical.CleanArchitecture
38.2
Weak · 22 October 2026
62.7k
lines of production code
C#
with TypeScript, JavaScript
3
measurements over time
What this system is
ClassifiedAds is a .NET 10-based enterprise application framework that supports both Microservices and Modular Monolith architectures. It provides core domain capabilities for Identity, Audit Logging, Configuration, Notifications, Products, and Storage, implemented with CQRS, outbox patterns, and pluggable infrastructure for messaging, caching, and file storage. The system includes comprehensive tooling for local development, observability, and deployment to Azure, alongside an Angular frontend and extensive test coverage.
How it got here
2020 — Microservices architecture and .NET 10 migration
79 changes.
The project underwent a comprehensive migration to .NET 10 and restructured into a microservices architecture, introducing new domain models, a unified command/query dispatcher, and pluggable infrastructure for storage, notifications, and monitoring. This period established the foundational scaffolding for individual microservices like Identity, AuditLog, and Notification, while simultaneously refactoring the modular monolith to support the new distributed patterns and tooling.
2021–2023 — Domain modeling and infrastructure hardening
52 changes.
This period focused on establishing explicit data models and mapping logic across the Identity, Product, Storage, and Notification modules to decouple domain entities from API contracts. It also introduced critical infrastructure capabilities, including distributed locking, outbox patterns for reliable event publishing, and OpenTelemetry-based observability, while standardizing configuration options and authorization policies across the codebase.
2024–2026 — Infrastructure and persistence modernization
39 changes.
This period focused on establishing a robust, multi-provider infrastructure for the ClassifiedAds application, introducing Azure deployment templates via Bicep and Terraform, and implementing .NET Aspire for local orchestration. Significant effort was dedicated to standardizing the data layer across both modular monolith and microservice architectures by adopting SQL Server persistence, the outbox pattern for reliable messaging, and explicit database configurations. The work also included modernizing the application layer with minimal APIs, enhancing observability through distributed tracing, and adding comprehensive features like CSV/HTML/PDF exports and background notification workers.
Features
Add Aspire App Host for local development orchestration
Developers can now launch the entire ClassifiedAds solution as a single distributed application using .NET Aspire. This new App Host project orchestrates the Migrator, Background, and WebAPI services, while also managing the IdentityServer executable and its migrator. It provides a unified dashboard for monitoring health and logs, simplifying local development and debugging of the multi-service architecture.
src/ModularMonolith/ClassifiedAds.AspireAppHost · high confidence
Add Aspire App Host for local microservice orchestration
A new Aspire App Host project has been added to the solution to simplify local development and testing of the microservices architecture. This host orchestrates the launch of key services, including Audit Log, Configuration, Identity, Notification, Storage, and Product APIs, as well as the GraphQL and WebAPI gateways. It also manages the IdentityServer executable and its database migrator, while exposing an external Webhook service for integration testing. Developers can now start the entire distributed system with a single command, leveraging Aspire's built-in observability and resource discovery.
src/Microservices/AspireAppHost · high confidence
Add Bicep infrastructure-as-code for Azure deployment
Users can now deploy the ClassifiedAds application to Azure using Bicep templates. The new \main.bicep\ file defines the required infrastructure, including an App Service Plan, three App Services (Identity Server, Web API, and Web MVC) running on .NET 8.0, an Azure SQL Server with a Basic database, a Storage Account, and a Key Vault. A README provides instructions for installing the Bicep CLI, creating the resource group, deploying the resources, and cleaning up.
deployments/Azure/bicep · high confidence
Add CSV import and export handlers for products
The Product module now includes handlers to read and write product data to CSV files. Users can export existing products to CSV via the ExportProductsToCsv command and import products from CSV files via the ImportProductsFromCsv command, utilizing the CsvHelper library for serialization and deserialization.
src/ModularMonolith/ClassifiedAds.Modules.Product/Csv · high confidence
Add NotificationHub with SignalR authentication
A new NotificationHub class has been added to the Notification module, implementing a SignalR hub that requires authentication via the \[Authorize\] attribute. This enables authenticated real-time communication for the notification service.
src/ModularMonolith/ClassifiedAds.Modules.Notification/Hubs · high confidence
Add OpenTelemetry integration with Azure Monitor and OTLP support
The ClassifiedAds infrastructure now includes a new OpenTelemetry monitoring module that enables distributed tracing and metrics collection. Users can configure the service to export traces and metrics via OTLP endpoints or Azure Monitor, with options to enable specific instrumentation for ASP.NET Core, Entity Framework Core, HTTP clients, runtime, and process metrics.
src/Microservices/Common/ClassifiedAds.Infrastructure/Monitoring/OpenTelemetry · high confidence
Add SQL Server-based localization support
The application now supports loading localized strings from a SQL Server database instead of relying solely on embedded resource files. This change introduces a new infrastructure layer in the Localization module that registers a custom \IStringLocalizerFactory\ backed by SQL queries, with results cached in memory for a configurable duration. Users can enable this feature by configuring \SqlServerOptions\ (connection string, SQL query, cache time) via the \AddLocalization\ extension method, which also sets up request localization with default support for English (US) and Vietnamese (VN).
src/ModularMonolith/ClassifiedAds.Infrastructure/Localization · high confidence
Add SignalR-based web notification support
The application now supports real-time web notifications via SignalR. Users can configure the notification provider to use SignalR, which sends messages to a specified Hub endpoint using the MessagePack protocol. The system allows switching between a fake implementation (for testing) and the live SignalR provider through configuration options.
src/Microservices/Common/ClassifiedAds.Infrastructure/Notification/Web · high confidence
Add configuration entry and file upload models
The Configuration module now includes data models to support configuration management and file operations. A new \ConfigurationEntryModel\ represents individual configuration items, including fields for keys, values, descriptions, and sensitivity flags, accompanied by mapping logic to convert between entity and model representations. Additionally, an \UploadFileModel\ has been introduced to handle file uploads, likely supporting the import and export of CSV and Excel files mentioned in the commit history.
src/ModularMonolith/ClassifiedAds.Modules.Configuration/Models · high confidence
Add infrastructure health checks for HTTP, SQL Server, and storage/messaging services
The ClassifiedAds infrastructure layer now includes a set of health check implementations and extension methods, enabling users to verify the availability of HTTP endpoints, SQL Server databases, Amazon S3, Azure Blob Storage, Azure Service Bus, Kafka, RabbitMQ, and local file systems. This allows for more robust operational monitoring and automated recovery strategies by exposing the status of these critical dependencies.
src/Microservices/Common/ClassifiedAds.Infrastructure/HealthChecks · high confidence
Add runtime diagnostics endpoints for process, GC, and thread pool
New HTTP endpoints have been added to both the Microservices and Modular Monolith architectures to expose real-time runtime diagnostics. The \/processinfor\ endpoint returns process details including the user name, CPU time, and memory usage (private, virtual, and working set). The \/gcinfor\ endpoint provides garbage collector metrics such as generation collection counts, total pause duration, and heap statistics. The \/threadpoolinfor\ endpoint exposes thread pool configuration and status, including available, minimum, and maximum worker and completion port threads. These endpoints allow users to monitor system health and resource utilization directly via HTTP.
src/Microservices/Common/ClassifiedAds.Infrastructure/Web/Endpoints, src/ModularMonolith/ClassifiedAds.Infrastructure/Web/Endpoints · high confidence
Add support for Azure Communication Services as an SMS provider
The SMS notification infrastructure now supports sending messages via Azure Communication Services in addition to the existing Twilio and Fake providers. This change introduces the \AzureOptions\ configuration class and the \AzureSmsNotification\ implementation, which uses the \Azure.Communication.Sms\ SDK to send messages asynchronously. The \SmsNotificationServiceCollectionExtensions\ have been updated to register the Azure provider when the configuration specifies 'Azure', allowing users to switch their SMS backend to Azure without changing the core notification interface.
src/Microservices/Common/ClassifiedAds.Infrastructure/Notification/Sms · high confidence
Added Auth0 and Azure AD B2C identity provider implementations
The identity service and module now support external authentication via Auth0 and Azure Active Directory B2C. This change introduces the \IIdentityProvider\ interface and \IUser\ model, along with concrete implementations for both providers. The Auth0 provider manages user lifecycle operations (create, read, update, delete) and token acquisition using the Auth0 Management API, while the Azure AD B2C provider utilizes the Microsoft Graph SDK for user management. Configuration options for both providers (such as Client IDs, Secrets, and Tenant IDs) are now available to enable these external identity sources.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/IdentityProviders, src/ModularMonolith/ClassifiedAds.Modules.Identity/IdentityProviders · high confidence
Added CSV and Excel import/export interfaces
New interfaces for reading and writing CSV and Excel files have been introduced in the CrossCuttingConcerns module. This includes ICsvReader and ICsvWriter for CSV operations, as well as IExcelReader and IExcelWriter for Excel operations, enabling the application to import and export data in these formats.
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Excel · high confidence
Added CSV read/write interfaces
Introduced the ICsvReader and ICsvWriter interfaces within the ClassifiedAds.CrossCuttingConcerns.Csv namespace, enabling asynchronous reading and writing of CSV data via stream operations.
src/Microservices/Common/ClassifiedAds.CrossCuttingConcerns/Csv · high confidence
Added DateTimeProvider abstraction and DI registration
Introduced an IDateTimeProvider interface and its DateTimeProvider implementation in both the Microservices and ModularMonolith architectures, exposing Now, UtcNow, OffsetNow, and OffsetUtcNow properties. Added a DI extension method (AddDateTimeProvider) to register the provider as a singleton, enabling time abstraction for testing and consistency across the codebase.
(repo-wide) · high confidence
Added DebuggingHandler for HTTP request inspection
A new DebuggingHandler class has been added to the infrastructure layer, implementing DelegatingHandler to intercept and inspect HTTP requests and responses. This handler allows developers to log or debug outgoing HTTP traffic without altering the request flow, supporting better visibility into microservice communication.
src/Microservices/Common/ClassifiedAds.Infrastructure/HttpMessageHandlers, src/ModularMonolith/ClassifiedAds.Infrastructure/HttpMessageHandlers · high confidence
Added Identity module models and mapping configurations
The Identity module now includes explicit data models for Users, Roles, and password management, along with extension methods to map internal entities to these models. This introduces \UserModel\, \RoleModel\, and \SetPasswordModel\ classes, supported by \UserModelMappingConfiguration\ and \RoleModelMappingConfiguration\ to handle the conversion from the underlying \User\ and \Role\ entities, establishing a clear separation between internal domain entities and the models exposed by the module.
src/ModularMonolith/ClassifiedAds.Modules.Identity/Models · high confidence
Added Playwright-based end-to-end UI tests
The end-to-end UI test suite now includes a new Playwright implementation alongside the existing Selenium tests. This addition introduces a modern, async-based testing framework that automates the same user journey (login, consent, navigation, and logout) using Microsoft.Playwright, providing an alternative to the synchronous Selenium WebDriver approach for validating the application's UI.
src/EndToEndUiTests · high confidence
Added audit logging and database retry decorators
The application now includes two new decorator patterns for command and query handlers. The AuditLog decorators automatically serialize and log the JSON representation of incoming commands and queries to the console, providing visibility into application activity. The DatabaseRetry decorators wrap handler execution with a retry mechanism that automatically retries operations up to a configurable number of times when specific database connection errors (such as broken connections or establishment failures) occur, improving resilience against transient database issues.
src/Microservices/Common/ClassifiedAds.Application/Decorators, src/ModularMonolith/ClassifiedAds.Application/Decorators · high confidence
Added custom exception classes and a gRPC channel factory
The application now includes a NotFoundException and a ValidationException class within the cross-cutting concerns layer to handle specific error scenarios, with the latter providing a static helper method for validation checks. Additionally, a new ChannelFactory has been introduced in the infrastructure layer to create gRPC channels, currently configured to bypass server certificate validation for development purposes.
src/Microservices/Common/ClassifiedAds.CrossCuttingConcerns/Exceptions, src/Microservices/Common/ClassifiedAds.Infrastructure/Grpc · high confidence
Added distributed locking infrastructure
The system now includes a new cross-cutting concern for managing distributed locks, introducing interfaces for acquiring lock scopes (\IDistributedLock\, \IDistributedLockScope\) and managing entity-specific locks (\ILockManager\). This addition supports pessimistic locking patterns, allowing services to acquire, extend, and release locks on specific entities, along with a dedicated exception type (\CouldNotAcquireLockException\) for handling lock acquisition failures.
src/Microservices/Common/ClassifiedAds.CrossCuttingConcerns/Locks · high confidence
Added distributed tracing support via Activity extensions
The logging infrastructure now includes \ActivityExtensions\ in both the Microservices and Modular Monolith common libraries. These extensions provide helper methods to extract span IDs, trace IDs, and parent IDs from \System.Diagnostics.Activity\ objects, handling both W3C and Hierarchical ID formats, and allow for the creation of new activities with specified parent contexts. This enables consistent distributed tracing across the application's logging and message bus components.
src/Microservices/Common/ClassifiedAds.CrossCuttingConcerns/Logging, src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Logging · high confidence
Added domain event infrastructure for entity lifecycle tracking
The ClassifiedAds domain now includes a foundational set of domain events and handlers to support entity lifecycle management. New files introduce the \IDomainEvent\ marker interface and a generic \IDomainEventHandler\<T\>\ interface that supports asynchronous handling with cancellation tokens. Additionally, specific event classes (\EntityCreatedEvent\, \EntityUpdatedEvent\, and \EntityDeletedEvent\) have been added to capture entity creation, updates, and deletion, each storing the affected entity and the timestamp of the event.
src/Microservices/Common/ClassifiedAds.Domain/Events · high confidence
Added gRPC contract definitions for AuditLog, Identity, and Notification services
New Protocol Buffers (proto3) files have been added to the contracts repository to define the gRPC interfaces for core microservices. This includes the AuditLog service for retrieving and adding log entries, the Identity service for user retrieval, and the Notification service for sending email and SMS messages. These definitions establish the shared message schemas and service contracts required for inter-service communication.
src/Microservices/Contracts · high confidence
Added interfaces and DI registrations for HTML and PDF export capabilities
Introduced generic interfaces (IHtmlWriter, IPdfWriter) and their corresponding request markers to define contracts for exporting data to HTML and PDF formats. To support these exports, added dependency injection extensions that register the RazorLight engine for HTML generation and provide two alternative PDF conversion backends: DinkToPdf and PuppeteerSharp, allowing the application to choose its preferred PDF rendering strategy.
(repo-wide) · high confidence
Added permission constants for audit log, identity, configuration, and product modules
New static permission constants have been introduced across the audit log, identity, configuration, and product modules to define granular access rights. These constants, such as GetAuditLogs, GetRoles, GetConfigurationEntries, and GetProducts, provide a centralized source for authorization policies, enabling users to configure specific permissions for reading, adding, updating, and deleting resources within each respective module.
(repo-wide) · high confidence
Added placeholder password validators for historical and weak passwords
The Identity module now includes two new password validators, \HistoricalPasswordValidator\ and \WeakPasswordValidator\, which implement \IPasswordValidator\<User\>\. Currently, these act as stubs for testing: they reject passwords containing specific test strings (\testhistoricalpassword\ and \testweakpassword\) respectively, while allowing all others. The implementation includes TODOs indicating that full logic for checking password history and leaked/weak password databases is pending.
src/ModularMonolith/ClassifiedAds.Modules.Identity/PasswordValidators · high confidence
Added product query handlers for retrieving products, audit entries, and users
New query handlers have been added to the Product module to support fetching specific products, listing all products, retrieving audit log entries (including user details), and fetching user data. These handlers implement the IQueryHandler interface, integrate with the existing repository and service abstractions (ProductDbContext, IProductRepository, IUserService), and support cancellation tokens for asynchronous operations.
src/ModularMonolith/ClassifiedAds.Modules.Product/Queries · high confidence
Added solution files and Docker build scripts for AuditLog and Notification microservices
This change introduces the Visual Studio solution files and Docker build/run scripts for the AuditLog and Notification microservices. For the AuditLog service, the solution groups the API and gRPC projects, with Docker commands configured to expose the API on port 8080 and the gRPC service on port 8081. For the Notification service, the solution includes the API, Background, and gRPC projects, with Docker commands exposing the API on port 8080, the background worker on port 8081, and the gRPC service on port 8082. These files enable local containerized builds and execution of these specific service components.
src/Microservices/Services.AuditLog, src/Microservices/Services.Notification · high confidence
Adds infrastructure for intercepting service calls with logging and error handling
The application now supports intercepting service method calls via Castle DynamicProxy to provide cross-cutting concerns. This includes a LoggingInterceptor that records method entry, exit, and execution duration, and an ErrorCatchingInterceptor that logs unhandled exceptions along with method arguments (excluding CancellationToken) before re-throwing. These interceptors are registered via dependency injection and can be applied to specific service interfaces and implementations using the new AddInterceptors extension methods, allowing users to enable or disable logging and error catching behavior through InterceptorsOptions.
src/ModularMonolith/ClassifiedAds.Infrastructure/Interceptors · high confidence
Adds infrastructure for intercepting service methods with logging and error handling
The \ClassifiedAds.Infrastructure\ module now includes a new interceptor system that wraps service implementations with Castle DynamicProxy. This allows for automatic method logging (including execution time and arguments, excluding \CancellationToken\) and centralized error catching. The system is configured via \ServiceCollectionServiceExtensions\, which registers the interceptors and provides extension methods to apply them to specific service types, with options to enable or disable logging and error-catching behaviors independently.
src/Microservices/Common/ClassifiedAds.Infrastructure/Interceptors · high confidence
Adds utility extension methods for cloning, HTTP, and string parsing
This change introduces a new set of extension methods in the \ClassifiedAds.CrossCuttingConcerns.ExtensionMethods\ namespace to support common operations. Developers can now use \CloningExtensions\ for shallow and deep object cloning via \System.Text.Json\, and \ObjectExtensions\ for serializing objects to JSON while handling nulls and reference cycles. HTTP interactions are simplified with \HttpClientExtensions\ for Basic and Bearer authentication, and \HttpContentExtensions\ for reading/writing JSON content. Additionally, \StringExtensions\ provides parsing capabilities using the .NET 7 \IParsable\<T\>\ interface, along with utility methods for case-insensitive checks, base64 encoding, and string manipulation.
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/ExtensionMethods · high confidence
Amazon S3 file storage implementation with health checks and archival support
The application now supports storing files in Amazon S3 via a new \AmazonS3StorageManager\ that implements the \IFileStorageManager\ interface. This change introduces configuration options for AWS credentials, bucket name, region, and storage path, and provides asynchronous methods for creating, reading, deleting, and managing file lifecycle (archiving to Standard-Infrequent Access and unarchiving to Standard). Additionally, an \AmazonS3HealthCheck\ is included to verify connectivity and write permissions by uploading and deleting a temporary file.
src/Microservices/Common/ClassifiedAds.Infrastructure/Storages/Amazon · high confidence
Amazon S3 file storage with health checks and archive support
The application now supports storing files in Amazon S3. This change introduces configuration options for AWS credentials, bucket names, and regions, along with a storage manager that handles uploading, reading, and deleting files asynchronously. It also adds support for archiving and unarchiving files by changing their storage class, and includes a health check that verifies connectivity by uploading and deleting a temporary file.
src/ModularMonolith/ClassifiedAds.Infrastructure/Storages/Amazon · high confidence
Audit Log API initialization scaffolding
The Audit Log microservice API now includes the foundational files required to build, run, and configure the service. This includes a Dockerfile targeting .NET 10.0 for containerized deployment, a Program.cs implementing the ASP.NET Core 8+ minimal hosting model with JWT and OpenID Connect authentication, Swagger UI, rate limiting, and OpenTelemetry monitoring. Configuration is provided via appsettings.json and appsettings.Development.json, covering connection strings, messaging (RabbitMQ), and service endpoints. Helper scripts (PowerShell.txt, dotnet-cli.txt) are added to assist with Entity Framework Core database migrations.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog.Api · high confidence
Audit Log service initialization and configuration
The Audit Log microservice now registers its core infrastructure during startup. This includes configuring the SQL Server database context with optional command timeouts, setting up repository abstractions for audit entries and idempotent requests, and wiring up message bus consumers to handle audit log creation events. The service also integrates authorization policies and outbox message publishing to ensure reliable event processing.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog · high confidence
Audit log aggregation consumer with idempotency
The Audit Log service now includes a message bus consumer that processes AuditLogCreatedEvent messages. This consumer ensures that duplicate messages are ignored by checking an idempotency repository before persisting the audit log entry, preventing duplicate records in the event of message retries.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog/MessageBusConsumers · high confidence
Background service for synchronizing users
A new background service, SyncUsersWorker, has been added to the Identity module. This service runs continuously to synchronize users by dispatching a SyncUsersCommand via the application's dispatcher. It includes logic to pause for 10 seconds if no users were synced in a cycle and properly respects cancellation tokens for graceful shutdown.
src/ModularMonolith/ClassifiedAds.Modules.Identity/HostedServices · high confidence
Background services for email and SMS notifications
Added SendEmailWorker and SendSmsWorker hosted services that run as background tasks to periodically dispatch email and SMS messages. These workers use a polling loop with a 10-second delay when no messages are pending, respect cancellation tokens for graceful shutdown, and leverage the command dispatcher to process SendEmailMessagesCommand and SendSmsMessagesCommand within scoped service containers.
src/ModularMonolith/ClassifiedAds.Modules.Notification/HostedServices · high confidence
Background user synchronization service added
A new background worker (SyncUsersWorker) has been introduced to the Identity service. It runs continuously, periodically dispatching a SyncUsersCommand to synchronize user data, and pauses for 10 seconds between cycles if no users were synced.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/HostedServices · high confidence
Background workers for email and SMS notifications
Added SendEmailWorker and SendSmsWorker background services that periodically dispatch SendEmailMessagesCommand and SendSmsMessagesCommand via the command dispatcher, respectively. These workers run continuously until stopped, polling for messages and pausing for 10 seconds when no messages are pending, ensuring reliable background processing of notification tasks.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification.Background/HostedServices · high confidence
Background workers for outbox event publishing with toggle support
The Product and Storage modules now include PublishEventWorker background services that periodically dispatch pending events from the transactional outbox. These workers respect an IOutboxPublishingToggle, allowing publishing to be paused without stopping the service, and use consistent cancellation token handling to ensure graceful shutdown.
src/ModularMonolith/ClassifiedAds.Modules.Product/HostedServices, src/ModularMonolith/ClassifiedAds.Modules.Storage/HostedServices · high confidence
Centralized contract definitions for Audit, Identity, and Notification domains
The ClassifiedAds.Contracts package now provides a centralized set of Data Transfer Objects (DTOs) and service interfaces for core domain capabilities. This includes the AuditLog contracts (AuditLogEntryDTO, AuditLogEntryQueryOptions, and IAuditLogService) for tracking system actions, Identity contracts (UserDTO, UserQueryOptions, ICurrentUser, and IUserService) for managing user data and authentication context, and Notification contracts (EmailMessageDTO and IEmailMessageService) for sending emails. These definitions establish the shared API surface for these features across the modular monolith.
src/ModularMonolith/ClassifiedAds.Contracts · high confidence
ClassifiedAds WebAPI initialization and configuration
The ClassifiedAds.WebAPI project has been initialized with a new .NET 10 Dockerfile, a Program.cs entry point using top-level statements, and a comprehensive configuration structure. This includes AppSettings and specific option classes for Authentication (IdentityServer/JWT), CORS, Caching, Monitoring (OpenTelemetry), and modular components (AuditLog, Configuration, Identity, Notification, Product, Storage). The API supports JWT and OpenID Connect authentication, integrates SignalR for real-time notifications, and provides HTML/PDF export capabilities via RazorLight and DinkToPdf. A public certificate for IdentityServer is included, and the application is configured to use SQL Server for data persistence and data protection.
src/ModularMonolith/ClassifiedAds.WebAPI · high confidence
Configurable email notification service with SendGrid, SMTP, and fake providers
The email notification infrastructure now supports pluggable providers via a unified \IEmailNotification\ interface and DI extensions. Users can configure the system to use SendGrid (with API key and optional sender/recipient overrides), a standard SMTP client (with host, port, credentials, and SSL settings), or a fake implementation for testing. The \EmailOptions\ class allows selecting the provider via a string key, and the \AddEmailNotification\ extension method wires up the appropriate implementation based on this configuration.
src/Microservices/Common/ClassifiedAds.Infrastructure/Notification/Email, src/ModularMonolith/ClassifiedAds.Infrastructure/Notification/Email · high confidence
Configuration service introduces granular permissions and Excel import/export
The Configuration service now enforces fine-grained authorization on its API endpoints, requiring specific permissions (GetConfigurationEntries, GetConfigurationEntry, AddConfigurationEntry, UpdateConfigurationEntry, DeleteConfigurationEntry) for each action. Additionally, users can now import and export configuration entries via Excel files using the new ImportExcel and ExportAsExcel endpoints, with sensitive values automatically encrypted using RSA certificates when marked as sensitive.
src/Microservices/Services.Configuration · high confidence
Database configuration for audit logging, outbox messaging, and product seeding
The Product module now includes Entity Framework Core configurations for new database tables. AuditLogEntryConfiguration maps the AuditLogEntries table to support audit logging. OutboxMessageConfiguration and ArchivedOutboxMessageConfiguration define the OutboxMessages and ArchivingOutboxMessages tables, including indexes on Published, ScheduledAt, and CreatedDateTime fields, enabling reliable message delivery and scheduling. ProductConfiguration sets up the Products table and seeds it with initial test data (a generic test product and an iPhone X product).
src/ModularMonolith/ClassifiedAds.Modules.Product/DbConfigurations · high confidence
Dynamic permission-based authorization policies
The application now supports dynamic authorization policies based on specific permissions. A new \CustomAuthorizationPolicyProvider\ automatically handles policies prefixed with "Permission:", creating a policy that requires authentication and a \PermissionRequirement\. This requirement is processed by a \PermissionRequirementHandler\, which currently succeeds for any authenticated user (with a TODO to implement actual claim checking). The \ServiceCollectionExtensions\ method \AddAuthorizationPolicies\ registers these components and automatically discovers and registers any other custom authorization handlers found in the specified assembly, enabling a more flexible and dynamic authorization model.
src/ModularMonolith/ClassifiedAds.Infrastructure/Web/Authorization · high confidence
Email and SMS message archiving capability added
The Notification module now includes persistence logic to automatically archive old email and SMS messages. New repository implementations for EmailMessage and SmsMessage provide an ArchiveMessagesAsync method that identifies messages older than 30 days, copies them to corresponding archived entity types (ArchivedEmailMessage, ArchivedSmsMessage) using bulk insert operations, and then deletes the originals within a single transaction. This ensures that historical notification data is retained for auditing or compliance while keeping the active message tables lean.
src/ModularMonolith/ClassifiedAds.Modules.Notification/Persistence · high confidence
Email and SMS notification sending implemented via command handlers
The notification service now exposes explicit command handlers for sending email and SMS messages. SendEmailMessagesCommand and SendSmsMessagesCommand retrieve pending messages from their respective repositories, attempt delivery via the configured email and SMS providers, and apply a retry strategy with exponential back-off (using Fibonacci-based delays) when sending fails. Each message tracks attempt counts, logs outcomes, and updates sent timestamps, ensuring reliable delivery with configurable maximum attempts.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification/Commands · high confidence
Excel import and export for configuration entries
Users can now import and export configuration entries using Excel files. This change adds handlers for both reading from and writing to Excel spreadsheets, supporting two underlying libraries (ClosedXML and ExcelDataReader) to ensure compatibility. The import process validates that the uploaded file follows the expected template structure (Key/Value columns) and throws a validation error if the format is incorrect, while the export process generates a properly formatted Excel file containing the current configuration entries.
src/ModularMonolith/ClassifiedAds.Modules.Configuration/Excel · high confidence
Identity API microservice scaffolding with .NET 10, OpenTelemetry, and Swagger
The Identity API microservice is now available as a standalone containerized application built on .NET 10. It includes a Dockerfile for building and running the service, along with configuration files (appsettings.json) that enable OpenTelemetry tracing and metrics via OTLP. The API exposes Swagger UI for interactive documentation and supports authentication via IdentityServer, JWT, Auth0, and Azure Active Directory B2C. The entry point (Program.cs) uses top-level statements to configure the service, including data protection, exception handling, and database migration on startup.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity.Api · high confidence
Identity command handlers and user synchronization with Auth0 and Azure AD B2C
The identity module now includes command handlers for managing role and user claims, adding/removing roles, and deleting users. A new SyncUsersCommand handler enables synchronizing local users with external identity providers, specifically Auth0 and Azure Active Directory B2C, by creating or updating accounts in those systems as needed.
src/ModularMonolith/ClassifiedAds.Modules.Identity/Commands · high confidence
Identity database schema mappings and seed data added
Entity Framework Core configuration classes have been added for the Identity module in both the Microservices and Modular Monolith projects. These configurations define the database schema for core identity entities including Users, Roles, and their associated relationships (UserClaims, UserRoles, UserLogins, UserTokens, RoleClaims, and PasswordHistories). The User configuration also includes seed data for an initial administrator account ([e-mail redacted]).
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/DbConfigurations, src/ModularMonolith/ClassifiedAds.Modules.Identity/DbConfigurations · high confidence
Initial Azure Terraform deployment configuration
Added Terraform files to provision the ClassifiedAds infrastructure on Azure, including a resource group, storage account, SQL Server with database, Key Vault, App Service Plan, and three Windows Web Apps (IdentityServer, WebAPI, and WebMVC) running .NET 8.0. The configuration sets up the development environment in Southeast Asia with specific firewall rules and connection strings.
deployments/Azure/terraform · high confidence
Initial release of the Identity gRPC microservice
The Identity service is now available as a standalone gRPC microservice, replacing the previous monolithic or non-containerized deployment model. This change introduces a Dockerfile for containerized builds using the .NET 10 SDK and runtime, a new Program.cs entry point that configures gRPC, JWT authentication via IdentityServer, and OpenTelemetry monitoring, along with configuration files (appsettings.json) defining connection strings, certificate paths, and service endpoints for local development.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity.Grpc · high confidence
Initial release of the Notification Background Worker microservice
This change introduces the new ClassifiedAds.Services.Notification.Background microservice, which handles asynchronous email and SMS delivery via background hosted services. The service is built on .NET 10 and includes a Dockerfile for containerized deployment, along with configuration files that enable OpenTelemetry for distributed tracing and metrics. It registers specific workers for sending emails and SMS messages, connects to SQL Server for persistence, and exposes gRPC endpoints for audit log, notification, and identity services.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification.Background · high confidence
Introduce .NET 10 gRPC notification microservice with OpenTelemetry and JWT auth
The notification service is now deployed as a standalone .NET 10 gRPC microservice, replacing the previous startup-based model with a minimal hosting approach. It exposes gRPC endpoints for email and SMS message handling, secured via JWT Bearer authentication against an IdentityServer authority. The service includes built-in OpenTelemetry support for distributed tracing and metrics, configurable via appsettings, and is containerized with a multi-stage Dockerfile targeting the .NET 10 SDK and ASP.NET runtime.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification.Grpc · high confidence
Introduce Dockerfile and gRPC service entry point for the Audit Log microservice
The Audit Log microservice now includes a Dockerfile for containerization, utilizing the .NET 10 SDK and runtime images, alongside a new Program.cs that bootstraps the gRPC server with JWT authentication, OpenTelemetry monitoring, and dependency injection. Configuration files (appsettings.json and appsettings.Development.json) define connection strings, IdentityServer authentication settings, and OpenTelemetry endpoints, enabling the service to be built, deployed, and observed as a standalone containerized component.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog.Grpc · high confidence
Introduce HybridCache and configurable caching infrastructure
The application now supports .NET 9's HybridCache alongside existing in-memory and distributed caching strategies. Users can configure caching via CachingOptions, specifying providers such as InMemory, Redis, or SQL Server for distributed storage, with specific settings for Redis configuration/instance name and SQL Server connection details/schema/table. The infrastructure automatically registers the appropriate cache services based on the selected provider and enables HybridCache for combined local and distributed caching benefits.
src/ModularMonolith/ClassifiedAds.Infrastructure/Caching · high confidence
Introduce HybridCache-backed claims transformation for permissions
Both the Microservices and ModularMonolith infrastructure layers now include a new \CustomClaimsTransformation\ component that enriches authenticated user identities with permission claims. This transformation leverages .NET 9's \HybridCache\ to fetch and cache permissions based on the user ID and token issuance time, reducing redundant lookups. While the underlying data retrieval is currently a placeholder (returning an empty list), the mechanism is in place to support permission-based authorization once the database integration is implemented.
src/Microservices/Common/ClassifiedAds.Infrastructure/Web/ClaimsTransformations, src/ModularMonolith/ClassifiedAds.Infrastructure/Web/ClaimsTransformations · high confidence
Introduce OpenTelemetry observability to the GraphQL gateway
The GraphQL gateway now includes configuration for OpenTelemetry, enabling distributed tracing and monitoring. In the development environment, telemetry is enabled by default, sending data to an OTLP endpoint at https://localhost:21052 under the service name 'ClassifiedAds.Gateways.GraphQL'.
src/Microservices/Gateways.GraphQL · high confidence
Introduce Product and UploadFile models with mapping logic
The Product module now includes explicit data models for product information and file uploads, along with mapping utilities to convert between domain entities and these models. Users can now interact with product data via a structured ProductModel containing Id, Code, Name, and Description, and the module supports file upload operations through the UploadFileModel which wraps IFormFile. The new mapping configuration provides extension methods to seamlessly transform between Entities.Product and ProductModel instances.
src/ModularMonolith/ClassifiedAds.Modules.Product/Models · high confidence
Introduce SQL Server persistence layer with bulk operations and unit of work
The SQL Server persistence module now provides a concrete repository and unit of work implementation for the ClassifiedAds application. The new DbContextRepository supports standard CRUD operations as well as high-performance bulk insert, update, delete, and merge operations via EntityFrameworkCore.SqlServer.SimpleBulks. The accompanying DbContextUnitOfWork manages database transactions and automatically applies entity configurations from the assembly, enabling efficient data access and consistent transaction handling for SQL Server-backed aggregates.
src/ModularMonolith/ClassifiedAds.Persistence.SqlServer · high confidence
Introduce base entity interfaces and class for domain modeling
The domain layer now includes a new abstract \Entity\<TKey\>\ class and supporting interfaces (\IAggregateRoot\, \IHasKey\<T\>\, \ITrackable\) to standardize entity structure. This provides a common base for domain entities, enforcing consistent identification via \IHasKey\, audit tracking via \ITrackable\ (including row versioning and timestamps), and aggregate root identification via \IAggregateRoot\.
src/Microservices/Common/ClassifiedAds.Domain/Entities · high confidence
Introduce domain messaging infrastructure interfaces and core bus implementation
The domain layer now includes a foundational messaging infrastructure within the \ClassifiedAds.Domain.Infrastructure.Messaging\ namespace. This adds key interfaces (\IMessageBus\, \IMessageSender\, \IMessageReceiver\, \IMessageBusConsumer\, \IOutboxMessagePublisher\) and a concrete \MessageBus\ implementation that supports asynchronous sending, receiving, and outbox message publishing. It also introduces supporting types like \Message\<T\>\, \MetaData\, and \PublishingOutboxMessage\ to structure message payloads and metadata, enabling services to interact with a message bus without depending on a specific transport protocol at the domain level.
src/Microservices/Common/ClassifiedAds.Domain/Infrastructure · high confidence
Introduce file storage models and mapping for the Storage module
The Storage module now exposes dedicated models for handling file uploads and entries. A new \UploadFileModel\ defines the input contract for uploading files, including name, description, the file stream, and an encryption flag. A corresponding \FileEntryModel\ represents the stored file metadata (ID, size, location, encryption status, etc.), and a mapping configuration is provided to convert internal \FileEntry\ entities into these models.
src/ModularMonolith/ClassifiedAds.Modules.Storage/Models · high confidence
Introduce file upload and deletion domain events
The Storage module now exposes specific domain events for file lifecycle changes. New DTOs, FileUploadedEvent and FileDeletedEvent, have been added to the DTOs folder; both implement the IMessageBusEvent interface and carry the affected FileEntry entity, enabling downstream consumers to react to file uploads and deletions via the message bus.
src/ModularMonolith/ClassifiedAds.Modules.Storage/DTOs · high confidence
Introduce pluggable SMS notification providers with async support
The SMS notification subsystem now supports multiple providers (Twilio, Azure Communication Services, and a Fake implementation for testing) via a unified \ISmsNotification\ interface. Users can configure the desired provider through \SmsOptions\ and register it using extension methods in \SmsNotificationServiceCollectionExtensions\. All send operations are now asynchronous (\SendAsync\), allowing for non-blocking SMS delivery.
src/ModularMonolith/ClassifiedAds.Infrastructure/Notification/Sms · high confidence
Introduce pluggable file storage with archive support and fake implementation
The storage layer now supports multiple backends (Local, Azure Blob, Amazon S3, and a Fake provider) via a new \IFileStorageManager\ interface and \StorageOptions\ configuration. A key behavioral addition is the inclusion of \ArchiveAsync\ and \UnArchiveAsync\ methods in the storage contract, allowing files to be archived or restored. A \FakeStorageManager\ is provided for development/testing, and dependency injection extensions allow selecting the active provider at startup.
src/ModularMonolith/ClassifiedAds.Infrastructure/Storages · high confidence
Introduces CQRS application layer with command/query handlers and audit logging
The Duende identity server application layer now implements a Command Query Responsibility Segregation (CQRS) pattern, introducing generic command and query interfaces along with a Dispatcher for routing. This includes specific handlers for managing Roles and Users (such as adding/removing claims and roles) and a new capability to retrieve and display Audit Log entries. Additionally, the system now supports automatic audit logging for commands and queries via decorators, and includes retry logic for database operations to improve resilience.
src/IdentityServers/Duende · high confidence
Introduces configurable web notification support via SignalR
The application now supports sending real-time web notifications using Microsoft.AspNetCore.SignalR. This change introduces a new \IWebNotification\<T\>\ interface and a concrete \SignalRNotification\<T\>\ implementation that connects to a specified SignalR hub endpoint. To facilitate configuration and testing, the system includes \WebOptions\ and \SignalROptions\ classes, along with dependency injection extensions (\AddSignalRWebNotification\, \AddFakeWebNotification\) that allow users to select between a live SignalR provider or a no-op \FakeWebNotification\ implementation based on the \Provider\ setting.
src/ModularMonolith/ClassifiedAds.Infrastructure/Notification/Web · high confidence
Introduces domain messaging infrastructure with outbox support
The domain layer now includes a new messaging infrastructure under \ClassifiedAds.Domain.Infrastructure.Messaging\. This adds core abstractions for sending and receiving messages (\IMessageBus\, \IMessageSender\, \IMessageReceiver\), consumer handling (\IMessageBusConsumer\), and metadata tracking (\MetaData\). It also introduces an outbox pattern for reliable event publishing via \IOutboxMessagePublisher\ and \PublishingOutboxMessage\, along with a concrete \MessageBus\ implementation that auto-registers consumers and outbox handlers from assemblies. This enables domain events to be persisted and published reliably, decoupling domain logic from specific transport implementations.
src/ModularMonolith/ClassifiedAds.Domain/Infrastructure · high confidence
Introduces pluggable file storage with local, Azure, Amazon, and fake providers
The infrastructure layer now supports multiple file storage backends via a unified \IFileStorageManager\ interface. Users can configure the storage provider (Local, Azure, Amazon, or Fake) through \StorageOptions\, and the system automatically registers the corresponding implementation (e.g., \LocalFileStorageManager\, \AzureBlobStorageManager\, \AmazonS3StorageManager\, or \FakeStorageManager\) via dependency injection. This enables runtime selection of storage behavior without code changes, supporting features like file creation, reading, deletion, and archiving across different cloud and local environments.
src/Microservices/Common/ClassifiedAds.Infrastructure/Storages · high confidence
Introduction of EmailMessageService for sending notifications
A new EmailMessageService has been added to the Notification module, implementing the IEmailMessageService interface. This service enables the system to create and persist email messages by accepting EmailMessageDTOs and delegating the storage operation to the underlying repository via the base CrudService.
src/ModularMonolith/ClassifiedAds.Modules.Notification/Services · high confidence
Introduction of ICurrentUser abstraction for identity resolution
The identity layer now defines an ICurrentUser interface with IsAuthenticated and UserId properties, implemented by CurrentWebUser (which resolves the user from the ASP.NET Core HttpContext via NameIdentifier or sub claims) and AnonymousUser (a non-authenticated placeholder). This provides a consistent way to access the current user's identity across the application.
src/Microservices/Common/ClassifiedAds.Infrastructure/Identity · high confidence
Introduction of Identity API Models and Mapping Logic
The Identity API service now includes dedicated model classes for Role, User, and SetPassword operations, along with corresponding mapping configurations that convert internal entity objects into these models. This addition establishes the data structures and transformation logic required for the service's API layer to expose identity-related information.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity.Api/Models · high confidence
Introduction of generic CRUD service for aggregate roots
A new generic \CrudService\<T\>\ and its \ICrudService\<T\>\ interface have been added to the application layer, providing a standardized implementation for Create, Read, Update, and Delete operations on entities that implement \IAggregateRoot\. This service handles repository interactions, unit of work persistence, and automatically dispatches domain events (created, updated, deleted) via the central dispatcher, reducing the need for repetitive CRUD logic in specific application services.
src/ModularMonolith/ClassifiedAds.Application/Common/Services · high confidence
Introduction of generic domain event and handler interfaces
The domain layer now supports a standardized eventing mechanism through the introduction of the IDomainEvent marker interface and a generic IDomainEventHandler\<T\> interface. This allows handlers to process specific event types asynchronously with cancellation support. Additionally, concrete generic event classes (EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent) have been added to represent lifecycle changes for entities, enabling a consistent pattern for notifying subscribers about entity state changes.
src/ModularMonolith/ClassifiedAds.Domain/Events · high confidence
Introduction of pessimistic locking infrastructure
The application now includes a new cross-cutting concern for managing pessimistic locks. This change introduces the core interfaces \ILockManager\ and \IDistributedLock\, along with their associated scopes (\IDistributedLockScope\) and error handling (\CouldNotAcquireLockException\). These components provide the foundational API for acquiring, extending, and releasing locks on specific entities, enabling distributed coordination and preventing concurrent modification conflicts.
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Locks · high confidence
Local file storage implementation with health checks
The local storage subsystem now includes a concrete implementation for managing files on the local filesystem, featuring asynchronous read, write, and delete operations via LocalFileStorageManager. To support operational monitoring, a new LocalFileHealthCheck has been added, which verifies storage availability by creating and deleting a temporary test file. Configuration is handled through LocalOptions, allowing users to specify the storage path.
src/ModularMonolith/ClassifiedAds.Infrastructure/Storages/Local · high confidence
Microservices domain entities and data models
This change introduces the core domain entity classes for the new microservices architecture. It defines the data models for Identity (User, Role, PasswordHistory), Configuration (ConfigurationEntry, LocalizationEntry), Audit Logging (AuditLogEntry), Notifications (EmailMessage, SmsMessage), Product (Product), and Storage (FileEntry, DeletedFileEntry). It also adds support for the Transactional Outbox pattern (OutboxMessage) and Idempotent Consumers (IdempotentRequest) to ensure reliable messaging and data consistency across services.
Microservices · high confidence
New DTOs and messaging event for the Audit Log service
The Audit Log service now exposes specific Data Transfer Objects and a messaging event to support its functionality. A new \AuditLogCreatedEvent\ class implements \IMessageBusEvent\ to facilitate communication via the message bus, carrying an \AuditLogEntry\. Additionally, \AuditLogEntryDTO\ and \AuditLogEntryQueryOptions\ are introduced to handle audit log data representation and filtering (by user or object ID), while \UserDTO\ provides a structured view of user details including authentication and security flags.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog/DTOs · high confidence
New DTOs for email and SMS message contracts
The Notification module now exposes dedicated Data Transfer Objects for its messaging capabilities. EmailMessageDTO implements IEmailMessage and carries standard email fields (From, Tos, CCs, BCCs, Subject, Body), while SmsMessageDTO implements ISmsMessage and carries Message and PhoneNumber. These types provide the structured contracts used by the notification infrastructure to send emails and SMS messages.
src/ModularMonolith/ClassifiedAds.Modules.Notification/DTOs · high confidence
New Dockerfile and database migration scripts for ClassifiedAds.Migrator
The ClassifiedAds.Migrator project now includes a Dockerfile based on .NET 10.0 and SQL Server database migration scripts. The Dockerfile defines a multi-stage build process for the migrator application, while the new SQL script creates the CacheEntries table and its associated index for distributed caching support.
src/ModularMonolith/ClassifiedAds.Migrator · high confidence
New Excel import and export interfaces
Added IExcelReader and IExcelWriter interfaces to the ClassifiedAds.CrossCuttingConcerns.Excel namespace, enabling asynchronous reading from and writing to Excel streams. These interfaces define the contract for Excel data operations, supporting generic types constrained by IExcelResponse and IExcelRequest respectively.
src/Microservices/Common/ClassifiedAds.CrossCuttingConcerns/Excel · high confidence
New OpenTelemetry monitoring configuration and extension
The application now includes a dedicated OpenTelemetry monitoring setup within the ClassifiedAds infrastructure. Users can enable distributed tracing and metrics via the new OpenTelemetryOptions, which supports configuring the service name, enabling specific trace/metric collectors (ASP.NET Core, Entity Framework Core, HTTP client, runtime, and process), and exporting data to either an OTLP endpoint or Azure Monitor. This change introduces the foundational infrastructure for observability, allowing users to integrate with standard OpenTelemetry backends or Azure Application Insights.
src/ModularMonolith/ClassifiedAds.Infrastructure/Monitoring/OpenTelemetry · high confidence
New Paged DTO for pagination support
A new Paged\<T\> data transfer object has been added to the application's common DTOs, providing a standard structure for paginated results. This class exposes a total item count and a list of items, enabling consumers to handle paginated data consistently across the application.
src/ModularMonolith/ClassifiedAds.Application/Common/DTOs · high confidence
New application-layer infrastructure for identity management
This change introduces the core application services for the identity server, implementing a Command/Query (CQRS) pattern with a central Dispatcher to route requests to specific handlers. It provides generic CRUD operations via ICrudService and specific handlers for managing Users and Roles (including claims and role assignments). The implementation includes a decorator pipeline for cross-cutting concerns, specifically adding automatic audit logging for commands and queries, and a database retry mechanism to handle transient connection failures.
src/IdentityServers/OpenIddict · high confidence
New background services for cron jobs, application lifecycle, and message consumption
The application now includes three new hosted services in the infrastructure layer. CronJobBackgroundService provides a base for executing scheduled tasks using Quartz cron expressions. HostApplicationLifetimeEventsHostedService logs detailed application start, stop, and shutdown events, including system metrics, to a local file. MessageBusConsumerBackgroundService enables generic, asynchronous consumption of messages from the message bus.
src/ModularMonolith/ClassifiedAds.Infrastructure/HostedServices · high confidence
New command handlers for identity management and external provider synchronization
This change introduces a set of new command handlers in the Identity service to manage user and role claims, delete users and roles, and synchronize local users with external identity providers. Specifically, it adds handlers for adding and removing claims and roles for both users and roles, as well as deleting users. Additionally, a new SyncUsersCommand handler is added to synchronize local user accounts with Auth0 and Azure Active Directory B2C, creating or updating external user records as needed.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/Commands · high confidence
New health check infrastructure for infrastructure services
The application now includes a comprehensive health check system for its underlying infrastructure components. Users can verify the status of HTTP endpoints, SQL Server databases, Amazon S3, Azure Blob Storage, Azure Service Bus, Kafka, RabbitMQ, and local file storage through dedicated extension methods. Additionally, a generic HTTP health check and a network port availability checker are provided to monitor external dependencies and service readiness.
src/ModularMonolith/ClassifiedAds.Infrastructure/HealthChecks · high confidence
New identity queries for retrieving users and roles
The Identity module now exposes dedicated queries to fetch individual and lists of Users and Roles. GetRoleQuery and GetRolesQuery allow retrieving role entities with optional inclusion of claims, user roles, and users, while GetUserQuery and GetUsersQuery provide similar flexibility for user entities, including claims, user roles, and associated roles. These queries integrate with the existing persistence layer via RoleRepository and UserRepository, support asynchronous execution with cancellation tokens, and apply specific decorators such as DatabaseRetry and AuditLog to the list retrieval handlers to enhance reliability and observability.
src/ModularMonolith/ClassifiedAds.Modules.Identity/Queries · high confidence
New local development tooling and infrastructure configurations
This update adds a comprehensive suite of Docker-based development tools to the \tools\ directory, enabling local setup for observability, messaging, databases, and CI/CD. Key additions include OpenTelemetry configurations for AWS (CloudWatch, EMF, X-Ray) and local backends (Jaeger, Zipkin, Prometheus, Grafana, ELK), a Debezium Change Data Capture setup for SQL Server, and single-node deployments for Kafka (with UI), Elasticsearch, and Kibana. Database tooling now includes PostgreSQL with pgAdmin, MySQL with phpMyAdmin, and SQL Server. Additional utilities include a MarkItDown API for document conversion, Gitleaks for secret scanning, Jenkins with .NET Core support, MailHog for email testing, and RabbitMQ.
tools · high confidence
New middleware components for exception handling, security, and logging
This change introduces a suite of new middleware components to the ClassifiedAds web infrastructure. A Global Exception Handler now catches unhandled errors and returns standardized RFC 7807 ProblemDetails responses, with configurable detail levels (None, Message, StackTrace, ToString) to control error information exposure. Security is enhanced via a Security Headers middleware that injects custom headers and an IP Filtering middleware for logging remote IP addresses. Additionally, a Logging Status Code middleware logs warnings for 401/403 responses, sanitizing input to prevent CRLF injection, while a Debugging middleware provides a placeholder for request inspection.
src/Microservices/Common/ClassifiedAds.Infrastructure/Web/Middleware, src/ModularMonolith/ClassifiedAds.Infrastructure/Web/Middleware · high confidence
New query handlers for retrieving audit logs, file entries, and user data
The Storage module now exposes dedicated query handlers to fetch audit log entries, file entries, and user information. The GetAuditEntriesQuery retrieves audit logs with optional filtering by user or object ID, joins them with user details, and returns them sorted by creation time. The GetFileEntriesQuery returns a list of file entries that have not been soft-deleted. The GetUsersQuery delegates to the identity service to retrieve user data. All handlers support cancellation tokens for improved responsiveness.
src/ModularMonolith/ClassifiedAds.Modules.Storage/Queries · high confidence
Notification microservice API scaffolding with SignalR and OpenTelemetry
The Notification microservice API now includes a new entry point (Program.cs) and supporting configuration files that establish the application's runtime behavior. This change introduces SignalR support via a new NotificationHub and a PushNotificationHostedService for broadcasting test messages, enabling real-time web notifications. It also configures OpenTelemetry for distributed tracing and metrics, sets up JWT and IdentityServer authentication, and exposes Swagger documentation for API discovery. Additionally, a Dockerfile is provided to containerize the service using the .NET 10 SDK and runtime.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification.Api · high confidence
Notification persistence layer and message archiving capability
The notification service now includes a dedicated persistence layer using Entity Framework Core with SQL Server, featuring a \NotificationDbContext\ and generic repository base. This change introduces the ability to archive old email and SMS messages: \EmailMessageRepository\ and \SmsMessageRepository\ provide an \ArchiveMessagesAsync\ method that identifies messages older than 30 days, bulk-inserts them into \ArchivedEmailMessage\ and \ArchivedSmsMessage\ tables respectively, and then bulk-deletes the originals within a transaction.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification/Persistence · high confidence
Outbox event publishers for audit logs and file operations
New outbox message publishers have been added to the Product and Storage modules to ensure reliable event delivery. The Product module now includes an AuditLogEntryOutboxMessagePublisher that forwards audit log creation events to an external audit log service. The Storage module introduces two publishers: one for audit log entries (mirroring the Product module's capability) and another for file entry events, which translates file creation and deletion outbox messages into corresponding FileUploaded and FileDeleted domain events sent via the message bus.
src/ModularMonolith/ClassifiedAds.Modules.Product/OutBoxEventPublishers, src/ModularMonolith/ClassifiedAds.Modules.Storage/OutBoxEventPublishers · high confidence
Product export to HTML and PDF
Users can now export product lists to HTML and PDF formats. This change introduces a cross-cutting HTML writer using RazorLight and two PDF generation strategies (DinkToPdf and PuppeteerSharp), along with the specific handlers and request records in the Product module that orchestrate the conversion of product data into these document formats.
(repo-wide) · high confidence
Product module persistence layer with outbox support
The Product module now includes its own persistence infrastructure, introducing a dedicated ProductDbContext, IProductRepository, and Repository base class. The context integrates with the SQL Server persistence layer and implements outbox pattern support by automatically associating an ActivityId with new OutboxMessage entities during save operations, ensuring reliable event delivery for domain events.
src/ModularMonolith/ClassifiedAds.Modules.Product/Persistence · high confidence
Storage microservice implements file management with audit logging and event-driven architecture
The Storage microservice now exposes a complete file management API (upload, download, list, update, delete) using ASP.NET Core minimal endpoints. Access is controlled via specific permissions (e.g., Permission:UploadFile) and resource-based authorization on individual file entries. The service ensures data integrity and observability by automatically recording audit logs for file creation, updates, and deletions, and by publishing domain events (FileUploaded, FileDeleted) to a message bus via a transactional outbox pattern. Additionally, it supports optional AES encryption for uploaded files and triggers external webhooks upon file events.
src/Microservices/Services.Storage · high confidence
Storage module persistence layer and outbox integration
The Storage module now includes its own persistence infrastructure, introducing a dedicated StorageDbContext and a generic Repository class to manage data access. The context integrates with the outbox pattern by automatically assigning ActivityIds to new OutboxMessages during save operations, ensuring reliable event sourcing. Additionally, it implements soft-delete tracking for file entries by automatically creating DeletedFileEntry records when a FileEntry is marked as deleted, persisting the deletion timestamp.
src/ModularMonolith/ClassifiedAds.Modules.Storage/Persistence · high confidence
Unified caching configuration with HybridCache support
The infrastructure layer now provides a centralized \CachingOptions\ model and a single \AddCaches\ extension method to configure all caching backends. Users can configure in-memory caching, distributed caching (via Redis, SQL Server, or in-memory), and the new .NET 9 HybridCache through this unified entry point, simplifying the setup of mixed caching strategies.
src/Microservices/Common/ClassifiedAds.Infrastructure/Caching · high confidence
Unified configuration provider support for Azure, HashiCorp Vault, and SQL Server
The application now supports loading configuration from multiple external sources via a new \ConfigurationProviders\ model and corresponding extension methods. Users can enable Azure App Configuration, Azure Key Vault (for secrets), HashiCorp Vault (supporting Token and UserPass authentication), and SQL Server (with optional RSA certificate-based decryption for sensitive values) through a single unified entry point, replacing previous ad-hoc configuration setups.
src/ModularMonolith/ClassifiedAds.Infrastructure/Configuration · high confidence
Unified messaging infrastructure with multi-provider support and RabbitMQ encryption
The messaging layer now supports Azure Service Bus, Kafka, and RabbitMQ alongside the existing Fake provider, allowing users to switch message brokers via configuration. This update introduces a new unified DI registration system in MessagingCollectionExtensions that wires up senders, receivers, and health checks for all providers based on the selected provider type. For RabbitMQ specifically, messages can now be encrypted in transit using AES-CBC when the MessageEncryptionEnabled flag is set, and the receiver implementation includes robust retry logic with dead-letter queue support for failed messages.
src/ModularMonolith/ClassifiedAds.Infrastructure/Messaging · high confidence
Webhook notifications for file upload and deletion events
The Storage module now supports sending HTTP webhook notifications when files are uploaded or deleted. A new WebhookConsumer listens for FileUploadedEvent and FileDeletedEvent messages from the message bus and posts the file entry data to configurable payload URLs defined in the application configuration.
src/ModularMonolith/ClassifiedAds.Modules.Storage/MessageBusConsumers · high confidence
gRPC UserService with authentication and authorization
The gRPC service layer now includes a UserService that exposes GetUsers and GetUser endpoints. These endpoints are protected by the \[Authorize\] attribute, enforcing authentication and authorization for all user-related gRPC calls. The service retrieves user data (ID, username, email) by dispatching queries through the application's dispatcher.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity.Grpc/Services · high confidence
Behavioural changes
Angular UI adopts standalone components and modern Angular features
The Angular application has been updated to use standalone components, removing the need for NgModules and simplifying the component structure. This change includes migrating to the new control flow syntax (e.g., @if, @for) in templates, adopting the new standalone router configuration, and integrating modern Angular features like the new signal-based state management with NgRx. The UI also now uses the new Angular Material dialog system and integrates with the new Angular CLI build system.
src/UIs · high confidence
Application Insights configuration switches from Instrumentation Key to Connection String
The Azure Application Insights monitoring setup now requires a Connection String instead of an Instrumentation Key for configuration. The new \AzureApplicationInsightsOptions\ class exposes a \ConnectionString\ property, and the service registration extension reads this value to configure the telemetry client, aligning with the v3 SDK requirements.
src/ModularMonolith/ClassifiedAds.Infrastructure/Monitoring/AzureApplicationInsights · high confidence
Audit Log service configuration model updated for .NET 6 and multi-auth support
The AppSettings configuration model in the Audit Log service has been restructured to support the upgrade to .NET 6 and the introduction of multiple authentication schemes. The new model explicitly defines sections for ConnectionStrings (including a new CommandTimeout property), Logging, Caching, Monitoring, Storage, Messaging, Notification, and Interceptors. Authentication options now distinguish between IdentityServer and JWT providers, allowing for more granular configuration of authority, audience, and certificate-based token decryption and signing.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog/ConfigurationOptions · high confidence
Audit log entries are now idempotent to prevent duplicates
The AuditLogService now checks for duplicate requests before adding new audit log entries. If a request with the same ID and type has already been processed, the service returns immediately without creating a new entry, ensuring that audit logs are not duplicated in case of retries or message redelivery.
src/ModularMonolith/ClassifiedAds.Modules.AuditLog/Services · high confidence
Audit log queries now support pagination and user details
The audit log service now provides a new \GetPagedAuditEntriesQuery\ that allows users to retrieve audit entries with pagination controls (page number and size), replacing or supplementing the previous unpaginated \GetAuditEntriesQuery\. Both queries now enrich audit log entries with user names by fetching user data via a gRPC call to the Identity service, ensuring that audit logs display the associated user's name rather than just the user ID.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog/Queries · high confidence
Audit log queries now support pagination and user name resolution
The Audit Log module now provides a new \GetPagedAuditEntriesQuery\ that allows users to retrieve audit entries with specific page and page size parameters, improving performance for large datasets. Additionally, both the standard and paged query handlers have been updated to resolve user names by fetching user details via the \IUserService\, ensuring that audit log entries display the associated \UserName\ alongside other metadata.
src/ModularMonolith/ClassifiedAds.Modules.AuditLog/Queries · high confidence
AuditLog and Configuration modules now support configurable SQL command timeouts
The ServiceCollectionExtensions for the AuditLog and Configuration modules have been updated to allow users to specify a CommandTimeout for their respective SQL Server database contexts. When the CommandTimeout setting is provided in the connection string configuration, it is passed to the Entity Framework Core SQL Server provider, enabling control over long-running query execution times for these modules.
src/ModularMonolith/ClassifiedAds.Modules.AuditLog, src/ModularMonolith/ClassifiedAds.Modules.Configuration · high confidence
AuditLog, Configuration, and Identity modules adopt SqlServer persistence
The AuditLog, Configuration, and Identity modules now use dedicated Entity Framework Core DbContexts (AuditLogDbContext, ConfigurationDbContext, IdentityDbContext) and generic repositories that inherit from the SqlServer-specific base classes in ClassifiedAds.Persistence.SqlServer. The Identity module's persistence layer additionally implements IRoleRepository and IUserRepository with query options for including related entities (claims, roles, users, tokens) and supports AsNoTracking, while the IdentityDbContext also implements IDataProtectionKeyContext to manage data protection keys.
src/ModularMonolith/ClassifiedAds.Modules.AuditLog/Persistence, src/ModularMonolith/ClassifiedAds.Modules.Configuration/Persistence, src/ModularMonolith/ClassifiedAds.Modules.Identity/Persistence · high confidence
Azure Application Insights monitoring now uses ConnectionString
The Azure Application Insights integration has been updated to use a ConnectionString instead of an InstrumentationKey for configuration. This change aligns with the Application Insights v3 SDK requirements and simplifies setup by allowing users to provide a single connection string rather than managing separate keys. The monitoring options now include a ConnectionString property, and the service collection extension method configures telemetry using this new setting.
src/Microservices/Common/ClassifiedAds.Infrastructure/Monitoring/AzureApplicationInsights · high confidence
Azure Blob Storage implementation with health checks and tiering
The Azure storage layer now uses the modern Azure.\* SDK packages instead of the legacy Microsoft.Azure.\* ones. A new configuration class (AzureBlobOption) exposes connection string, container, and path settings. The storage manager implements IFileStorageManager with full async support for creating, reading, deleting, and managing file access tiers (archive/unarchive via Cool/Hot tiers). Additionally, a dedicated health check verifies container accessibility by uploading and deleting a temporary file.
src/Microservices/Common/ClassifiedAds.Infrastructure/Storages/Azure, src/ModularMonolith/ClassifiedAds.Infrastructure/Storages/Azure · high confidence
Background service initialization and configuration structure
The background service project now includes a structured configuration system with AppSettings and ModulesOptions classes to manage logging, caching, monitoring, and messaging settings. The service is configured to run as a Windows service and initializes various modules including Identity, Notification, Product, and Storage. It supports multiple messaging providers (RabbitMQ, Kafka, Azure Queue, Azure Service Bus, Azure Event Hub) and includes OpenTelemetry monitoring capabilities. The service also implements a file-based outbox publishing toggle feature and registers hosted services for each module.
src/ModularMonolith/ClassifiedAds.Background · high confidence
Centralized logging configuration with multi-backend support
The logging infrastructure now uses a unified configuration system that supports multiple output backends. Users can configure log levels via Serilog, write logs to local files with rotation, and optionally route logs to AWS CloudWatch, Azure Application Insights (using ConnectionString), and OpenTelemetry (via OTLP or Azure Monitor). The system also enriches log entries with machine name, process ID, and environment details, and supports Windows Event Log integration.
src/ModularMonolith/ClassifiedAds.Infrastructure/Logging · high confidence
Custom Identity Store and Token Provider Implementation
The Identity service now includes custom implementations for user and role management via new \UserStore\ and \RoleStore\ classes, alongside a dedicated \EmailConfirmationTokenProvider\. The \UserStore\ implements a comprehensive set of ASP.NET Core Identity interfaces (including password, security stamp, and two-factor stores) and introduces password history tracking by initializing a \PasswordHistory\ list upon user creation. The \RoleStore\ provides the interface contract for role operations, though the underlying methods currently throw \NotImplementedException\. These components replace or supplement the default Identity stores, allowing the application to manage users and roles through the project's specific repository and unit-of-work patterns.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/Services · high confidence
Database configuration for audit logs, file entries, and outbox messages
The Storage module now includes explicit Entity Framework Core configurations for its core data entities. Audit log entries are mapped to the 'AuditLogEntries' table with sequential ID generation. File management now distinguishes between active 'FileEntries' and 'DeletedFileEntries' (supporting soft deletes), each with their own tables and ID strategies. Additionally, the outbox pattern is configured with 'OutboxMessages' and 'ArchivedOutboxMessages' tables, including specific database indexes on publication status, scheduled times, and creation dates to optimize message processing and archival queries.
src/ModularMonolith/ClassifiedAds.Modules.Storage/DbConfigurations · high confidence
Defined event type constants for Product and Storage modules
The Product and Storage modules now define specific event type constants to standardize event naming. The Product module exposes constants for product lifecycle events (ProductCreated, ProductUpdated, ProductDeleted) and audit logging (AuditLogEntryCreated). Similarly, the Storage module defines constants for file entry lifecycle events (FileEntryCreated, FileEntryUpdated, FileEntryDeleted) and audit logging (AuditLogEntryCreated).
src/ModularMonolith/ClassifiedAds.Modules.Product/Constants, src/ModularMonolith/ClassifiedAds.Modules.Storage/Constants · high confidence
Email and SMS notification sending logic moved to command handlers
The notification module now processes pending email and SMS messages through dedicated command handlers (\SendEmailMessagesCommand\ and \SendSmsMessagesCommand\) instead of previous service-based approaches. These handlers query the persistence layer for messages that are not yet sent, have not expired, and are due for processing, then attempt delivery via the respective notification infrastructure. The system implements a retry mechanism with exponential backoff delays (based on Fibonacci intervals) and a default maximum of 5 attempts, logging success or failure details for each message.
src/ModularMonolith/ClassifiedAds.Modules.Notification/Commands · high confidence
Explicit database schema mappings and seed data for AuditLog, Notification, and Configuration modules
This change introduces explicit Entity Framework Core \IEntityTypeConfiguration\ files for the AuditLog, Notification, and Configuration modules in both the Microservices and ModularMonolith architectures. For the AuditLog module, it defines table mappings for \AuditLogEntries\ and \IdempotentRequests\, including unique constraints on request identifiers. For the Notification module, it configures tables for \EmailMessages\, \SmsMessages\, and their archived counterparts, adding specific indexes on \SentDateTime\ and \CreatedDateTime\ to optimize query performance. Additionally, the Configuration module now includes seed data for \ConfigurationEntries\ and \LocalizationEntries\ (English and Vietnamese), ensuring initial test data is present in the database upon migration.
(repo-wide) · high confidence
Gateway now supports configurable reverse proxy backends (Ocelot or YARP)
The gateway service has been updated to allow administrators to choose between two reverse proxy implementations: Ocelot and YARP. This is controlled via the 'ProxyProvider' configuration setting. When set to 'Ocelot', the gateway uses the existing Ocelot middleware and configuration structure. When set to 'YARP', it utilizes the YARP (Yet Another Reverse Proxy) middleware, with routes and clusters defined in the 'Yarp' section of the configuration file. This change provides flexibility in how incoming requests are routed to downstream services, allowing teams to select the proxy engine that best fits their performance or feature requirements.
src/Microservices/Gateways.WebAPI · high confidence
Global exception handling now uses ASP.NET Core 8 IExceptionHandler with structured ProblemDetails
The web infrastructure in both the Microservices and ModularMonolith projects now implements the ASP.NET Core 8 \IExceptionHandler\ interface to manage unhandled errors. This change replaces previous error-handling mechanisms with a centralized \GlobalExceptionHandler\ that returns standardized RFC 7807 ProblemDetails responses (JSON) for \NotFound\ (404), \ValidationException\ (400), and other server errors (500). Each error response now includes a \traceId\ extension for distributed tracing support. Additionally, the level of detail exposed in error messages for internal server errors is configurable via \GlobalExceptionHandlerOptions\, allowing administrators to control whether the raw exception message, stack trace, or a generic message is returned to the client.
src/Microservices/Common/ClassifiedAds.Infrastructure/Web/ExceptionHandlers, src/ModularMonolith/ClassifiedAds.Infrastructure/Web/ExceptionHandlers · high confidence
Identity domain model expanded with password history and external provider support
The Identity domain entities now support password history tracking via a new PasswordHistory entity linked to User, and external identity provider integration with Auth0 and Azure AD B2C fields added to the User entity. The User entity also includes standard ASP.NET Identity properties (claims, roles, logins, tokens), while supporting entities like Role, RoleClaim, UserClaim, UserRole, UserLogin, and UserToken are defined. Additional domain entities for audit logging, configuration, localization, and file management are present, alongside domain events for entity lifecycle tracking and value objects for Address and Money.
IdentityServers · high confidence
Identity module introduces custom email confirmation and role management infrastructure
The Identity module now includes a custom EmailConfirmationTokenProvider to manage email verification tokens with a specific two-day lifespan, replacing default token handling. Additionally, a new RoleStore implementation is added to support role-based access control, although it currently contains placeholder logic (NotImplementedException) for creation, deletion, and retrieval operations. The ServiceCollectionExtensions have been updated to register these new components, configure the email confirmation token provider, and set up the underlying SQL Server database context with configurable command timeouts.
src/ModularMonolith/ClassifiedAds.Modules.Identity · high confidence
Identity module introduces user context and service abstractions
The identity module now provides concrete implementations for user context and user management. A new \AnonymousUser\ class implements \ICurrentUser\ to represent unauthenticated sessions, while \CurrentWebUser\ extracts the authenticated user's ID and authentication status from the HTTP context. Additionally, a \UserService\ has been added to handle retrieving user lists via the application dispatcher, exposing user data through the \IUserService\ contract.
src/ModularMonolith/ClassifiedAds.Modules.Identity/Services · high confidence
Identity service initialization and configuration
The identity module now registers its core services, including SQL Server database context, user and role repositories, and ASP.NET Identity components, through the new ServiceCollectionExtensions. This setup configures specific token lifespans (3 hours for data protection, 2 days for email confirmation), enforces lockout policies (5 attempts, 5-minute lockout), and integrates custom password validators. It also supports optional Auth0 and Azure AD B2C identity providers based on application settings, and provides a helper to migrate the identity database schema.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity · high confidence
Introduce generic query handlers with cancellation support
The application layer now includes generic query infrastructure (GetEntititesQuery and GetEntityByIdQuery) that operates on any entity implementing IAggregateRoot. These queries support asynchronous execution via CancellationToken and, for single-entity retrieval, allow callers to opt-in to throwing a NotFoundException when the entity is not found.
src/ModularMonolith/ClassifiedAds.Application/Common/Queries · high confidence
Introduced message DTOs and password validation stubs for Identity and Notification services
The Identity service now includes DTOs for email and SMS messages, alongside stub implementations for historical and weak password validators that currently only reject hardcoded test strings. The Notification service adds corresponding email and SMS message DTOs that implement specific interface contracts, establishing the data structures used for communication between these services.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/DTOs, src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/PasswordValidators, src/Microservices/Services.Notification/ClassifiedAds.Services.Notification/DTOs · high confidence
Introduces a unified Command/Query Dispatcher and generic CRUD infrastructure
The application layer now provides a centralized Dispatcher that routes Commands, Queries, and Domain Events to their respective handlers, replacing the previous scattered approach. This change introduces generic command and query interfaces (ICommand, ICommandHandler, IQuery, IQueryHandler) along with standard implementations for common operations such as Add, Update, Delete, and GetById. A new ICrudService abstracts basic repository interactions, automatically persisting changes and dispatching domain events (EntityCreated, EntityUpdated, EntityDeleted) upon modification. Additionally, a HandlerFactory with decorator support is added to allow cross-cutting concerns to wrap handlers, and a Paged DTO is introduced to support paginated data retrieval.
src/Microservices/Common/ClassifiedAds.Application/Common · high confidence
Introduces generic CRUD command handlers with cancellation support
The application layer now provides generic command and handler classes for standard Create, Read, Update, and Delete operations (AddEntity, UpdateEntity, DeleteEntity, AddOrUpdateEntity). These commands are constrained to entities implementing IAggregateRoot and are processed by handlers that delegate to the ICrudService, ensuring consistent behavior across entity types. Additionally, all command handlers now accept a CancellationToken, allowing callers to cancel long-running database operations.
src/ModularMonolith/ClassifiedAds.Application/Common/Commands · high confidence
Local file storage and health check infrastructure
The local storage subsystem now includes a dedicated health check that verifies write permissions by creating and deleting a temporary file in the configured storage path, reporting healthy, unhealthy, or degraded status based on the outcome. The local file storage manager has been updated to support asynchronous operations for creating, reading, and deleting files, ensuring non-blocking I/O during storage interactions. Additionally, stub methods for archiving and unarchiving files have been added to the storage manager, though they currently return completed tasks without performing any actual file movement.
src/Microservices/Common/ClassifiedAds.Infrastructure/Storages/Local · high confidence
Microservices solution migrated to .NET 10 and new solution format
The Microservices area has been upgraded to target .NET 10, enforced by the new global.json SDK version 10.0.100. The solution file has been converted from the legacy .sln format to the new .slnx format (ClassifiedAds.Microservices.slnx), which organizes the projects into folders for BuildingBlocks, Gateways, and Services. Additionally, a Directory.Build.props file was added to enable NuGet audit, and a .env file was introduced to define gRPC service endpoints for local development.
src/Microservices · high confidence
Migrate API controllers to ASP.NET Core Minimal APIs
The application's HTTP request handling has been migrated from traditional MVC controllers to ASP.NET Core Minimal APIs. This change introduces a new \ModelValidationFilter\ that enforces data validation on incoming request models and returns standardized validation errors. Existing endpoints for Identity (Users, Roles), Audit Log, Configuration, Products, and Storage are now defined using the minimal endpoint routing pattern, utilizing the new filter for input validation and applying consistent authorization and rate-limiting policies.
(repo-wide) · high confidence
Migration to SQL Server persistence with new DbContext and repository implementations
The AuditLog and Identity microservices now use a SQL Server-backed persistence layer. New \AuditLogDbContext\ and \IdentityDbContext\ classes (derived from \DbContextUnitOfWork\) are introduced, configuring entity mappings via assembly scanning. Generic repository classes (\Repository\<T, TKey\>\) are added for both services to handle data access. Specifically for Identity, new \IRoleRepository\ and \IUserRepository\ interfaces with corresponding \RoleRepository\ and \UserRepository\ implementations provide query options for including claims, roles, users, and tokens, supporting flexible data retrieval for identity management.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog/Persistence, src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/Persistence · high confidence
Modular Monolith domain entities and data model
The ModularMonolith application now defines its core domain entities across multiple modules, establishing the underlying data model. The Identity module introduces a comprehensive user management system supporting Auth0 and Azure AD B2C, including entities for Users, Roles, Claims, Logins, Tokens, and Password History. The Storage module provides file management capabilities with encryption support and archiving via FileEntry and DeletedFileEntry. The Notification module handles asynchronous communication through Email and SMS message entities with retry logic and archiving. Additionally, the Configuration module manages application settings and localization, while the AuditLog and Product modules implement audit trails and product catalog structures. A key architectural change is the adoption of the IAggregateRoot interface for these entities, replacing the previous AggregateRoot base class pattern.
ModularMonolith · high confidence
Modular Monolith solution upgraded to .NET 10 with new project structure and configuration
The Modular Monolith project has been upgraded to .NET 10 (SDK 10.0.100) and migrated to the new .slnx solution format. This change introduces a reorganized project structure with folders for BuildingBlocks, Contracts, Hosts, and Modules, and adds a new .env file to configure local development settings for databases, messaging (RabbitMQ), and storage. The solution now includes dedicated projects for background services, migration, and the web API, along with updated Docker Compose configurations and CI/CD pipelines (Azure DevOps, Jenkins) to support the new architecture.
src/ModularMonolith · high confidence
New configuration model for identity providers and connection settings
The identity service now uses a structured AppSettings configuration model to manage connection strings, logging, caching, monitoring, and authentication options. This model introduces specific configuration sections for Auth0 and Azure Active Directory B2C identity providers, allowing users to configure these external authentication sources alongside existing IdentityServer and JWT settings. It also adds a CommandTimeout property to connection strings, enabling fine-tuned control over database command execution times.
src/Microservices/Services.Identity/ClassifiedAds.Services.Identity/ConfigurationOptions · high confidence
New configuration options for Identity module providers and database connections
The Identity module now exposes structured configuration classes for managing connection strings (including a new CommandTimeout setting), IdentityServer authority details, and external identity providers. Users can now configure Auth0 and Azure Active Directory B2C providers via dedicated options, allowing for more granular control over authentication sources and database command behavior.
src/ModularMonolith/ClassifiedAds.Modules.Identity/ConfigurationOptions · high confidence
Notification and Storage modules expose connection string configuration options
The Notification and Storage modules now include dedicated configuration classes (ConnectionStringsOptions and ModuleOptions) that allow users to specify database connection strings, the migrations assembly, and a command timeout value. This change introduces the structural options for managing database connectivity and timeout settings for these specific modules.
src/ModularMonolith/ClassifiedAds.Modules.Notification/ConfigurationOptions, src/ModularMonolith/ClassifiedAds.Modules.Storage/ConfigurationOptions · high confidence
Notification service configuration model updated for .NET 6 and OpenIddict
The notification service now uses a new AppSettings configuration model that introduces a CommandTimeout property for database connections, adds specific IdentityServer and JWT authentication options (including certificate settings for token decryption and signing), and integrates monitoring, caching, and interceptor options. This change reflects the upgrade to .NET 6 and the adoption of OpenIddict for authentication, replacing previous configuration structures with a more granular setup for security and performance tuning.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification/ConfigurationOptions · high confidence
Notification service database and caching configuration
The notification service now registers its database context with SQL Server, applying configurable command timeouts and migration assemblies from the app settings. It also sets up caching via the provided caching options and registers repositories for email and SMS messages, along with message handlers and notification services.
src/Microservices/Services.Notification/ClassifiedAds.Services.Notification · high confidence
Outbox pattern implementation for reliable event publishing
The Storage module now uses an outbox pattern to ensure reliable event delivery. A new PublishEventsCommand retrieves pending messages from the OutboxMessage repository, publishes them via the IMessageBus, and marks them as published. Additionally, EventTypeConstants are introduced to centralize event type strings (e.g., FILEENTRY\_CREATED, AUDIT\_LOG\_ENTRY\_CREATED) for consistency.
src/ModularMonolith/ClassifiedAds.Modules.Storage/Commands · high confidence
Outbox publishing can be disabled via a local file toggle
A new feature toggle mechanism allows users to disable outbox message publishing by creating a specific file (outbox\_publishing\_disabled.txt) in the user's profile directory under Practical.CleanArchitecture\\FeatureToggles. When this file exists, the system will not publish outbox messages; removing the file re-enables publishing. This toggle is implemented in both the Microservices and ModularMonolith project structures.
(repo-wide) · high confidence
Product Service API restructured with Minimal APIs, Outbox pattern, and export capabilities
The Product Service API has been rebuilt using Minimal APIs, replacing the previous controller-based approach. This change introduces granular authorization for all product operations (Create, Read, Update, Delete) and audit log retrieval, along with rate limiting on all endpoints. A Transactional Outbox pattern is now implemented to ensure reliable event publishing for product lifecycle changes (Created, Updated, Deleted) via a background worker. Additionally, the service now supports exporting product data to CSV, PDF, and HTML formats, and importing products from CSV files.
src/Microservices/Services.Product · high confidence
Product and Storage event handlers now use the Transactional Outbox pattern
The event handlers in the Product and Storage modules (handling create, update, and delete operations for Products and FileEntries) have been updated to implement the Transactional Outbox pattern. Instead of publishing events directly, these handlers now persist an \OutboxMessage\ alongside the audit log entry within the same database transaction. This ensures that audit records and subsequent event notifications are delivered reliably and consistently, preventing data loss if a crash occurs after the entity is saved but before the event is published.
src/ModularMonolith/ClassifiedAds.Modules.Product/EventHandlers, src/ModularMonolith/ClassifiedAds.Modules.Storage/EventHandlers · high confidence
Product and Storage modules now register DI, DbContext, and background services via new extension methods
The Product and Storage modules now expose dedicated service-collection extension methods (AddProductModule, AddStorageModule) that configure their respective SqlServer DbContexts (with optional CommandTimeout), register domain repositories (including OutboxMessage), set up authorization policies, and wire up message handlers. Additionally, separate extension methods (AddHostedServicesProductModule, AddHostedServicesStorageModule) register background services for message bus consumption and outbox publishing, while helper methods (MigrateProductDb, MigrateStorageDb) enable database migrations from both IApplicationBuilder and IHost contexts.
src/ModularMonolith/ClassifiedAds.Modules.Product, src/ModularMonolith/ClassifiedAds.Modules.Storage · high confidence
Product module adopts command pattern with outbox-based event publishing
The Product module now exposes CRUD operations (Add/Update, Delete) via dedicated command handlers, replacing previous service-based implementations. Additionally, a new PublishEventsCommand handler implements an outbox pattern for reliable event distribution: it queries the OutboxMessage repository for unpublished messages scheduled up to the current time, sends them via the IMessageBus, and marks them as published within the same unit of work.
src/ModularMonolith/ClassifiedAds.Modules.Product/Commands · high confidence
Rate limiting added to Audit Log and Product modules
New rate limiter policies have been introduced for the Audit Log and Product modules to protect endpoints from excessive usage. For the Audit Log module, the \GetAuditLogsRateLimiterPolicy\ enforces a fixed-window limit of 200 requests per minute for authenticated users (partitioned by username) and 100 requests per minute for unauthenticated requests (partitioned by host), returning a 429 status code when exceeded. Similarly, the Product module now includes a \DefaultRateLimiterPolicy\ with identical limits and partitioning logic, ensuring consistent protection across both areas.
src/ModularMonolith/ClassifiedAds.Modules.AuditLog/RateLimiterPolicies, src/ModularMonolith/ClassifiedAds.Modules.Product/RateLimiterPolicies · high confidence
Rate limiting for GetAuditLogs endpoint
The Audit Log API now enforces rate limits on the GetAuditLogs endpoint to protect against excessive usage. Authenticated users are limited to 200 requests per minute, while unauthenticated requests are capped at 100 requests per minute. When the limit is exceeded, the service returns a 429 Too Many Requests status code.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog.Api/RateLimiterPolicies · high confidence
Refactored domain entity base classes and interfaces
The domain layer's entity model has been refactored to use a composition-based approach. The previous \AggregateRoot\ base class inheritance has been replaced with the new \IAggregateRoot\ marker interface. A new generic \Entity\<TKey\>\ base class now provides core identity and auditing capabilities by implementing \IHasKey\<TKey\>\ and \ITrackable\, introducing \RowVersion\ for optimistic concurrency, and tracking \CreatedDateTime\ and \UpdatedDateTime\.
src/ModularMonolith/ClassifiedAds.Domain/Entities · high confidence
Repository interfaces now support async operations and bulk data actions
The domain repository contracts have been updated to require asynchronous execution for data persistence and retrieval. The new IRepository interface inherits from IConcurrencyHandler to manage row-versioning for optimistic concurrency control. Standard CRUD operations (Add, Update, Delete) and queries (GetQueryableSet, FirstOrDefaultAsync, etc.) are now asynchronous. Additionally, the interface introduces bulk operations—BulkInsertAsync, BulkUpdateAsync, BulkMergeAsync, and BulkDeleteAsync—allowing efficient batch processing of entities. The IUnitOfWork interface also exposes async methods for saving changes and managing database transactions.
src/Microservices/Common/ClassifiedAds.Domain/Repositories · high confidence
Repository interfaces updated with concurrency handling and bulk operations
The repository contracts in the domain layer have been refactored to support optimistic concurrency control and bulk data operations. The new IConcurrencyHandler interface allows entities to manage row versions and detect concurrency exceptions, while the IRepository interface now exposes asynchronous CRUD methods alongside new BulkInsert, BulkUpdate, BulkMerge, and BulkDelete capabilities. Additionally, the IUnitOfWork interface has been updated to support transaction management with configurable isolation levels.
src/ModularMonolith/ClassifiedAds.Domain/Repositories · high confidence
Resource-based authorization for file entries
The Storage module now implements ASP.NET Core resource-based authorization for file operations. This introduces specific permission constants (such as Permission:GetFiles and Permission:UploadFile) and defines standard CRUD operations (Create, Read, Update, Delete) for file entries. A new authorization handler has been added to evaluate these requirements against file resources, enabling fine-grained access control for storage actions.
src/ModularMonolith/ClassifiedAds.Modules.Storage/Authorization · high confidence
Standardized module configuration options with command timeout support
The AuditLog, Configuration, and Product modules now expose structured configuration options classes (e.g., AuditLogModuleOptions, ConfigurationModuleOptions, ProductModuleOptions) that include a ConnectionStrings section. This section standardizes the Default connection string and MigrationsAssembly properties, and introduces an optional CommandTimeout property for database operations. The Configuration module additionally includes CertificatesOptions to manage settings encryption certificates.
src/ModularMonolith/ClassifiedAds.Modules.AuditLog/ConfigurationOptions, src/ModularMonolith/ClassifiedAds.Modules.Configuration/ConfigurationOptions, src/ModularMonolith/ClassifiedAds.Modules.Product/ConfigurationOptions · high confidence
Unified command, query, and domain event dispatching with decorator support
The application layer now uses a single Dispatcher class to handle commands, queries, and domain events, replacing separate dispatchers. This Dispatcher integrates with a new HandlerFactory that supports a decorator pipeline, allowing behaviors to be wrapped around handlers via attributes. All dispatch operations now accept a CancellationToken, enabling users to cancel long-running commands, queries, or event processing.
src/ModularMonolith/ClassifiedAds.Application/Common · high confidence
Unified command, query, and event dispatching via new Dispatcher service
The application now registers a single \Dispatcher\ service that handles commands, queries, and domain events, replacing the previous separate dispatchers. This change is implemented in \ApplicationServicesExtensions.cs\, which adds the \Dispatcher\ to the service collection and provides extension methods to register CRUD handlers and event handlers for all aggregate roots implementing \IAggregateRoot\. Users benefit from a simplified service registration model where all message handling is managed through one central dispatcher, improving consistency and reducing the complexity of configuring multiple dispatchers.
src/ModularMonolith/ClassifiedAds.Application · high confidence
Unified command/query dispatcher and automated handler registration
The application now uses a single Dispatcher service to handle both commands and queries, replacing separate dispatchers. This change introduces automatic registration for CRUD command and query handlers based on aggregate root types found in the assembly, as well as domain event handlers, reducing the need for manual service configuration.
src/Microservices/Common/ClassifiedAds.Application · high confidence
Unified messaging infrastructure with Azure Service Bus, Kafka, and encrypted RabbitMQ
The messaging layer in the ClassifiedAds infrastructure has been restructured to support multiple message brokers via a provider-agnostic configuration. The system now includes implementations for Azure Service Bus (queues and topics), Apache Kafka, and RabbitMQ, alongside a Fake provider for local development. A central \MessagingOptions\ class allows selecting the active provider at runtime, with corresponding DI extensions registering the specific senders, receivers, and health checks. Notably, the RabbitMQ implementation now supports optional message encryption using AES-CBC, configurable retry intervals with dead-lettering, and automatic queue creation for Quorum or Stream types.
src/Microservices/Common/ClassifiedAds.Infrastructure/Messaging · high confidence
Unified monitoring configuration with OpenTelemetry and Azure Application Insights support
The monitoring infrastructure now provides a centralized configuration entry point via \MonitoringOptions\, allowing users to enable either Azure Application Insights or OpenTelemetry through a single \AddMonitoringServices\ extension method. This replaces previous separate monitoring tools (AppMetrics, MiniProfiler) with a unified approach where telemetry is conditionally registered based on the enabled provider in the options, streamlining the setup for distributed tracing and metrics.
src/Microservices/Common/ClassifiedAds.Infrastructure/Monitoring, src/ModularMonolith/ClassifiedAds.Infrastructure/Monitoring · high confidence
gRPC services for audit logging and notifications now require authentication
The gRPC service implementations for Audit Log, Email, and SMS notifications have been updated to enforce authorization. The \AuditLogService\, \EmailMessageService\, and \SmsMessageService\ classes are now decorated with the \\[Authorize\]\ attribute, meaning that calls to these gRPC endpoints will require valid authentication credentials by default. While the \AddEmailMessage\ and \AddSmsMessage\ methods retain \\[AllowAnonymous\]\ overrides to permit unauthenticated access for specific actions, the general service-level requirement ensures that other operations within these services are protected.
src/Microservices/Services.AuditLog/ClassifiedAds.Services.AuditLog.Grpc/Services, src/Microservices/Services.Notification/ClassifiedAds.Services.Notification.Grpc/Services · high confidence
Test coverage
Added end-to-end API integration tests for core domain controllers; Added integration tests for the gRPC UserService; Added migration verification tests for all database contexts.
Dependencies
Upgrade to .NET 10 and update core dependencies
The project has been upgraded to target .NET 10.0 across all components, including the Identity Servers (Duende and OpenIddict), Microservices architecture (Aspire AppHost, Gateways, and Services), and End-to-End tests. This upgrade is accompanied by updates to key dependencies such as Entity Framework Core, Microsoft.Extensions packages, and various Azure and OpenTelemetry libraries to their latest compatible versions.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 38.
Lenses
- Code Health 43
- Architecture 73
- Maturity 46
- Readiness 37
- Security 53
- Domain Modelling 40
- Event-Driven 69
- Accessibility 35
- Performance 60
Changes since last survey
- 300 commits — 298 feature/other, 2 fixes
By area
- src/Microservices — 72 commits
- src/Monolith — 68 commits
- src/UIs — 43 commits
- src/IdentityServer — 35 commits
- src/ModularMonolith — 22 commits
- src/IdentityServers — 18 commits
- .github/workflows — 14 commits
- (root) — 8 commits
- deployments/Azure — 4 commits
- docs/imgs — 2 commits
- src/EndToEndTests — 2 commits
- tools/aws-otel-collector — 2 commits
- tools/postgresql — 2 commits
- docs/OAuth 2.0 — 1 commit
- src/EndToEndApiTests — 1 commit
- tools/debezium — 1 commit
- tools/gitleaks — 1 commit
- tools/grafana alloy — 1 commit
- tools/kafka-single-node — 1 commit
- tools/markitdown — 1 commit
Notable commits
- fix: Adds more cancellation token usage Add consistancy to cancellationToken naming convention Few typos fixed up
- fix: fixed grafana alloy configuration
- change: (#186) Duende IdentityServer
- change: (#187) Adding Next.js
- change: (#195) Message Bus Encryption: RabbitMQ
- change: (#204) Upgrade .Net 8
- change: (#208) Migrate Bootstrap 4 to 5
- change: (#208) Migrate Bootstrap 4 to 5
- change: (#208) Migrate Bootstrap 4 to 5
- change: (#209) Idempotent Consumers
- change: (#209) Idempotent Consumers
- change: (#210) Webhooks
- change: (#211) Entity Framework Core Interceptors
- change: (#212) IHostApplicationLifetime
- change: (#212) IHostApplicationLifetime
- change: (#214) Upgrade Angular 17
- change: (#217) [Asp.Net Core 8] IExceptionHandler
- change: (#236) Migrate create-react-app to Vite
- change: (#236) Migrate create-react-app to Vite
- change: (#237) Upgrade Angular 18
- …and 280 more
API surface
- 54 HTTP endpoints (baseline)
Architecture
- 26 containers · 3 bounded contexts · 3 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
phongnguyend/Practical.CleanArchitecture was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit afedef18e2ce0b8de115597d082c76194eb4c852 — the exact code this score is about.
- Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.3+preprod-fddbc92cb8df.