Skip to content
CAI
Software that uses CAICheck a score

mehdihadeli/spring-food-delivery-microservices

57.9

Adequate · 21 September 2026

16.9k

lines of production code

Java

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Spring Boot-based microservices architecture for food delivery, comprising distinct services for users, customers, and a product catalog. It implements a clean architecture with a command/query bus pattern, supporting full lifecycle management of categories and products, including creation, retrieval, updates, and deletion. The system is secured via an API Gateway with JWT authentication and role-based access control, while maintaining observability through OpenTelemetry and centralized logging.

Features

Add category management features

The catalog service now supports full lifecycle management of categories. Users can create, retrieve (by ID or paginated list), update, and delete categories via new REST endpoints. The implementation includes command/query handlers, request/response models, and domain events (CategoryCreated, CategoryDetailsUpdated) to track changes.

(repo-wide) · high confidence

Add observability and monitoring infrastructure

The deployment now includes comprehensive observability support by adding configuration files for the OpenTelemetry Collector, Prometheus, Grafana dashboards, and Loki. This enables metrics, logs, and traces to be collected and visualized via tools like Jaeger, Zipkin, and the Aspire Dashboard.

deployments · high confidence

Added HTTP client files for microservices

New .http files have been added to the clients/restclients directory to facilitate testing and development of the microservices. These include api-gateway.http, catalogs.http, users.http, and keycloak.http, which define HTTP requests for interacting with the API Gateway, Catalogs, Users, and Keycloak authentication endpoints. An environment configuration file (http-client.env.json) is also added to manage local and development variables such as addresses and secrets.

clients · high confidence

Added Maven Wrapper and build configuration to services

Added Maven Wrapper (mvnw) scripts, .gitattributes, and .gitignore files to the catalogs and customers service directories. This enables developers to build the services using a consistent, project-specified version of Apache Maven (version 3.9.9) without requiring a pre-installed JDK or Maven on the developer's machine.

services · high confidence

Catalogs API service initialization and restructuring

The Catalogs API service has been initialized with new database schema migrations for categories, products, product reviews, and message persistence tables, alongside updated application configuration files for local, development, test, and production environments. The service entry point and package structure have been reorganized to align with the new folder layout, and test fixtures for product creation have been added to support the new domain models.

services/catalogs/api · high confidence

Initial devcontainer configuration for Java development

Added a complete development container setup for a Spring Food Delivery Microservices project. This includes a Dockerfile based on the latest Java image, a devcontainer.json configuration that installs Java, Node.js, GitHub CLI, and Git, along with VS Code extensions for Java, Maven, Gradle, Docker, and other tools. The setup also includes scripts to install the Meslo Nerd Font and a docker-compose file to manage the container environment.

.devcontainer · high confidence

Introduce API Gateway with centralized security and routing

The API Gateway has been introduced as a new component in the system, providing a central entry point for client requests. It configures Spring Cloud Gateway routes for catalogs, users, and customers services, each protected by custom JWT authentication and role/permission-based authorization logic. The gateway enforces security by validating tokens via Keycloak and applies a custom filter to inject correlation IDs for request tracing. Additionally, the project structure has been refactored, moving the gateway code from a previous service directory to a dedicated api-gateway folder, and logging has been enhanced with OpenTelemetry support.

api-gateway · high confidence

Introduce Users and Customers microservices

Adds the initial scaffolding for the Users and Customers microservices, each including Spring Boot application entry points, core configuration classes, and environment-specific YAML/properties files. The Users service implements endpoints and handlers for creating admin and customer users via Keycloak, while the Customers service includes a consumer for user creation events. Both services are configured with OpenTelemetry, Swagger, and message persistence support.

(repo-wide) · high confidence

Introduce foundational building blocks for microservices architecture

The building-blocks module now provides a comprehensive set of abstractions and implementations to support microservices development. This includes a query bus for handling queries, a mediator pattern for commands and events, and a test harness for message verification. Observability is supported via OpenTelemetry integration for tracing and metrics, while data access is enhanced with a generic repository pattern, soft-delete filtering, and Flyway database migration support.

