Skip to content
CAI
Software that uses CAICheck a score

mehdihadeli/food-delivery-microservices

45.5

Weak · 8 November 2026

15.6k

lines of production code

C#

with TypeScript

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a .NET 10-based food delivery microservices platform that manages product catalogs, customer profiles, and restock subscriptions. It exposes versioned APIs for CRUD operations on products and users, while handling asynchronous workflows like stock notifications and identity verification. The architecture includes dedicated Backend-for-Frontend services for web and mobile clients, supported by an API gateway and comprehensive observability infrastructure.

How it got here

2022–2023 — Aspire migration and tooling setup

9 changes.

The project was rebranded and modernized to target .NET 10, integrating .NET Aspire to orchestrate local development and infrastructure provisioning. This period focused on establishing robust development workflows through centralized dependency management, automated code quality checks, and comprehensive integration test infrastructure.

2024 — v1 API implementation and infrastructure setup

16 changes.

This period focused on implementing v1 API endpoints for the Catalog, Identity, and Customers services, introducing core features like product management, user identity, and restock subscriptions. Concurrently, the project established foundational infrastructure by deploying a YARP-based API gateway, migrating event handling to Wolverine, and creating initial Kubernetes deployment manifests.

2025–2026 — BFF architecture and SPA implementation

5 changes.

This period focused on establishing a Backend-for-Frontend (BFF) architecture with dedicated services for Web, Mobile, and SPA clients, supported by comprehensive observability and identity configurations. The React SPA was developed with new home, user profile, and product management features, integrated via the BFF layer. Standardized HTTP error handling using RFC 9457 Problem Details was also implemented to ensure a consistent user experience.

Features

Add product management UI and API integration

The React SPA now includes a complete set of components for managing products, including a paginated list view with low-stock and inactive status indicators, a detailed product view with image display, and forms for creating and editing product details. These components are backed by a new \productApiService\ that communicates with the backend via the SPA BFF gateway, supporting full CRUD operations (create, read, update, delete) and product search.

src/UIs/Spa/react-food-delivery/src/features/products · high confidence

Added HTTP client request files for API testing

New \.http\ files and environment configuration files have been added to the \\_httpclients\ directory to support manual API testing and development. These files define request templates for the Identity, Catalogs, and Customers services, covering authentication flows (Implicit, Client Credentials, PKCE) and CRUD operations for products, customers, and restock subscriptions. Environment variables for local development endpoints and secrets are now centralized in \http-client.env.json\ and \http-client.private.env.json\.

_\httpclients · high confidence

Automated devcontainer setup with .NET Aspire, fonts, and tooling

The development container environment now automatically configures essential tools and resources upon creation. It installs the .NET Aspire project templates and CLI tools (including 'aspirate'), sets up the MesloLGM Nerd Font for better terminal rendering, trusts HTTPS development certificates, and installs global utilities like the xunit v3 templates, the Just task runner, and the latest npm version. This streamlines the initial setup process for developers by ensuring all necessary dependencies and configurations are ready out of the box.

.devcontainer/scripts · high confidence

Customers service implements restock subscription and customer retrieval features

The Customers service now exposes endpoints to retrieve customers by ID or customer ID, and to list restock subscriptions with pagination and filtering. It also introduces a workflow for processing restock notifications: when stock is updated, the system marks relevant subscriptions as processed, sends email notifications to subscribed customers, and updates the MongoDB read model to reflect the processed state.

(repo-wide) · high confidence

Initial Kubernetes deployment manifests and Kustomize structure

This change introduces the foundational Kubernetes deployment configuration for the food-delivery microservices. It adds a \.env.prod\ file defining environment variables and ports for services like RabbitMQ, MongoDB, Postgres, and the application microservices (Catalogs, Customers, Identity, Orders). It includes raw Kubernetes manifests in \kubernetes/\ (e.g., \infrastructure.yaml\ for RabbitMQ/MongoDB deployments, services, and ingresses) and a \kubectl\ helper script for environment variable substitution. Additionally, it establishes a Kustomize structure under \kustomize/food-delivery/\ with base configurations and \dev\/\prod\ overlays for each microservice, enabling environment-specific deployments with name prefixes.

deployments/k8s · high confidence

Introduce .NET Aspire application host and service defaults for local development

