Skip to content
CAI
Software that uses CAICheck a score

beyondxscratch/hexagonal-architecture-java-springboot

54.2

Adequate · 22 September 2026

300

lines of production code

Java

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This is a Spring Boot application that assembles rescue fleets by querying the Star Wars API (SWAPI) for starship data. It filters and selects starships based on passenger and cargo capacity requirements, exposing a REST API to trigger fleet assembly and retrieve results. The system is structured with a domain layer for business logic and an infrastructure layer for external API integration, supported by comprehensive functional and integration tests.

Features

Added DomainService and Stub annotations

New Java annotations, DomainService and Stub, have been introduced in the ddd package. DomainService marks features belonging to the domain and ubiquitous language, while Stub serves as a marker for stub implementations.

domain/src/main/java/ddd · medium confidence

Added RescueFleetController to manage fleet assembly and retrieval

A new REST API endpoint has been introduced to allow users to assemble a fleet based on the number of passengers and retrieve fleet details by ID. The controller exposes a POST /rescueFleets endpoint that accepts a request body specifying the number of passengers, triggering the fleet assembly process, and a GET /rescueFleets/{id} endpoint to fetch fleet information. Supporting resource classes (FleetResource, StarShipResource) and a request DTO (RescueFleetRequest) were added to handle the data transfer between the client and the controller.

infrastructure/src/main/java/rebelsrescue/controllers · high confidence

Added Spring Boot application entry point

A new Spring Boot application class, StarwarsRebelsRescueApplication, has been added to the infrastructure module. This class serves as the main entry point for the application, annotated with @SpringBootApplication and containing the standard main method to launch the Spring Boot application.

infrastructure/src/main/java/rebelsrescue · high confidence

Added SwapiClient to fetch and map Star Wars API data

A new SwapiClient has been introduced to retrieve starship data from the Star Wars API (SWAPI). The client paginates through the API's starship endpoint, mapping the external JSON response into internal StarShip objects. It handles non-integer passenger counts by filtering out invalid entries and explicitly parses the cargo capacity field, ensuring that only valid data is exposed to the rest of the application.

infrastructure/src/main/java/rebelsrescue/swapi · high confidence

Introduce fleet assembly logic for passenger rescue operations

Added new domain classes and services to support assembling fleets for passenger rescue. The system now filters starships with a minimum cargo capacity of 100,000 and selects those with available passenger capacity, sorting them by passenger capacity to optimize rescue operations. The Fleet and StarShip records, along with the FleetAssembler service, enable the creation of rescue fleets based on passenger requirements.

domain/src/main/java/rebelsrescue/fleet · high confidence

Introduce in-memory stubs for fleet and starship inventory services

New in-memory implementations for the fleet and starship inventory SPIs have been added to support development and testing. The \InMemoryFleets\ class provides a basic in-memory store for fleet records, while \StarShipInventoryStub\ supplies a hardcoded list of starships (including the Millennium Falcon and X-Wing) for use as a test double. These stubs allow the application to function without a persistent backend during early development phases.

domain/src/main/java/rebelsrescue/fleet/spi · high confidence

Project documentation and configuration files added

The repository now includes essential configuration and documentation files to support development and CI/CD workflows. A \.gitignore\ file is added to exclude IDE-specific and build artifacts from version control. A \.gitlab-ci.yml\ file is introduced to configure a Maven build pipeline for Java 21. The \README.md\ is updated to replace generic GitLab onboarding instructions with specific details about the Hexagonal Architecture Spring Boot project, including links to related articles and videos. Additionally, a \LICENSE\ file is added to specify the MIT license, and an HTTP request file (\StarWars Rescue Fleet.http\) is included to demonstrate API usage.

(repo-wide) · high confidence

Behavioural changes

Configure application port and Swapi client base URI

The application now explicitly sets its server port to 1977 and configures the Swapi client to use the https://swapi.dev/ endpoint, replacing the previous stub-based implementation with a live external API integration.

infrastructure/src/main/resources · medium confidence

Domain configuration refactored to use Swapi Client instead of Stub

The domain configuration has been updated to replace the previous Stub implementation with the Swapi Client. This change modifies the component scanning filters to include the new client while excluding the old StarShipInventoryStub, ensuring the application uses the live API integration rather than the local stub for domain services.

infrastructure/src/main/java/rebelsrescue/configuration · medium confidence

Test coverage

Added functional test for fleet assembly; Added integration test for fleet assembly; Added test fixtures for SwapiClient; Added tests for the Rescue Fleet controller; Added unit tests for SwapiClient.

Dependencies

Initial Maven multi-module project structure

The project is initialized as a Maven multi-module build with a parent POM defining 'domain' and 'infrastructure' modules. The domain module enforces an anti-corruption layer by banning non-domain dependencies via the maven-enforcer-plugin, while the infrastructure module integrates Spring Boot 3.2.4 (including web, devtools, and test starters) and Spring Cloud Contract Wiremock 4.1.2. The parent POM configures Java 21 compilation, JUnit 5.10.1 and AssertJ 3.25.2 for testing, and the Maven Surefire 3.2.5 plugin.

(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 57 → 54 (-3.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 70 (-29.7)
  • Maturity 41 → 41 (+0.0)
  • Readiness 44 → 48 (+4.1)
  • Security 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
  • No exposed public API
  • Scanner failed to run — not a clean result
  • Test reliability not included
  • early-stage repository — too little history to judge knowledge freshness
  • single-maintainer — knowledge-concentration (bus factor) risk

New (11)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no licence statement (README.md)
  • Documentation: no usage examples (README.md)
  • No ADRs found
  • No assertions: should_assemble_a_rescue_fleet (infrastructure/src/test/java/rebelsrescue/controllers/RescueFleetControllerTest.java)
  • No assertions: should_return_a_fleet_given_an_id (infrastructure/src/test/java/rebelsrescue/controllers/RescueFleetControllerTest.java)
  • No dependency advisory monitoring
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result

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

Survey your own repository

beyondxscratch/hexagonal-architecture-java-springboot 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 22 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 fa1ea991e04490d8988197090fe8843a8ff27474 — 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-821afab8930d.