Skip to content
CAI
Software that uses CAICheck a score

damonkelley/ports-and-adapters-examples

44.3

Weak · 20 September 2026

289

lines of production code

Kotlin

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a multi-module educational codebase designed to demonstrate the Ports and Adapters architectural pattern. It comprises a server-based rater application and a banking example that illustrates how to decouple domain logic from persistence details using various storage strategies. The project is structured as a Gradle build with distinct modules for each example, serving as a practical reference for implementing clean architecture principles.

Features

Add banking example demonstrating Ports and Adapters with multiple persistence strategies

This location introduces a banking example application that demonstrates the Ports and Adapters architectural pattern to keep persistence details separate from the domain model. It includes a core domain for bank accounts and an application service for intra-bank transfers, wired together via three distinct persistence adapters: an isomorphic adapter storing account data directly, a transaction-based adapter recording balance changes as immutable transactions, and a versioned adapter maintaining a history of account state changes. The example is configured to run against a PostgreSQL database and includes a command-line interface to execute the transfer logic.

database-as-a-detail · high confidence

Behavioural changes

Rater application moved into a-color-coded-guide subproject

The existing rater application, including its Kotlin source files (Main.kt), tests (InCodeRaterTest, KtorHttpAdapterTest, RatingApplicationTest), and configuration (logback.xml), has been relocated into the a-color-coded-guide subproject. This change also adds a README and an architecture diagram to the subproject to document the Ports and Adapters implementation.

a-color-coded-guide · high confidence

Dependencies

Restructure project into multi-module Gradle build

The project has been reorganized from a single-module structure into a multi-module Gradle build. The root build configuration has been simplified to manage subprojects, and two new modules have been added: 'a-color-coded-guide', which uses Ktor for a server application, and 'database-as-a-detail', which uses Spring Boot with JPA and PostgreSQL. The settings file now includes these new subprojects.

(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 51 → 44 (-6.7)
  • Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 74 (-25.9)
  • Maturity 45 → 40 (-5.4)
  • Readiness 24 → 24 (+0.0)
  • Security 100 → 100 (+0.0)
  • Domain Modelling 100 → 77 (-22.7)

Resolved (9)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • No exposed public API
  • Test reliability not included
  • The 'Requirements' section states the application needs Postgres without a password, but it does not explain how to configure the database connection in code or where credentials live. (database-as-a-detail/README.md)
  • early-stage repository — too little history to judge knowledge freshness
  • git history depth insufficient
  • git history depth insufficient
  • single-maintainer — knowledge-concentration (bus factor) risk

New (4)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (database-as-a-detail/README.md)
  • Documentation: no project overview (README.md)
  • Documentation: no usage examples (database-as-a-detail/README.md)

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

Survey your own repository

damonkelley/ports-and-adapters-examples 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 20 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 15a517bf97d029306fe7620e67e75504d4d140d7 — 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-28e75b8e3254.