Developers can now launch the entire food delivery ecosystem locally using .NET Aspire, which provisions and wires up infrastructure resources like Postgres, MongoDB, RabbitMQ, Redis, and observability tools (Jaeger, Zipkin, Prometheus, Grafana) automatically. This change adds the \FoodDelivery.AppHost\ project to orchestrate these services and the \FoodDelivery.ServiceDefaults\ library to provide shared configuration for health checks, OpenTelemetry diagnostics, HTTP logging, and resilient HTTP/gRPC client registration, ensuring consistent behavior across all microservices.

src/Services · high confidence

Introduce YARP-based API Gateway with BFF routing and observability

The ApiGateway service has been implemented using YARP (Yet Another Reverse Proxy) to route incoming requests to specific backend clusters, including dedicated routes for SPA, API, and mobile BFFs as well as identity and health check services. The gateway now automatically injects correlation IDs and forwards user context (X-User-Id) and authorization headers to downstream services. It also enforces CORS policies for React applications and integrates with OpenTelemetry for distributed tracing, exporting telemetry to OTLP, Zipkin, and Jaeger endpoints.

src/ApiGateway/FoodDelivery.ApiGateway · high confidence

Introduce dedicated BFF services for Web, Mobile, and SPA clients

This change introduces three new Backend-for-Frontend (BFF) services—Web, Mobile, and SPA—located in src/Bffs, each tailored to its client type. The Web BFF uses JWT Bearer authentication and typed HttpClient instances for direct microservice calls, while the Mobile BFF and SPA BFF utilize OpenID Connect with cookie-based sessions and Duende BFF middleware for secure token management and anti-forgery protection. All three services are configured with YARP reverse proxy settings to route requests to backend clusters (catalogs, customers, identity) and include specific OAuth options, telemetry configurations, and launch settings for local development.

src/Bffs, src/UIs · high confidence

Introduce v1 APIs for product creation and user retrieval

The Catalog service now exposes a new POST endpoint at /api/v1/catalog/products to create products, handling validation, domain logic, and persistence via a CQRS handler that emits a ProductCreated domain event. The Identity service adds a GET endpoint at /api/v1/users/{userId} to retrieve user details by ID, using a query handler that fetches the user from ASP.NET Core Identity and returns the DTO. Both endpoints are versioned at 1.0 and require specific authorization policies.

Services, src/Services/Catalogs/FoodDelivery.Services.Catalogs/Products/Features/CreatingProduct, src/Services/Identity/FoodDelivery.Services.Identity/Users/Features/GettingUserById · high confidence

New Docker and test automation scripts for development workflows

Added shell scripts to streamline local development and CI processes: \base-run.sh\, \debug-run.sh\, \dev-run.sh\, and \prod-run.sh\ provide standardized ways to start Docker containers with appropriate volume mounts for source code, debugging symbols (vsdbg), and NuGet packages, specifically supporting VS Code remote debugging. A new \lint-dockerfiles.sh\ script integrates hadolint to validate Dockerfiles, and \run-tests.sh\ automates .NET test execution with configurable coverage and verbosity settings.

scripts · high confidence

New home page and user session details view

The SPA now includes a new home page component that displays a hero banner, placeholder sections for categories and popular items, and a 'How It Works' feature overview. Additionally, a new user session view has been added to the user-profile feature, allowing users to see their current authentication claims in a table format with loading and error states.

src/UIs/Spa/react-food-delivery/src/features/home, src/UIs/Spa/react-food-delivery/src/features/user-profile · high confidence

New observability and identity configuration for deployment

This update introduces a comprehensive set of configuration files for the \deployments/configs\ area, establishing the infrastructure for application monitoring and identity management. It adds provisioning and dashboard definitions for Grafana (including ASP.NET Core, Node Exporter, PostgreSQL, and RabbitMQ metrics), along with configuration for the OpenTelemetry Collector, Prometheus, Loki, Tempo, and Jaeger to enable distributed tracing and logging. Additionally, it includes a Keycloak realm JSON file defining users and roles for the microservices, an SQL script to initialize PostgreSQL databases, and a Traefik gateway configuration to route traffic to the new BFF (Backend for Frontend) services.

deployments/configs · high confidence

New product catalog and identity API endpoints

This change introduces new API endpoints for the Catalog and Identity services. In the Catalog service, a new GET endpoint retrieves a paginated, filtered, and sorted view of products (GET /products-view), and command handlers are scaffolded for changing a product's brand, supplier, and restock/max thresholds. In the Identity service, a new GET endpoint (GET /claims) allows authenticated users to retrieve their current identity claims.

