Skip to content
CAI
Software that uses CAICheck a score

dustinsand/hex-arch-kotlin-spring-boot

39.8

Weak · 22 September 2026

2.2k

lines of production code

Java

with Kotlin

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a voter management service that provides endpoints for registering, looking up, and verifying voter eligibility. It is built on a hexagonal architecture, exposing functionality through both standard Spring WebFlux and reactive Kotlin Flow REST APIs, as well as an AWS Lambda function. The backend decouples application logic from infrastructure by using ports and adapters for H2 database persistence, asynchronous RPC calls for eligibility checks, and in-memory storage.

Features

Add Quarkus-based AWS Lambda implementation for voter lookup

The voter-lambda module now provides a new AWS Lambda function built with Quarkus, allowing users to deploy and invoke a serverless function to find voters by last name. The change includes the Kotlin adapter code (FindVoterLambda), data models, and internal configuration (JacksonObjectMapperCustomizer, JooqContextProducer). It also adds deployment and runtime support files, including shell scripts for AWS CLI management, SAM templates for JVM and native runtimes, Dockerfiles for containerized builds, and reflection configuration for native image compilation. Additionally, architecture tests are added to enforce the hexagonal architecture and internal package encapsulation.

voter-lambda · high confidence

Add internal package annotation and beans.xml for archunit

A new Java annotation, InternalPackage, is introduced in the archunit package to mark packages as internal, ensuring that no classes outside that package depend on its contents. Additionally, an empty beans.xml file is added to the META-INF directory, likely to ensure proper CDI (Contexts and Dependency Injection) configuration for the module.

voter-common · high confidence

Added H2 persistence adapter using jOOQ and R2DBC

Introduced a new output adapter for H2 database persistence, implementing the \FindVoterPort\ and \RegisterVoterPort\ interfaces. The implementation leverages jOOQ (version 3.12.3) for type-safe SQL generation and R2DBC for reactive database connectivity, providing the concrete storage mechanism for voter data.

adapter-output/persistence/h2, adapter-output/persistence/memory · high confidence

Added application-layer use cases and domain models for voter registration, lookup, and eligibility

The voter-application-core module now includes the application service layer with use cases for finding and registering voters, as well as checking voter eligibility. This introduces the FindVoterUseCase, RegisterVoterUseCase, and VoterEligibilityUseCase interfaces, along with their corresponding service implementations. Domain models for Voter and SocialSecurityNumber are also added, with validation logic for SSN format and name length constraints. Repository ports (FindVoterPort, RegisterVoterPort, VoterEligibilityPort) and event bus support (VoterEvent) are defined to decouple the application layer from infrastructure concerns. Tests are included for SocialSecurityNumber validation and QuorumService logic.

voter-application-core · medium confidence

Added async RPC eligibility adapter with Resilience4j fault tolerance

Introduced the \adapter-output:rpc:eligibility\ module, which implements the \VoterEligibilityPort\ via an asynchronous RPC call. The \VoterEligibilityRepository\ demonstrates concurrent remote service calls using Kotlin coroutines and integrates Resilience4j circuit breakers to manage fault tolerance for the external endpoints.

adapter-output/rpc/eligibility · high confidence

Added dual REST implementations for the voter service using Spring WebFlux and Kotlin Flow

The voter-ms module now provides two distinct REST API implementations for the same use cases, allowing users to choose between a standard Spring WebFlux controller approach and a Kotlin Flow-based handler approach. The Spring WebFlux controllers are located at \/voters\ and \/voters\ (POST), while the Kotlin Flow handlers are exposed under \/kotlin-reactive-flow/voters\. Both implementations support finding and registering voters, with the Kotlin Flow version utilizing a Router and Handler pattern. This change introduces new endpoints and internal package structures, accompanied by integration tests and architecture validation tests to ensure the new code adheres to the hexagonal architecture.

voter-ms · high confidence

Project infrastructure and documentation overhaul

The project now includes a .editorconfig to enforce coding standards, a .travis.yml for CI/CD, and a pre-commit hook to run Ktlint and detekt. The README has been significantly expanded to explain the hexagonal architecture, Gradle multi-module structure, and testing instructions. A LICENSE.md and CONTRIBUTING.MD have been added.

(repo-wide) · high confidence

Behavioural changes

Removed legacy person search implementation

Deleted the previous implementation of the 'Find People' feature, including the FindPeopleService interface and its Spring @Component implementation, the Person domain entity, the PersonGateway interface and FindPeopleQuery, the REST controller exposing the /people endpoint, and the in-memory persistence gateway. This removes the existing capability to search for people by name via the REST API.

src/main · high confidence

Upgraded Gradle wrapper to version 6.1

The Gradle wrapper has been upgraded from version 4.5.1 to 6.1, which may require updates to build scripts and plugins to remain compatible with the newer Gradle release.

gradle · high confidence

Test coverage

Removed obsolete Spring Boot application test

The default Spring Boot integration test (HexArchBootDemoApplicationTests) has been removed from the codebase. This test previously verified that the application context loads successfully, but it is no longer required.

src/test · high confidence

Dependencies

Migrated project to Gradle Kotlin DSL with multi-module structure

The build system has been upgraded from a single-module Groovy-based Gradle script to a multi-module Kotlin DSL configuration. This introduces new subprojects for the H2 persistence adapter, memory persistence, RPC eligibility, and the core application logic, while removing the legacy \build.gradle\ and \settings.gradle\ files. The migration includes adding dependencies for jOOQ, R2DBC, Flyway, Resilience4j, and Quarkus, alongside configuring code analysis tools like Detekt and Ktlint.

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

Lenses

  • Code Health 100 → 99 (-0.5)
  • Architecture 100 → 74 (-25.9)
  • Maturity 38 → 38 (+0.0)
  • Readiness 39 → 27 (-12.3)
  • Security 97 → 97 (-0.4)
  • Accessibility 41 → 41 (+0.0)

Resolved (10)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Medium IaC: CKV_AWS_363 (voter-lambda/sam.jvm.yaml)
  • Medium IaC: CKV_AWS_363 (voter-lambda/sam.native.yaml)
  • Medium IaC: CKV_DOCKER_2 (voter-lambda/src/main/docker/Dockerfile.jvm)
  • Medium IaC: CKV_DOCKER_3 (voter-lambda/src/main/docker/Dockerfile.native)
  • No exposed public API
  • Test reliability not included
  • complexity unreadable for .java, .kt — churn × complexity hotspots could not be measured
  • single-maintainer — knowledge-concentration (bus factor) risk

New (10)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High IaC: WD-DOCKER-0001 (voter-lambda/src/main/docker/Dockerfile.jvm)
  • Medium IaC: WD-DOCKER-0003 (voter-lambda/src/main/docker/Dockerfile.jvm)
  • Medium IaC: WD-DOCKER-0003 (voter-lambda/src/main/docker/Dockerfile.native)
  • No ADRs found
  • No dependency advisory monitoring
  • TodoComment (voter-application-core/src/main/java/com/hexarchbootdemo/application/port/output/eventbus/VoterEvent.kt)
  • TodoComment (voter-lambda/src/main/kotlin/com/hexarchbootdemo/adapter/input/lambda/internal/JacksonObjectMapperCustomizer.kt)

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

Survey your own repository

dustinsand/hex-arch-kotlin-spring-boot 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 6acc68d475e58b81a7e14125015da84b9b05dec1 — 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-90d5d2fe38ee.