Skip to content
CAI
Software that uses CAICheck a score

citerus/dddsample-core

47.4

Weak · 21 September 2026

5k

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 logistics tracking application that manages the lifecycle of cargo, including booking, routing, and handling events. It provides a RESTful API for public cargo tracking and a web interface for administrative tasks like booking and routing. The architecture follows Domain-Driven Design principles, separating domain models, application services, and infrastructure concerns, while integrating with external routing services and messaging systems.

How it got here

2007–2015 — Domain model modernization and testing

32 changes.

The project underwent a comprehensive refactoring of its domain model and infrastructure to align with modern Java and Spring Boot 3.0 standards, including the adoption of Jakarta Persistence and Spring Data JPA. This period also established a robust test coverage for the new domain and application layers, while introducing new features for external routing and public tracking interfaces.

2017–2023 — Spring Boot 3.0 migration and REST API modernization

14 changes.

The codebase was modernized by migrating to Spring Boot 3.0, replacing XML configuration with Java-based setup and adopting Thymeleaf for the web interface. A public REST API for cargo tracking was introduced alongside comprehensive acceptance and integration tests to ensure reliability.

Features

Add Thymeleaf-based admin and tracking templates

The application now uses Thymeleaf templates for the user interface, replacing the previous view technology. This includes new templates for the admin section (listing, showing, and editing cargo details, registration form, and itinerary selection) as well as the public tracking page, enabling users to book, route, and monitor cargo via a web browser.

src/main/resources/templates · high confidence

Added Java code formatting and style configuration files

New configuration files have been added to the project to enforce consistent code style and formatting. A Checkstyle configuration (checkstyle.xml) is now present to validate Java code against Sun coding conventions, including checks for line length, Javadoc, naming, imports, and whitespace. Additionally, an Eclipse IDE preference file (dddsample-format-eclipse.pref) has been added to standardize the Java code formatter settings for the IDE, ensuring consistent indentation, spacing, and brace placement across the project.

src/main/config · high confidence

Added domain model and service documentation and interface

New package-level documentation files (package.html) have been added for the domain model, domain services, and the separate pathfinder context, clarifying their roles and boundaries. Additionally, the RoutingService interface was introduced, defining the contract for fetching itineraries based on route specifications.

(repo-wide) · high confidence

Added location domain model and repository interface

Introduced the Location aggregate root, its value object UnLocode, and the LocationRepository interface. The UnLocode class enforces the UN/LOCODE format (two-letter country code followed by a three-character location code) and provides equality semantics based on the code string. The LocationRepository interface defines methods to find locations by UNLocode, retrieve all locations, and store new locations.

src/main/java/se/citerus/dddsample/domain/model/location · high confidence

Added project scaffolding and build tooling

The repository was initialized with essential project files: a Maven wrapper (mvnw/mvnw.cmd) for consistent builds, a .gitignore to exclude IDE and build artifacts, a LICENSE.md for legal clarity, and a README.md providing setup and usage instructions. Additionally, an OpenAPI specification (api-docs.yaml) was added to document the HandlingReport REST API, and a draw.io XML file was included to visualize entity relationships.

(repo-wide) · high confidence

Added public tracking web interface

A new public-facing tracking feature has been introduced, allowing users to look up cargo status by tracking ID. This includes the command object for input, a validator to ensure the tracking ID is provided, and a view adapter that formats cargo details and handling events for display.

src/main/java/se/citerus/dddsample/interfaces/tracking · high confidence

Added sample data for locations and voyages

New sample data classes, SampleLocations and SampleVoyages, have been added to the infrastructure layer. These provide pre-defined sets of Location and Voyage objects, including specific routes and schedules, which can be used for testing and demonstration purposes.

src/main/java/se/citerus/dddsample/infrastructure/sampledata · high confidence

Added static assets for the DDDSample application

Added the static resources required for the DDDSample application's web interface, including the main index page, global and admin stylesheets, and the necessary JavaScript libraries (jQuery 2.1.4 and Bootstrap Datepicker 1.6.0-dev) to support the calendar and UI components.

src/main/resources/static · high confidence

External routing service implementation added