(repo-wide) · high confidence

New product catalog and identity management endpoints

This release introduces new API endpoints for the Catalog and Identity services. In the Catalog service, users can now retrieve products by ID, update product details (including name, price, stock, and associations), change product categories, and manage product stock levels via debit and replenish operations. In the Identity service, a new email verification flow has been added, allowing users to request and confirm email verification codes, alongside a new endpoint to retrieve user details by email address.

(repo-wide) · high confidence

New v1 API endpoints for product listing, customer retrieval, and restock subscription management

This change introduces new v1 API endpoints for the Catalogs and Customers services. In the Catalogs service, a new endpoint allows users to retrieve a paginated, filterable, and sortable list of products. In the Customers service, new endpoints enable retrieving a list of customers, fetching a specific restock subscription by its ID, deleting a single restock subscription, and bulk-deleting restock subscriptions based on a time range. These endpoints implement validation, authorization (where applicable), and integration with the underlying data models and read models.

(repo-wide) · high confidence

Project rebranded to Food Delivery Microservices with .NET 10 and Aspire support

The repository has been rebranded from 'Store Microservices' to 'Food Delivery Microservices', updating the README, solution file (food-delivery-microservices.slnx), and workspace configuration. The project targets .NET 10.0 (SDK 10.0.100) and integrates .NET Aspire, introducing new infrastructure for Docker, Kubernetes (Kustomize), and CI/CD workflows. Development tooling is standardized with CSharpier, StyleCop, and Husky, while the solution structure now includes dedicated folders for Aspire, EventCatalog, and HTTP clients.

(repo-wide) · high confidence

Behavioural changes

Add Husky pre-commit hooks for code formatting and analysis

The repository now enforces code style and analysis standards automatically before commits are accepted. A new Husky configuration runs C\# formatting via CSharpier, verifies code style consistency, and checks analyzers on every pre-commit, ensuring that submitted code meets the project's quality requirements without manual intervention.

.husky · high confidence

Adopt Wolverine for event consumption in customer and order services

The Customer and Orders services now use Wolverine to handle integration events, replacing the previous messaging implementation. New consumer classes (ProductCreatedConsumer, ProductStockReplenishedConsumer, CustomerCreatedConsumer) have been added to process incoming messages via the Wolverine framework, enabling automatic acknowledgment handling and integration with the CloudNativeKit sub-module for message execution.

src/Services/Customers/FoodDelivery.Services.Customers/Products/Features/CreatingProduct, src/Services/Customers/FoodDelivery.Services.Customers/Products/Features/ReplenishingProductStock, src/Services/Orders/FoodDelivery.Services.Orders/Customers/Features/CreatingCustomer · high confidence

ApiGateway Dockerfiles updated to .NET 10 and .NET 9 with build caching

The Dockerfiles for the ApiGateway have been updated to use the .NET 10.0 SDK and ASP.NET runtime images for production builds (Dockerfile) and .NET 9.0 for development builds (Dockerfile.dev). The development Dockerfile now includes NuGet package caching via BuildKit mounts to optimize build times, while both files retain the existing multi-stage build structure and entrypoint configuration.

src/ApiGateway · high confidence

Customers and Restock Subscription features migrated to CloudNativeKit minimal API pattern

The Customers service's Create, Update, and Get Restock Subscription endpoints have been rewritten to use the CloudNativeKit framework. This change introduces a new command/query handler pattern for business logic, replaces the previous endpoint implementation with CloudNativeKit's minimal API abstractions, and enforces inline validation using FluentValidation within the command/query objects. Users will see these features operating under the new v1 API structure with updated authorization requirements (e.g., admin-only for restock subscriptions) and consistent problem-detail error responses.

src/Services/Customers/FoodDelivery.Services.Customers/Customers/Features/CreatingCustomer/v1, src/Services/Customers/FoodDelivery.Services.Customers/Customers/Features/UpdatingCustomer, src/Services/Customers/FoodDelivery.Services.Customers/RestockSubscriptions/Features/GetRestockSubscriptionById · high confidence

New product price change event and stock query introduced

The catalog service now includes a new domain event, ProductPriceChanged, which validates that prices are positive before being recorded, and a new query, GetAvailableStockById, to retrieve the available stock for a specific product.

src/Services/Catalogs/FoodDelivery.Services.Catalogs/Products/Features/ChangingProductPrice, src/Services/Catalogs/FoodDelivery.Services.Catalogs/Products/Features/GettingAvailableStockById · high confidence