building-blocks · high confidence

Product deletion capability added to the catalog service

Users can now delete products from the catalog via a new DELETE /api/v1/products/{id} endpoint. The request requires WRITE permissions (PERMISSION\_CATALOGS.WRITE, CLAIM\_CATALOGS.WRITE, or CATALOGS:WRITE/ADMIN/ROLES), and the operation removes the product from the repository, returning 204 on success or 404/403/401 as appropriate.

services/catalogs/core/src/main/java/com/github/mehdihadeli/catalogs/core/products/features/deletingproduct · high confidence

Behavioural changes

Centralized shared constants and integration events

Added a new Constants class defining role strings (customer, admin) and moved the ProductCreated integration event to the shared module, renaming it to ProductCreatedV1 and updating its package and validation logic.

services/shared · medium confidence

Enforces commit message standards and code formatting on commit

The repository now enforces coding standards automatically. A pre-commit hook runs the code formatter to ensure consistent styling, while a commit-msg hook uses commitlint to validate that commit messages follow the required format.

.husky · high confidence

Removal of environment-specific configuration files

The application no longer uses separate configuration files for production, staging, and test environments. Specifically, the Spring Boot profile configurations (application-prod.yml, application-staging.yml, and application-test.yml) have been removed, along with the associated Java Constants class. This change eliminates the ability to switch between different database connection and JPA settings based on the active Spring profile.

services/catalogsservice/catalogs-api · high confidence

Removal of legacy Category and Product domain models

The catalog service has removed several legacy domain classes, including the Category entity, its associated value objects (CategoryName, CategoryDescription), the CategoryAggregateRepository interface and its implementation, the CategoryInfoProjection, the ProductVariantDto, the ProductCreatedMessageHandler, and the AppProperties configuration class. This cleanup removes unused or outdated code from the catalog service's package structure.

services/catalogsservice/catalogs · high confidence

Reorganized catalog service domain events into a core module

Domain event classes for product and review operations (e.g., ProductReviewCreated, ProductVariantCreated, ProductVariantRemoved, ProductStatusUpdated, ProductReviewVerified) have been moved from the legacy services/catalogsservice path into a new core module at services/catalogs/core. This refactoring updates the Java package namespaces to reflect the new directory structure, ensuring that all related event definitions are now located within the core catalog module.

(repo-wide) · high confidence

Restructure catalog services and add product update capability

The catalog service code has been reorganized into a new folder structure, moving existing query endpoints (GetProductById, GetProducts, SearchProductsByName) from the legacy \services/catalogsservice\ path to \services/catalogs/core\. During this refactor, the codebase was updated to use \QueryBus\ and \CommandBus\ abstractions instead of the previous \Mediator\ pattern. Additionally, a new feature was added to allow updating product details (name, price, dimensions, size, and description) via a new \UpdateProductDetails\ endpoint and handler.

(repo-wide) · medium confidence

Restructured catalog service into a core module with updated pipeline and data access layers

The catalog service has been reorganized into a dedicated core module, moving package paths from \com.github.mehdihadeli.catalogs\ to \com.github.mehdihadeli.catalogs.core\. This includes the introduction of an \ObservabilityPipelineBehavior\ in the configuration, which adds request tracing and metrics for commands and queries. Additionally, the \ProductDataModel\ entity was updated to explicitly map embedded \PriceVO\ and \SizeVO\ fields to specific database columns, and the \Product\ creation flow now utilizes a new \CreateProduct\ command handler.

services/catalogs/core, services/catalogs/core/src/main/java/com/github/mehdihadeli/catalogs/core/products/features/creatingproduct · high confidence

Test coverage

Added test coverage for the Create Product feature

Added new test classes for the Create Product feature across end-to-end, integration, and unit test layers. The end-to-end test verifies the API endpoint returns a 201 Created status and a valid response body. The integration tests validate that the command handler correctly persists the product to the database, updates the internal read model, and publishes the correct integration events. The unit tests verify the handler's logic, including validation of null inputs, handling of duplicate product IDs, and successful creation paths.

