Conversation
…aggregate roots and other regular entities. Moved domain events into AR to better represent its responsibilities. REFACTOR: Separated Entities and ValueObjects into different namespaces. REFACTOR: Moved Application DTOs to corresponding feature folders for a better location and maintenance ease. REFACTOR: To better match aggregate roots reponsibilities, the Product entity has been refactored as its own AR and modified the entire relationship and business logic it had against Company. All related tests and configurations have been modified accordingly. DOCS: Documentation has been added to several base classes to improve DX. UPDATE: Dependencies have been updated. REFACTOR: CommandResults converted to records to better represent their concept as DTOs. REFACTOR: Worker service project renamed from Service to Worker for better understanding. REFACTOR: BlobStorageService refactored to remove temp folder and instead represent the temporal status only in database, making easier the files management at the storage level. No more moving files to make them permanent. Added a path variable to allow setting the path of the blob within the container.
…tralization of infrastructure tests into application layer tests.
...ntent/Backend/Solution/Monaco.Template.Backend.Application/Features/Company/DeleteCompany.cs
Show resolved
Hide resolved
...on/Monaco.Template.Backend.Application.Tests/Features/Company/DeleteCompanyValidatorTests.cs
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.IntegrationTests/ApiRoutes.cs
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain/Model/Entity.cs
Show resolved
Hide resolved
...olution/Monaco.Template.Backend.Application/Features/Product/Extensions/ProductExtensions.cs
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.IntegrationTests/Tests/ProductsTests.cs
Show resolved
Hide resolved
...tion/Monaco.Template.Backend.Application.Tests/Features/Product/CreateProductHandlerTests.cs
Outdated
Show resolved
Hide resolved
...tent/Backend/Solution/Monaco.Template.Backend.Application/Services/Contracts/IFileService.cs
Outdated
Show resolved
Hide resolved
...Backend/Solution/Monaco.Template.Backend.Common.BlobStorage/Contracts/IBlobStorageService.cs
Outdated
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.Common.BlobStorage/BlobStorageService.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull Request Overview
This PR performs a comprehensive refactoring of the Monaco template to improve architectural structure and domain-driven design implementation. The changes consolidate project structure, enhance domain modeling, and simplify file management.
- Merged three Application projects into a single one to simplify solution structure and better align with Vertical Slices Architecture
- Introduced AggregateRoot base class to properly distinguish aggregate roots from regular entities and centralize domain events management
- Refactored Product entity as its own aggregate root with enhanced business logic and better relationship management with Company
- Reorganized namespaces to separate Entities and ValueObjects for better domain organization
Reviewed Changes
Copilot reviewed 149 out of 152 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Monaco.Template.Backend.sln | Removes separate Infrastructure and Migrations projects, consolidates into Application |
| Monaco.Template.Backend.Worker/* | Renames Service project to Worker for better clarity |
| Domain/Model/Entities/* | Moves entities to dedicated namespace and converts to aggregate roots |
| Domain/Model/ValueObjects/* | Separates value objects into dedicated namespace |
| Application/Features//DTOs/ | Moves DTOs to feature-specific folders for better organization |
| Application/Persistence/* | Consolidates persistence layer into Application project |
| Common.Domain/Model/* | Introduces AggregateRoot base class and enhances Entity with documentation |
| Common.BlobStorage/* | Simplifies blob storage by removing temp folder concept |
Files not reviewed (1)
- src/Content/Backend/Solution/Monaco.Template.Backend.Application/Persistence/Migrations/20250524100737_Init.Designer.cs: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/Content/Backend/Solution/Monaco.Template.Backend.Domain/Model/ValueObjects/Address.cs
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.Domain/Model/Entities/Product.cs
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.Application/Services/FileService.cs
Outdated
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.Common.Domain/Model/Entity.cs
Show resolved
Hide resolved
...tent/Backend/Solution/Monaco.Template.Backend.Common.Infrastructure/Context/BaseDbContext.cs
Show resolved
Hide resolved
src/Content/Backend/Solution/Monaco.Template.Backend.IntegrationTests/Tests/ProductsTests.cs
Show resolved
Hide resolved
matthewtoghill
approved these changes
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR performs several refactors about multiple topics I wanted to improve for some time after some additional experience that I believe should help simplify things in areas like project structure, concepts implementation, samples implementations, etc. as well as including some documentation for the internal libraries.