The system now includes a new \ExternalRoutingService\ class in the \se.citerus.dddsample.infrastructure.routing\ package. This class implements the \RoutingService\ interface and acts as a data model translation layer between the internal domain model and the external Pathfinder API. It handles fetching routes by converting \RouteSpecification\ to the external API's format and mapping the returned \TransitPath\ results back to \Itinerary\ objects.

src/main/java/se/citerus/dddsample/infrastructure/routing · high confidence

Introduced application layer interfaces for cargo booking, inspection, and handling events

The application layer now exposes a set of new service interfaces: BookingService for registering and routing cargo, HandlingEventService for registering handling events, and CargoInspectionService for triggering inspections. Additionally, an ApplicationEvents interface is introduced to notify interested parties about cargo status changes (handled, misdirected, arrived) and handling event registration attempts. A DateUtils utility class is also added to support date/time operations using the Java 8 java.time API.

src/main/java/se/citerus/dddsample/application · high confidence

Introduced domain models and factories for cargo and handling events

Added the Cargo aggregate root, its factory, and repository interface to manage cargo creation and storage. Introduced the HandlingEvent aggregate root, its factory, and repository interface to record and retrieve cargo handling history. Also added supporting enums for RoutingStatus and TransportStatus, along with a custom exception for handling event creation failures.

src/main/java/se/citerus/dddsample/domain/model/cargo · high confidence

Introduced domain models and repository interface for voyage management

Added the core domain classes for the Voyage aggregate, including the Schedule and VoyageNumber value objects, along with the VoyageRepository interface. This establishes the data access contract for retrieving and storing voyage information within the domain model.

src/main/java/se/citerus/dddsample/domain/model/voyage · high confidence

Introduced internal graph traversal service and data access layer

Added new internal components for pathfinding: a GraphDAO interface and GraphDAOStub implementation to handle node and edge data, alongside a GraphTraversalServiceImpl that generates candidate transit paths using randomized node selection and date calculations.

src/main/java/com/pathfinder/internal · high confidence

Introduced new DTOs for booking and routing data

Added new data transfer objects (DTOs) to the booking facade layer, including CargoRoutingDTO, LegDTO, LocationDTO, and RouteCandidateDTO. These classes define the structure for cargo routing information, itinerary legs, and location details, enabling the remote booking client API to exchange structured data about cargo routes and candidate itineraries.

src/main/java/se/citerus/dddsample/interfaces/booking/facade/dto · high confidence

Introduced new pathfinder API interfaces and data models

Added the public API interface GraphTraversalService and supporting data models TransitEdge and TransitPath to the com.pathfinder.api package, enabling external consumers to request shortest transit paths. The GraphTraversalService interface defines the contract for finding paths with origin, destination, and limitations, while TransitEdge and TransitPath represent the structure of the returned itinerary legs.

src/main/java/com/pathfinder/api · high confidence

New BookingServiceFacade interface for remote booking operations

A new facade interface, BookingServiceFacade, has been introduced to shield the domain layer from user interface concerns. This interface defines remote booking operations including booking new cargo, assigning routes, changing destinations, and listing cargo and location data, effectively forming the boundary of the O/R-mapper unit-of-work scope when sending data to the user interface.

src/main/java/se/citerus/dddsample/interfaces/booking/facade · high confidence

New REST interface for submitting handling reports

A new REST-based interface for registering handling events has been introduced, replacing the previous SOAP-based approach. This includes a new \HandlingReport\ data model, a \HandlingReportService\ interface, and a \HandlingReportParser\ to process incoming reports. This change modernizes the integration layer, allowing external systems to submit handling events via a simpler, more standard web service interface.

src/main/java/se/citerus/dddsample/interfaces/handling · high confidence

New domain pattern interfaces and specification implementations

The domain layer now includes new interfaces and classes that support domain-driven design patterns. A Specification pattern is introduced with an abstract base class and concrete implementations for AND, OR, and NOT logical operations, allowing users to compose complex business rules. Additionally, new interfaces for DomainEntity and ValueObject are added to enforce identity-based and value-based comparison semantics respectively, while a DomainEvent interface is provided for unique, lifecycle-independent events.

src/main/java/se/citerus/dddsample/domain/shared · high confidence

New public REST API for tracking cargo status and history