services/catalogs/api/src/test/java/com/github/mehdihadeli/catalogs/api/endtoendtests/products/features/creatingproduct, services/catalogs/api/src/test/java/com/github/mehdihadeli/catalogs/api/integrationtests/products/features/creatingproduct, services/catalogs/api/src/test/java/com/github/mehdihadeli/catalogs/api/unittests/products/features/creatingproduct · high confidence

Dependencies

Initial project structure and dependency configuration

The project is initialized with a Maven multi-module structure for a Spring Boot application, including an API gateway, and microservices for users, customers, and catalogs. The root POM defines shared dependency versions for Spring Boot 3.4.2, MapStruct, QueryDSL, and OpenTelemetry. Additionally, Node.js dependencies for commitlint and Husky are added to support development workflows.

(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

Score

  • CAI 59 → 58 (-1.6)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 97 (+1.2)
  • Architecture 100 → 93 (-7.0)
  • Maturity 79 → 75 (-3.7)
  • Readiness 39 → 41 (+1.3)
  • Security 96 → 86 (-10.5)
  • Domain Modelling 100 → 81 (-18.5)
  • Event-Driven 63 → 63 (+0.0)

Resolved (42)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (10 lines × 2) (services/users/core/src/main/java/com/github/mehdihadeli/users/core/users/features/creatinguser/v1/CreateUserEndpoint.java)
  • Duplicated block (11 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (11 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/observability/diagnostics/command/CommandHandlerSpanImpl.java)
  • Duplicated block (11 lines × 3) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/mediator/MediatorImpl.java)
  • Duplicated block (12 lines × 3) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/KeycloakGatewayConfiguration.java)
  • Duplicated block (16 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/mediator/MediatorImpl.java)
  • Duplicated block (5 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/core/data/RepositoryBase.java)
  • Duplicated block (5 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/observability/TelemetryTags.java)
  • Duplicated block (5 lines × 4) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/validation/NumberRuleBuilder.java)
  • Duplicated block (6 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/core/data/AggregateBaseRepository.java)
  • Duplicated block (7 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (7 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (7 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/abstractions/core/data/AggregateRepository.java)
  • Duplicated block (7 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/core/data/EntityManagerUtils.java)
  • Duplicated block (7 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/core/messaging/MessageUtils.java)
  • Duplicated block (8 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (8 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • …and 22 more

New (80)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no licence statement (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/abstractions/core/data/AggregateRepository.java)
  • Duplicated block (10 lines × 2) (services/users/core/src/main/java/com/github/mehdihadeli/users/core/users/UserMapper.java)
  • Duplicated block (11 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/core/data/EntityManagerUtils.java)
  • Duplicated block (11 lines × 2) (services/users/core/src/main/java/com/github/mehdihadeli/users/core/users/features/creatingadminuser/v1/CreateAdminUser.java)
  • Duplicated block (11 lines × 3) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/mediator/MediatorImpl.java)
  • Duplicated block (11 lines × 4) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/KeycloakGatewayConfiguration.java)
  • Duplicated block (12 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (12 lines × 3) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/mediator/MediatorImpl.java)
  • Duplicated block (14 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/core/data/EntityManagerUtils.java)
  • Duplicated block (16 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (16–17 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/observability/diagnostics/command/CommandHandlerSpanImpl.java)
  • Duplicated block (17 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (17–18 lines × 2) (building-blocks/src/main/java/com/github/mehdihadeli/buildingblocks/observability/DiagnosticsProviderImpl.java)
  • Duplicated block (18 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • Duplicated block (19 lines × 2) (services/catalogs/core/src/main/java/com/github/mehdihadeli/catalogs/core/categories/features/updatingcategorydetails/v1/UpdateCategoryDetails.java)
  • Duplicated block (20 lines × 2) (api-gateway/src/main/java/com/github/mehdihadeli/apigateway/security/CustomFluxJwtAuthenticationConverter.java)
  • …and 60 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

mehdihadeli/spring-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 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 75814b5b0d04a32e7dab00004add2218bd11d3ae — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.