Standardized HTTP error handling with RFC 9457 Problem Details

The React food delivery UI now uses a consistent, standards-compliant approach for displaying API errors. A new shared library introduces RFC 9457 Problem Details support, providing a type definition and utility functions that automatically fill in missing status codes, titles, and error types with sensible defaults based on HTTP status codes (e.g., 400 Bad Request, 404 Not Found). This logic is integrated into the Axios HTTP client via response interceptors, which now detect Problem Details responses and display user-friendly toast notifications for any API errors, ensuring a uniform error experience across the application.

src/UIs/Spa/react-food-delivery/src/shared/libs/axios, src/UIs/Spa/react-food-delivery/src/shared/libs/problem-details · high confidence

Supplier event consumers migrated to Wolverine

The integration event consumers for supplier creation, deletion, and updates now use the Wolverine framework instead of the previous messaging library. These consumers handle incoming supplier events via the CloudNativeKit integration layer, ensuring that header propagation is maintained when processing external messages.

src/Services/Catalogs/FoodDelivery.Services.Catalogs/Suppliers/Features/SupplierCreated, src/Services/Catalogs/FoodDelivery.Services.Catalogs/Suppliers/Features/SupplierDeleted, src/Services/Catalogs/FoodDelivery.Services.Catalogs/Suppliers/Features/SupplierUpdated · high confidence

Test coverage

Added integration tests for customer retrieval features; Added test infrastructure for Catalogs and Customers services; Added unit tests for customer creation and update features; Added unit tests for customer retrieval features; New shared integration test infrastructure for authentication and containerized dependencies.

Dependencies

Centralized dependency management and .NET Aspire 9.4 integration

The project now uses centralized package version management via a new Directory.Packages.props file, setting the Aspire version to 9.4. The Aspire hosting infrastructure has been updated to use the Aspire.AppHost.Sdk version 9.4 and includes references to Azure, Docker, and Kubernetes hosting packages. Additionally, the API Gateway and BFF services now reference Duende.BFF.Yarp and Duende.AccessTokenManagement.OpenIdConnect, while the core services reference CloudNativeKit building blocks for integration, caching, and persistence.

(dependencies) · high confidence

Housekeeping

Initialize src directory with submodules and build props

The src directory is initialized with a new submodule reference (BuildingBlocks) and standard MSBuild import files (Directory.Build.props and Directory.Build.targets) to support the project's build structure.

src · 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

