mauroservienti/all-our-aggregates-are-wrong-demos
53.7
Adequate · 8 November 2026
2.2k
lines of production code
C#
primary language
7
measurements over time
What this system is
Features
Add Dev Container support with .NET 10 and multi-service infrastructure
Developers can now launch the project in a standardized VS Code Dev Container environment. The setup provisions a .NET 10 runtime, connects to a RabbitMQ 3.13 management instance, and spins up six isolated PostgreSQL databases (marketing, sales, shipping, warehouse, and webapp) via dedicated environment files, providing a complete local development stack out of the box.
.devcontainer · high confidence
Add home, product details, and shopping cart controllers
New ASP.NET Core controllers have been introduced to handle core navigation and shopping flows. The HomeController exposes the root index and an error page, the ProductsController provides a route for viewing product details by ID, and the ShoppingCartController manages the cart view and supports adding items via a POST endpoint.
src/WebApp/Controllers · high confidence
Add shopping cart view pages
Users can now view their shopping cart contents and see a confirmation message after adding an item. The new Index.cshtml page displays a list of cart items including product details, quantity, price, shipping estimate, and availability, or shows a message if the cart is empty. The new Add.cshtml page provides a confirmation screen with a link to view the cart.
src/WebApp/Views/ShoppingCart · high confidence
AddItemToCart command message introduced
A new command message class, AddItemToCart, has been added to the Warehouse.Messages library to support adding items to a shopping cart. This message carries the necessary context for the operation, including the ProductId, Quantity, CartId, and a unique RequestId.
src/Warehouse.Messages · high confidence
Added SQL script to initialize core application databases
A new SQL script, Setup-Databases.sql, has been added to the scripts directory. This script automates the creation of four core databases required for the application: Sales, Warehouse, Shipping, and Marketing. Running this script against the master database will provision these empty databases, simplifying the initial environment setup for developers and deployment pipelines.
scripts · high confidence
Added database initialization tool for demo services
A new console application has been added to the solution to manually create the required database tables for the Sales, Marketing, Shipping, and Warehouse services. This tool addresses a specific issue in the demo environment where Entity Framework's \EnsureCreated\ might fail to initialize the database if NServiceBus persistence has already populated it, ensuring that the necessary schema exists before the services attempt to use it.
src/CreateRequiredDatabases · high confidence
Added default ASP.NET Core web application layout and static assets
The application now includes the standard Razor view structure and static web assets. This adds a shared layout (\_Layout.cshtml) featuring a responsive Bootstrap navigation bar with links to Home and My Cart, along with an Error view for handling request failures. Additionally, the wwwroot folder now contains the necessary CSS (site.css), JavaScript (site.js), and banner images (banner1-4.svg) required to render the default site theme and functionality.
src/WebApp/Views/Shared, src/WebApp/wwwroot · high confidence
Added handlers for adding items to and deactivating shopping carts
The service now includes handlers to process adding items to a shopping cart and handling cart deactivation. The new AddItemToCartHandler processes AddItemToCart messages, ensuring idempotency via RequestId, creating the cart if necessary, and publishing a ProductAddedToCart event. The ShoppingCartGotInactiveHandler processes ShoppingCartGotInactive messages to remove inactive carts from the database.
src/Sales.Service/Handlers · high confidence
Added handlers for shopping cart item addition and inactivity cleanup
The Shipping Service now includes handlers to process shopping cart operations. The new AddItemToCartHandler processes commands to add items to a cart, calculating delivery estimates based on product shipping options and ensuring idempotency via request IDs. Additionally, the ShoppingCartGotInactiveHandler listens for inactivity events to automatically wipe cart items from the database, providing a mechanism to clean up abandoned or inactive carts.
src/Shipping.Service/Handlers · high confidence
Added shipping options and shopping cart item models
The Shipping.Data.Models namespace now includes ProductShippingOptions and ShoppingCartItem classes. ProductShippingOptions defines the structure for product-specific shipping configurations, including individual options with estimated delivery timeframes. ShoppingCartItem represents an item within a shopping cart, tracking product ID, quantity, and delivery estimates.
src/Shipping.Data/Models · high confidence
Added shopping cart lifecycle event interfaces
New event interfaces have been introduced to the Sales.Messages.Events library to support the shopping cart lifecycle: ProductAddedToCart (carrying CartId and ProductId), ShoppingCartGotInactive, and ShoppingCartGotStale (both carrying CartId). These interfaces define the contract for events signaling product additions and cart inactivity/staleness.
src/Sales.Messages.Events · high confidence
Display product details on the home page
The home page now lists available products, showing each product's name as a link to its details page, its description formatted as an H4 heading, and its price in dollars.
src/WebApp/Views/Home · high confidence
Initial Shipping API service setup with ASP.NET Core hosting
The Shipping.Api project is introduced with a standard ASP.NET Core web application structure. It configures the host using generic hosting principles and sets up the web server to use the Startup class for configuration. The service enables MVC controllers, adds routing, and configures CORS to allow requests from any origin. In development environments, it also enables the developer exception page for debugging.
src/Shipping.Api · high confidence
Initial Warehouse API service setup
The Warehouse.Api project has been introduced with a standard ASP.NET Core structure, including Program.cs for host creation and Startup.cs for configuration. The service is configured to use routing, enable CORS for all origins, and map controllers via the endpoint routing middleware. Development-specific error pages are enabled when running in the development environment.
src/Warehouse.Api · high confidence
Initial Warehouse data layer with PostgreSQL support
The Warehouse.Data project now provides the foundational data access layer, introducing a new WarehouseContext that connects to a PostgreSQL database via Npgsql. This context manages StockItem and ShoppingCartItem entities, includes seed data for initial stock levels, and configures identity generation for shopping cart items.
src/Warehouse.Data · high confidence
Initial setup of marketing event models and Razor view infrastructure
This change introduces the foundational structure for the marketing view composition layer. It adds the \AvailableProductsLoaded\ event class to the \Marketing.ViewModelComposition.Events\ namespace, which carries a dictionary of available product view models. Additionally, it establishes the Razor view engine configuration for the WebApp by creating \\_ViewImports.cshtml\ (enabling the WebApp namespace and MVC tag helpers) and \\_ViewStart.cshtml\ (setting the default layout to \\_Layout\), preparing the view layer for rendering marketing content.
src/Marketing.ViewModelComposition.Events, src/WebApp/Views · high confidence
Initial shipping data model and cart messaging support
The Shipping service now includes a foundational data layer using PostgreSQL via Entity Framework Core, defining entities for product shipping options and shipping methods with initial seed data. Additionally, a new message command for adding items to a shopping cart has been introduced to support cart-related interactions within the shipping domain.
src/Shipping.Data · high confidence
Introduction of ShoppingCartItem and StockItem data models
The Warehouse data layer now includes dedicated models for shopping cart and stock management. A new ShoppingCartItem class defines the structure for individual cart entries, including product and quantity details, while a new StockItem class models inventory records linked to products via a ProductId. These changes establish the foundational data structures for tracking cart contents and warehouse stock levels.
src/Warehouse.Data/Models · high confidence
Marketing service now reacts to inactive and stale shopping carts
The Marketing.Service has been introduced to monitor shopping cart activity via NServiceBus. It now includes handlers that trigger specific console notifications when a cart becomes inactive (logged in red) or stale (logged in yellow), allowing the marketing team to identify potential lost customers or opportunities for re-engagement.
src/Marketing.Service · high confidence
New API endpoints for listing and retrieving product details
Added two new API controllers to expose product data. The AvailableProductsController provides a GET endpoint at /api/available/products to return a list of all product IDs. The ProductsDetailsController adds GET endpoints at /api/product-details/product/{id} to retrieve a single product by ID and at /api/product-details/products/{ids} to retrieve multiple products by a comma-separated list of IDs.
src/Marketing.Api/Controllers · high confidence
New API endpoints for product pricing and shopping cart retrieval
The API now exposes two new controllers to support product pricing queries and shopping cart management. The PricesController provides endpoints to fetch individual product prices by ID and bulk prices for multiple products via comma-separated IDs. The ShoppingCartController allows clients to retrieve the contents of a specific shopping cart, including aggregated item details such as product ID, total quantity, and current/last known prices.
src/Sales.Api/Controllers · high confidence
New AddItemToCart command message
A new \AddItemToCart\ command message has been added to the \Sales.Messages.Commands\ namespace, enabling the system to process requests to add items to a shopping cart. This message carries the necessary context for the operation, including the \CartId\, \ProductId\, \Quantity\, and a \RequestId\ for tracking.
src/Sales.Messages · high confidence
New ViewModel Composition handlers for product details, pricing, and cart operations
This change introduces a set of new composition handlers in the Sales and Marketing areas to enrich view models with product details, prices, and cart data. The Marketing area now fetches available products and enriches them with names and descriptions via a subscriber. The Sales area adds handlers to retrieve product prices, load shopping cart items (including price change indicators), and process 'Add to Cart' requests using NServiceBus.TransactionalSession to send commands directly from the composition layer.
src/Sales.ViewModelComposition · high confidence
New inventory and shopping cart API endpoints
Added InventoryController and ShoppingCartController to expose warehouse data. The InventoryController provides endpoints to retrieve stock items by a single product ID or a comma-separated list of IDs. The ShoppingCartController adds an endpoint to fetch cart items for specified product IDs, grouping them by product and returning the associated inventory details.
src/Warehouse.Api/Controllers · high confidence
New product details page with cart and shipping info
A new product details view has been added that displays the product name, description, price, and inventory status. Users can now select a quantity and add the item directly to their shopping cart from this page. The view also explicitly shows available shipping options for the product.
src/WebApp/Views/Products · high confidence
New shipping options and shopping cart API endpoints
Added two new API controllers to expose shipping and cart data. The ProductShippingOptionsController provides endpoints to retrieve shipping options for a single product or a batch of products via the /api/shipping-options route. The ShoppingCartController adds a new endpoint at /api/shopping-cart/products/{ids} to fetch delivery estimates for specific products currently in the shopping cart.
src/Shipping.Api/Controllers · high confidence
Warehouse ViewModel Composition: Product details and cart integration
The Warehouse.ViewModelComposition module now handles product inventory lookups and shopping cart item enrichment. Product details are fetched via a new handler that calls the inventory service to populate stock status. Additionally, cart operations are integrated: adding an item to the cart sends a command to the Warehouse Service using NServiceBus TransactionalSession, and loading cart items enriches the view model with real-time inventory counts from the inventory service.
src/Warehouse.ViewModelComposition · high confidence
Warehouse service now supports shopping cart operations
The Warehouse service has added handlers to process shopping cart commands and events. It can now add items to a cart via the AddItemToCartHandler, which checks for duplicate requests and persists item details, and remove items via the ShoppingCartGotInactiveHandler, which wipes cart contents upon receiving an inactivity event.
src/Warehouse.Service/Handlers · high confidence
Behavioural changes
Automated expiration of inactive shopping carts
The system now automatically manages the lifecycle of shopping carts using a new saga. When a product is added to a cart, the system tracks the last activity time. If the cart remains inactive for 30 seconds, a 'ShoppingCartGotStale' event is published. If inactivity persists for 60 seconds, a 'ShoppingCartGotInactive' event is published and the cart is marked as complete, ensuring stale data is cleaned up automatically.
src/Sales.Service/Policies · high confidence
Centralized NServiceBus configuration with PostgreSQL persistence and transactional sessions
A new shared configuration class, CommonEndpointSettings, standardizes endpoint setup by applying common behaviors such as message auditing, error handling, Newtonsoft JSON serialization, and heartbeat/metrics reporting to ServiceControl. It configures the transport for receive-only transactions to support the outbox pattern and introduces PostgreSQL as the persistence layer using Npgsql, including specific JSONB parameter handling. Additionally, it enables NServiceBus Transactional Sessions and the Outbox for reliable message sending.
src/NServiceBus.Shared · high confidence
IdSetterViewModelPreviewHandler now extracts the view model from the request
The IdSetterViewModelPreviewHandler has been updated to automatically retrieve the composed response model from the incoming HTTP request, rather than requiring it to be passed as a separate parameter. This simplifies the handler's interface and ensures the preview logic operates on the correct, contextually composed view model instance.
src/ITOps.ViewModelComposition · high confidence
Introduce PostgreSQL-backed data layer with seed data
The Marketing.Data module now uses Entity Framework Core with the Npgsql provider to connect to a PostgreSQL database (localhost:6432) instead of the previous database engine. The new MarketingContext class configures this connection and seeds the ProductsDetails table with two initial records (Banana Holder and Nokia Lumia 635) via OnModelCreating. A new ProductDetails model class defines the entity structure with Id, Name, and Description properties.
src/Marketing.Data · high confidence
Introduce PostgreSQL-backed data models for product pricing and shopping carts
The application now uses PostgreSQL as its database backend, configured via a hardcoded connection string in the SalesContext. New entity models have been added to support product pricing (ProductPrice) and shopping cart functionality (ShoppingCart and ShoppingCartItem), including a one-to-many relationship between carts and their items with cascade deletion. Initial seed data for product prices is also included in the context configuration.
src/Sales.Data · high confidence
Migrate Sales.Api to generic host and modern ASP.NET Core startup
The Sales.Api project has been updated to use the generic host model (IHostBuilder) instead of the legacy WebHost builder, aligning its startup behavior with other services in the solution. This change involves replacing the previous Program.cs and Startup.cs implementations with standard ASP.NET Core templates that configure logging, routing, CORS (allowing all origins), and controller endpoints, ensuring consistent hosting infrastructure across the application.
src/Sales.Api · high confidence
Sales Service initializes with PostgreSQL persistence and saga state auditing
The Sales Service now starts as an NServiceBus endpoint configured to use PostgreSQL (host localhost, port 7432) for persistence and automatically audits saga state changes to the Particular.ServiceControl queue. The service console title is set to the service name for easier identification.
src/Sales.Service · high confidence
Shipping service integrates with cart via ViewModel Composition
The Shipping service now participates in the e-commerce flow by using ServiceComposer.AspNetCore to react to cart events and serve product details. When items are added to the cart, a subscriber uses NServiceBus.TransactionalSession to send an AddItemToCart command to the Shipping Service in a transactional manner. When cart items are loaded, another subscriber fetches shipping estimates from the internal API and updates the cart view model with delivery estimates. Additionally, a new handler exposes a product details endpoint that retrieves and composes shipping options for a specific product.
src/Shipping.ViewModelComposition · high confidence
Shipping service now uses PostgreSQL persistence with custom health checks and recoverability settings
The Shipping service has been updated to use PostgreSQL as its persistence backend, replacing the previous SQL client configuration. This change includes the addition of a custom health check (MyCustomCheck) that verifies the existence of a specific integration directory, and the configuration of recoverability settings with immediate and delayed retry policies. The service now reports custom checks to ServiceControl and uses a connection string for PostgreSQL.
src/Shipping.Service · high confidence
Solution renamed and NuGet feed configuration updated
The solution file has been renamed from 'All our Aggregates are Wrong - Demos.sln' to 'All-our-Aggregates-are-Wrong-Demos.sln', and the associated startup configuration file has been removed. Additionally, the NuGet package sources have been updated to replace the Particular MyGet feed with feedz.io feeds for both Particular Software and ServiceComposer pre-releases, and a package source mapping has been added to explicitly route all packages to these sources.
src · high confidence
Transactional HTTP sessions and automatic cart identification
The WebApp now ensures that every POST request is wrapped in a database transaction via a new TransactionalSessionMiddleware, automatically committing or rolling back changes based on request success. Additionally, a ShoppingCartMiddleware guarantees that every user session has a persistent cart identifier by setting a 'cart-id' cookie if one is missing. These changes are supported by new JSON utilities for handling camelCase-to-PascalCase conversion and a shift to libman for client-side library management.
src/WebApp · high confidence
Warehouse Service initializes with PostgreSQL-backed NServiceBus
The Warehouse Service now starts as an NServiceBus endpoint configured to use PostgreSQL for persistence, connecting to a local instance on port 9432 with the specified database credentials. This establishes the foundational messaging infrastructure for the service.
src/Warehouse.Service · high confidence
Test coverage
Added integration tests for WebApp composition endpoints
Added a new test suite, CompositionIntegrationTests, which validates the WebApp's ability to compose data from external services. The tests verify that the root page lists available products, the shopping cart correctly displays items and handles missing shipping inventory details, and product detail pages render specific product information such as price and stock status. These tests use stubbed API servers to simulate responses from sales, marketing, shipping, and warehouse services.
src/WebApp.Tests · high confidence
Dependencies
Upgrade to .NET 10 and update core dependencies
The application projects have been migrated to target .NET 10.0. This update includes upgrading NServiceBus to version 10.2.9, ServiceComposer.AspNetCore to 5.2.2, and Npgsql.EntityFrameworkCore.PostgreSQL to 10.0.3. Additionally, the test infrastructure has been updated to use xunit 2.9.3, xunit.runner.visualstudio 4.0.0, and coverlet.collector 10.0.1.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 52 → 54 (+2.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 61 → 65 (+3.7)
- Architecture 87 → 87 (-0.0)
- Maturity 52 → 59 (+7.6)
- Readiness 45 → 45 (+0.0)
- Security 58 → 58 (+0.0)
- Accessibility 59 → 59 (+0.0)
- Performance 100 → 100 (+0.0)
Resolved (52)
- Dead code: AddItemToCartHandler (src/Sales.Service/Handlers/AddItemToCartHandler.cs)
- Dead code: AddItemToCartHandler (src/Shipping.Service/Handlers/AddItemToCartHandler.cs)
- Dead code: AddItemToCartHandler (src/Warehouse.Service/Handlers/AddItemToCartHandler.cs)
- Dead code: AvailableProductsGetHandler (src/Marketing.ViewModelComposition/AvailableProductsGetHandler.cs)
- Dead code: AvailableProductsLoadedSubscriber (src/Marketing.ViewModelComposition/AvailableProductsLoadedSubscriber.cs)
- Dead code: AvailableProductsLoadedSubscriber (src/Sales.ViewModelComposition/AvailableProductsLoadedSubscriber.cs)
- Dead code: Configure (src/WebApp/Startup.cs)
- Dead code: IdSetterViewModelPreviewHandler (src/ITOps.ViewModelComposition/IdSetterViewModelPreviewHandler.cs)
- Dead code: MyCustomCheck (src/Shipping.Service/MyCustomCheck.cs)
- Dead code: ProductDetailsGetHandler (src/Marketing.ViewModelComposition/ProductDetailsGetHandler.cs)
- Dead code: ProductDetailsGetHandler (src/Sales.ViewModelComposition/ProductDetailsGetHandler.cs)
- Dead code: ProductDetailsGetHandler (src/Shipping.ViewModelComposition/ProductDetailsGetHandler.cs)
- Dead code: ProductDetailsGetHandler (src/Warehouse.ViewModelComposition/ProductDetailsGetHandler.cs)
- Dead code: ShoppingCartAddPostHandler (src/Sales.ViewModelComposition/ShoppingCartAddPostHandler.cs)
- Dead code: ShoppingCartGetHandler (src/Sales.ViewModelComposition/ShoppingCartGetHandler.cs)
- Dead code: ShoppingCartGotInactiveHandler (src/Marketing.Service/Handlers/ShoppingCartGotInactiveHandler.cs)
- Dead code: ShoppingCartGotInactiveHandler (src/Sales.Service/Handlers/ShoppingCartGotInactiveHandler.cs)
- Dead code: ShoppingCartGotInactiveHandler (src/Shipping.Service/Handlers/ShoppingCartGotInactiveHandler.cs)
- Dead code: ShoppingCartGotInactiveHandler (src/Warehouse.Service/Handlers/ShoppingCartGotInactiveHandler.cs)
- Dead code: ShoppingCartGotStaleHandler (src/Marketing.Service/Handlers/ShoppingCartGotStaleHandler.cs)
- …and 32 more
New (2)
- Documentation: no build, run or usage example (README.md)
- High: security finding (details withheld)
Changes since last survey
- 11 commits — 11 feature/other, 0 fixes
By area
- .github/workflows — 7 commits
- src/ITOps.Middlewares — 1 commit
- src/Marketing.Service — 1 commit
- src/NServiceBus.Shared — 1 commit
- src/WebApp.Tests — 1 commit
Notable commits
- change: Update actions/add-to-project action to v2 (#692)
- change: Update actions/add-to-project action to v2.0.1 (#700)
- change: Update actions/setup-dotnet action to v6.1.0 (#698)
- change: Update dependency Microsoft.AspNetCore.Mvc.Testing to 10.0.14 (#689)
- change: Update dependency NServiceBus.Newtonsoft.Json to 5.0.2 (#699)
- change: Update dependency NServiceBus.Persistence.Sql to 9.0.6 (#693)
- change: Update dependency NServiceBus.Persistence.Sql.TransactionalSession to 9.0.6 (#694)
- change: Update renovatebot/github-action action to v46.3.10 (#690)
- change: Update renovatebot/github-action action to v46.3.11 (#695)
- change: Update renovatebot/github-action action to v46.3.12 (#697)
- change: chore: add issues and PRs to the project board (#691)
API surface
- Unchanged — 11 HTTP endpoints
Architecture
- Unchanged — 12 containers · 0 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mauroservienti/all-our-aggregates-are-wrong-demos 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 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f4d954299e4dfee39dd138beddf4f6e4a8af9911 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.