Skip to content
CAI
Software that uses CAICheck a score

Arminek/Cart

65.1

Adequate · 21 September 2026

2.3k

lines of production code

PHP

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an e-commerce cart service built on the Symfony framework, designed to manage shopping cart operations through a domain-driven architecture. It exposes REST-like HTTP endpoints and console commands to initialize carts, add or remove products, modify quantities, and clear contents. The implementation enforces strict validation for product codes, quantities, and supported currencies, utilizing an event-sourcing pattern to track cart state changes.

Features

Add CartBundle with console commands and HTTP endpoints for cart management

The CartBundle introduces a new set of console commands and HTTP controllers that allow users to initialize a cart, add or remove products, change item quantities, and clear the cart. These commands interact with a command bus to dispatch domain commands, while the controller exposes REST-like endpoints for the same operations. The bundle also registers service definitions for command handlers and a cart repository, enabling the underlying event-sourcing infrastructure to process cart operations.

src/CartBundle · high confidence

Add cart management capabilities

Visitors can now add products to their cart, including specifying quantities, and can also modify item quantities, remove individual items, or clear the entire cart. The system enforces validation by preventing the addition of products with invalid codes, negative quantities, or unsupported currencies, and rejects attempts to remove items that do not exist in the cart.

features · high confidence

Added Symfony console application entry point

A new console application entry point has been added to the project, enabling command-line interactions via the Symfony Framework. This script initializes the application kernel and runs console commands, supporting environment and debug configuration through environment variables and command-line arguments.

bin · high confidence

Added Symfony front controllers for production and development environments

The web directory now includes app.php and app\_dev.php entry points. The production controller (app.php) initializes the kernel in 'prod' mode, while the development controller (app\_dev.php) enables debugging and restricts access to local IPs, providing the standard Symfony front-controller setup for handling HTTP requests in both environments.

web · medium confidence

Initial Symfony application configuration and cart API routing

The application's core configuration files have been added, establishing the Symfony framework setup including database, mailer, and session settings. Additionally, routing for the new cart API endpoints (init, add product, change quantity, remove product, and clear) is defined, exposing POST endpoints for cart management.

app/config · high confidence

Introduce cart domain model and command handlers for cart operations

The domain layer now includes the core cart aggregate (Cart, CartItem, CartContract) along with associated value objects (ProductCode, CartItemQuantity) and a collection (CartItems) to manage cart contents. This change adds command classes (InitializeCart, AddProductToCart, ChangeProductQuantity, RemoveProductFromCart, ClearCart) and their corresponding command handlers to process cart actions. It also introduces domain events (CartInitialized, CartItemAdded, CartItemQuantityChanged, CartItemRemoved, CartCleared) and exceptions for cart-specific errors (currency mismatch, invalid quantity, etc.). A new adapter (AvailableCurrenciesProviderInterface and ISOCurrenciesProvider) is added to validate supported currencies. The CartAggregateFactory is introduced to reconstruct cart state from event streams.

src/Domain · high confidence

Test coverage

Added Behat and PhpSpec tests for cart domain logic

Added new test files to verify cart domain behavior. The \CartContext.php\ file introduces Behat step definitions and state management for cart operations such as adding products, changing quantities, clearing the cart, and handling currency contexts. The \CartItemsSpec.php\ file adds PhpSpec unit tests for the \CartItems\ collection, covering item merging, removal, finding by product code, and empty state checks.

tests · high confidence

Dependencies

Initial project setup with Symfony and Doctrine dependencies

The project now includes a composer.json file that defines the PHP environment and dependencies. This establishes the project's reliance on Symfony 3.2, Doctrine ORM, and various supporting libraries such as ramsey/uuid, moneyphp/money, and php-http. The configuration also sets up autoloading for the SyliusCart namespace and includes development tools like Behat and PHPSpec.

(dependencies) · medium 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 68 → 65 (-3.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.1)
  • Architecture 100 → 99 (-1.2)
  • Maturity 67 → 57 (-9.9)
  • Readiness 50 → 50 (+0.0)
  • Security 100 → 95 (-5.0)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (12 lines × 2) (src/CartBundle/Command/ChangeProductQuantityCommand.php)
  • No exposed public API
  • Test reliability not included
  • early-stage repository — too little history to judge knowledge freshness
  • single-maintainer — knowledge-concentration (bus factor) risk

New (7)

  • Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (12 lines × 2) (src/CartBundle/Command/ChangeProductQuantityCommand.php)
  • End-of-life framework: Symfony 3
  • No ADRs found
  • No dependency advisory monitoring

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

Survey your own repository

Arminek/Cart 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 e32a6cdddfc3d1ed9e09e9c5f1f4b9853571194c — 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.