Score

  • CAI 45 → 46 (+0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 59 → 59 (-0.0)
  • Architecture 59 → 52 (-7.4)
  • Maturity 50 → 70 (+20.1)
  • Readiness 61 → 62 (+1.4)
  • Security 54 → 51 (-2.9)
  • Domain Modelling 87 → 87 (+0.0)
  • Accessibility 34 → 34 (-0.4)
  • Performance 75 → 77 (+2.2)

Resolved (37)

  • High CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • High CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • High CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • Inconsistent verb tense and grammar in test method names. Some tests use the base form 'must_throw' or 'must_success', while others use the third-person singular 'must_returns'. Additionally, 'must_fail_with_invalid_max_lenght_phone_number' contains a spelling error ('lenght' instead of 'length').
  • Medium CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • No assertions: should_consume_by_existing_consumer_through_the_broker (tests/Services/Customers/FoodDelivery.Services.Customers.IntegrationTests/Users/Features/RegisteringUser/v1/Events/External/UserRegisteredTests.cs)
  • No assertions: should_create_new_customer_in_postgres_write_db_when_after_consuming_message (tests/Services/Customers/FoodDelivery.Services.Customers.IntegrationTests/Users/Features/RegisteringUser/v1/Events/External/UserRegisteredTests.cs)
  • No assertions: should_create_new_mongo_customer_read_model_in_the_mongodb_after_consuming_message (tests/Services/Customers/FoodDelivery.Services.Customers.IntegrationTests/Users/Features/RegisteringUser/v1/Events/External/UserRegisteredTests.cs)
  • No assertions: should_schedule_mongo_customer_read_model_processing_after_consuming_message (tests/Services/Customers/FoodDelivery.Services.Customers.IntegrationTests/Users/Features/RegisteringUser/v1/Events/External/UserRegisteredTests.cs)
  • Split FoodDelivery.Services.Catalogs
  • Split FoodDelivery.Services.Customers
  • Test reliability not measured — test suite did not build
  • XML-doc coverage: FoodDelivery.Api.Bff (src/Bffs/Api.Bff/FoodDelivery.Api.Bff/FoodDelivery.Api.Bff.csproj)
  • XML-doc coverage: FoodDelivery.ApiGateway (src/ApiGateway/FoodDelivery.ApiGateway/FoodDelivery.ApiGateway.csproj)
  • XML-doc coverage: FoodDelivery.AppHost (src/Aspire/FoodDelivery.AppHost/FoodDelivery.AppHost.csproj)
  • XML-doc coverage: FoodDelivery.BlazorWebApp (src/UIs/BlazorWebApp/FoodDelivery.BlazorWebApp/FoodDelivery.BlazorWebApp.csproj)
  • XML-doc coverage: FoodDelivery.ServiceDefaults (src/Aspire/FoodDelivery.ServiceDefaults/FoodDelivery.ServiceDefaults.csproj)
  • XML-doc coverage: FoodDelivery.Services.Billing (src/Services/Billing/FoodDelivery.Services.Billing/FoodDelivery.Services.Billing.csproj)
  • XML-doc coverage: FoodDelivery.Services.Carts (src/Services/Carts/FoodDelivery.Services.Carts/FoodDelivery.Services.Carts.csproj)
  • XML-doc coverage: FoodDelivery.Services.Catalogs (src/Services/Catalogs/FoodDelivery.Services.Catalogs/FoodDelivery.Services.Catalogs.csproj)
  • …and 17 more

New (20)

  • Documentation: no build, run or usage example (src/Bffs/Api.Bff/FoodDelivery.Api.Bff/readme.md)
  • Duplicated block (10 lines × 2) (src/Bffs/Api.Bff/FoodDelivery.Api.Bff/Program.cs)
  • Duplicated block (6 lines × 2) (src/Services/Customers/FoodDelivery.Services.Customers.Api/Program.cs)
  • High CVE: [CVE redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • High CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • High CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • High CVE: [GHSA redacted] (src/UIs/Spa/react-food-delivery/package-lock.json)
  • Projects may be oversized for their cohesion (src/Services/Catalogs/FoodDelivery.Services.Catalogs/FoodDelivery.Services.Catalogs.csproj)
  • Projects may be oversized for their cohesion (src/Services/Customers/FoodDelivery.Services.Customers/FoodDelivery.Services.Customers.csproj)
  • doc comments repeat the names (src/Services/Catalogs/FoodDelivery.Services.Catalogs/Products/Models/Product.cs)
  • doc comments repeat the names (src/Services/Customers/FoodDelivery.Services.Customers/Customers/Features/CreatingCustomer/v1/CreateCustomer.cs)
  • doc comments repeat the names (src/Services/Identity/FoodDelivery.Services.Identity.Api/Pages/Telemetry.cs)
  • doc comments repeat the names (src/Services/Identity/FoodDelivery.Services.Identity/Identity/Features/VerifyingEmail/v1/VerifyEmail.cs)
  • doc comments repeat the names (src/Services/Shared/FoodDelivery.Services.Shared/Catalogs/Products/Events/Integration/v1/ProductCreatedV1.cs)
  • doc comments repeat the names (tests/Shared/Tests.Shared/Extensions/ApplicationBuilderExtensions.cs)
  • redundant comment (src/Bffs/Spa.Bff/FoodDelivery.Spa.Bff/Extensions/HostApplicationBuilderExtensions/AuthenticationExtensions.cs)
  • redundant comment (src/Services/Identity/FoodDelivery.Services.Identity.Api/Pages/Account/Logout/Index.cshtml.cs)
  • redundant comment (src/Services/Identity/FoodDelivery.Services.Identity/Identity/Features/SendingEmailVerificationCode/v1/SendEmailVerificationCode.cs)
  • redundant comment (src/Services/Identity/FoodDelivery.Services.Identity/Users/Features/RegisteringUser/v1/RegisterUser.cs)
  • redundant comment (src/UIs/BlazorWebApp/FoodDelivery.BlazorWebApp/Extensions/WebApplicationBuilderExtensions/AuthenticationExtensions.cs)

API surface

  • Unchanged — 20 HTTP endpoints

Architecture

  • Unchanged — 23 containers · 1 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

mehdihadeli/food-delivery-microservices 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 a5750a994acfb64c8d939a3b622bbd0504ce1796 — 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.