A new public REST API has been introduced to allow external clients to track cargo. This includes the CargoTrackingDTO and HandlingEventDTO data structures, along with a converter that maps internal domain models to these DTOs. The API exposes key tracking details such as the cargo's current status, destination, estimated time of arrival, next expected activity, and a list of handling events. The converter uses UTC time formatting and English locale for consistent date and description outputs.

src/main/java/se/citerus/dddsample/interfaces/tracking/ws · high confidence

Behavioural changes

Added site documentation and navigation for the DDD sample application

The site generation was restructured to include new documentation pages detailing the application's architecture, domain model characterization, and patterns reference. A new 'Download' page provides build and IDE setup instructions, while the site navigation (site.xml) and CSS are added to support the new content structure.

src/site · high confidence

Added web command objects for booking and routing

Introduced new command objects, RegistrationCommand and RouteAssignmentCommand, to handle web interface data for booking and routing. These classes encapsulate user input for origin/destination and route legs, with RouteAssignmentCommand specifically using java.time.Instant for date handling to address an instant conversion issue.

src/main/java/se/citerus/dddsample/interfaces/booking/web · medium confidence

Introduced internal facade implementation and DTO assemblers for booking operations

Added the internal implementation of the booking service facade (BookingServiceFacadeImpl) which exposes booking functionality via RMI. This change includes the concrete facade class and a set of DTO assemblers (CargoRoutingDTOAssembler, ItineraryCandidateDTOAssembler, LocationDTOAssembler) that map domain objects to data transfer objects, enabling the remote interface to interact with the application layer and repositories.

src/main/java/se/citerus/dddsample/interfaces/booking/facade/internal · high confidence

Migrate Cargo, HandlingEvent, Location, and Voyage persistence to Spring Data JPA repositories

The persistence layer for Cargo, HandlingEvent, Location, and Voyage has been refactored from Hibernate-specific implementations to Spring Data JPA interfaces. This change replaces the previous repository implementations with Spring Data JPA interfaces (e.g., CargoRepositoryJPA, HandlingEventRepositoryJPA, LocationRepositoryJPA, VoyageRepositoryJPA) that extend CrudRepository, simplifying data access and aligning with modern Spring Boot 3.0 standards.

src/main/java/se/citerus/dddsample/infrastructure/persistence · medium confidence

Migrate JMS messaging infrastructure to Spring Boot 3.0 and Java 11

The JMS messaging configuration and consumers have been modernized for Spring Boot 3.0 and Java 11. This includes updating the \InfrastructureMessagingJmsConfig\ to use \jakarta.jms\ APIs, configuring message consumers for queues like \CargoHandledQueue\ and \HandlingEventRegistrationAttemptQueue\, and replacing Apache Commons Logging with SLF4J in the \SimpleLoggingConsumer\.

src/main/java/se/citerus/dddsample/infrastructure/messaging · medium confidence

Migrate application context configuration to Java-based Spring Boot 3.0

The application's Spring configuration has been modernized by replacing XML-based and setter-based injection with a new Java-based \DDDSampleApplicationContext\ class. This change introduces explicit \@Bean\ definitions for core services (Booking, Cargo Inspection, Handling Events) and factories, while also importing the interfaces and messaging configurations. This shift aligns the codebase with Spring Boot 3.0 standards, improving type safety and configuration clarity for users managing the application's dependency injection and service wiring.

src/main/java/se/citerus/dddsample/config · high confidence

Migrate configuration from properties to YAML and add i18n messages

The application's configuration has been migrated from a properties file to a YAML file (application.yml), introducing structured settings for the server context path, logging levels, upload directories, broker URL, and database connection details. Additionally, English localization messages for cargo status and delivery history events have been added to support internationalization.

src/main/resources · medium confidence

Migrate interfaces layer to Spring Boot 3.0 with REST API support

The interfaces layer has been modernized for Spring Boot 3.0, replacing the previous SOAP-based handling report service with a new REST API for public cargo tracking. The application context now uses annotated Java configuration classes instead of XML or Hibernate mapping files, and includes a new \CargoTrackingRestService\ for tracking, alongside updated bean definitions for booking and handling services.

src/main/java/se/citerus/dddsample/interfaces · medium confidence

Migrated application to Spring Boot

