Extract Product bounded context into the Product service - #89
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…gration and tests
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This was referenced Sep 10, 2026
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.
Summary
Extracts the Product bounded context out of
quickapp-monolithinto a self-contained service undersrc/Services/Product, perdocs/extraction-boundaries.md(PR #87).Product/ProductCategoryported fromQuickApp.Core/Models/Shop/. Intra-context navigations kept (Product ↔ ProductCategory,Product.Parent/Children); the cross-contextProduct.OrderDetailsnavigation is dropped — order lines reference products byProductIdonly.ProductDbContextnow mapsAppProducts/AppProductCategorieswith the monolith's column constraints (Name(100),Description(500),Icon(256), pricesdecimal(18,2), parentRestrict, categoryCascade) and stamps audit fields inSaveChanges(Async). EF Core migrationInitialProductSchema+ EF-backed repositories + an idempotentProductDbSeeder(categoriesNone/Cars, products BMW M6 / Nissan Patrol / one uncategorised sample) so the gateway returns rows on a fresh volume.GET|POST /api/products,GET|PUT|DELETE /api/products/{id}and the same set under/api/products/categories. Wire shape staysProductVM-compatible (incl. flattenedproductCategoryName), plusparentId/productCategoryIdwhich CRUD needs for assignment. Creating/updating a product with an unknownproductCategoryIdreturns 400.depends_ondoes not wait for Postgres readiness:Product.Tests(16 tests) overWebApplicationFactory, covering the read path and every CRUD verb for products and categories plus seeder idempotency.ProductDatabaseFixturestarts a Testcontainers Postgres and falls back to the EF in-memory provider when Docker is unavailable.No changes to
src/ApiGateway/**— the existing YARP route/api/products/{**catch-all}→http://product-service:5004/already works.Verification
dotnet build Services/Product/Product.API/Product.API.csproj -c Release→ 0 warnings, 0 errors.dotnet test Services/Product/Product.Tests/Product.Tests.csproj -c Release→ Passed! Failed: 0, Passed: 16, Skipped: 0.Through the gateway on port 5000 (compose stack):
Notes / known issues
docker compose -f src/docker-compose.yml up --buildcannot boot the whole stack onmain:notification-servicefails to build becauseNotification.API.csprojreferences..\..\Shared\...instead of..\..\..\Shared\...(pre-existing, out of this PR's allowed scope — flagged as the boundaries doc requires). Everything else (postgres,rabbitmq,identity,customer,order,product,api-gateway) builds and boots, and the curl evidence above was captured against that stack.mainafter it merges:src/Microservices.sln(this PR only addsProduct.Tests) and the one-line<ProjectReference>path fix insrc/Services/Product/Product.API/Product.API.csproj(..\..\Shared→..\..\..\Shared), which this build needs.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/ac94963abb93407fb387a85677193555
Open in Devin Desktop: https://partner-workshops.devinenterprise.com/desktop/session/ac94963abb93407fb387a85677193555?variant=devin
Requested by: @DhrovS