The application now uses Spring Boot's auto-configuration and embedded server capabilities, replacing the previous XML-based configuration and manual setup. This simplifies deployment and configuration, allowing the application to run as a standard Spring Boot application with a main class entry point.

src/main/java/se/citerus/dddsample · high confidence

Refactored cargo tracking and handling domain model

The dddsample application's domain model has been refactored to use Jakarta Persistence annotations (e.g., @Entity, @Table) and modern Java time APIs (java.time.Instant). This change introduces new domain classes such as Cargo, Delivery, Itinerary, and HandlingEvent, and updates application services (BookingService, CargoInspectionService, HandlingEventService) to use Spring's @Transactional and dependency injection, replacing the previous implementation.

dddsample · medium confidence

Updated Maven Wrapper to version 3.3.2

The project's Maven Wrapper has been upgraded to version 3.3.2, ensuring that developers and build systems use a consistent and modern version of Apache Maven (specifically 3.8.6) for all builds.

.mvn · high confidence

Test coverage

Add acceptance tests for customer and admin workflows; Added JPA repository tests for Cargo, Location, HandlingEvent, and CarrierMovement; Added acceptance test page objects for cargo tracking and administration; Added end-to-end lifecycle test for cargo booking and handling; Added in-memory repository implementations for testing; Added integration and unit tests for handling report processing; Added test fixtures for cargo tracking and handling reports; Added tests for UploadDirectoryScanner; Added tests for routing and application event handling; Added tests for the public cargo tracking REST API; Added unit tests for BookingService and HandlingEventService; Added unit tests for booking facade assemblers; Added unit tests for domain models and shared specifications; Added unit tests for itinerary selection command binding; Added unit tests for the tracking interface components.

Dependencies

Updated Spring Boot to 3.3.10 and modernized build dependencies

The project's Maven configuration (pom.xml) has been updated to use Spring Boot version 3.3.10 as the parent, which brings in updated transitive dependencies and build plugins. Key dependency updates include commons-io to 2.19.0, maven-surefire-plugin to 3.5.3, maven-javadoc-plugin to 3.11.2, and maven-jxr-plugin to 3.6.0. The configuration also explicitly defines versions for spring-boot-starter-thymeleaf, spring-boot-starter-activemq, spring-boot-starter-data-jpa, spring-boot-starter-web, spring-boot-starter-validation, commons-lang3, hsqldb, activemq-spring, activemq-broker, selenium-java, and htmlunit-driver, ensuring a consistent and modernized build environment.

(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

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 42 → 47 (+5.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 96 (-2.3)
  • Architecture 100 → 97 (-2.2)
  • Maturity 34 → 53 (+18.6)
  • Readiness 61 → 59 (-1.3)
  • Security 67 → 78 (+10.4)
  • Domain Modelling 51 → 59 (+7.5)
  • Accessibility 34 → 32 (-1.4)

Resolved (21)

  • Change coupling: CargoHandledConsumer.java ↔ HandlingEventRegistrationAttemptConsumer.java (src/main/java/se/citerus/dddsample/infrastructure/messaging/jms/CargoHandledConsumer.java)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (7 lines × 2) (src/main/java/se/citerus/dddsample/infrastructure/sampledata/SampleDataGenerator.java)
  • Duplicated block (9 lines × 2) (src/main/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingDTOConverter.java)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Scanner failed to run — not a clean result
  • …and 1 more

New (52)

  • Delivery.calculateNextExpectedActivity (cognitive 18) (src/main/java/se/citerus/dddsample/domain/model/cargo/Delivery.java)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no usage examples (README.md)
  • Duplicated block (18 lines × 2) (src/main/java/se/citerus/dddsample/interfaces/tracking/CargoTrackingViewAdapter.java)
  • Duplicated block (7 lines × 2) (src/main/java/se/citerus/dddsample/infrastructure/sampledata/SampleDataGenerator.java)
  • Duplicated block (8 lines × 2) (src/main/java/se/citerus/dddsample/domain/model/cargo/TrackingId.java)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Inverted test pyramid
  • Itinerary.isExpected (cognitive 17) (src/main/java/se/citerus/dddsample/domain/model/cargo/Itinerary.java)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • …and 32 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

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

Survey your own repository

citerus/dddsample-core 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 d8b896254ed4e18ba8117dcd5bf9a54708bdeaaf — 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.