Skip to content
CAI
Software that uses CAICheck a score

hnaderi/edomata

58.9

Adequate · 9 November 2026

6.7k

lines of production code

Scala

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Jsoniter integration for Doobie and Skunk modules

Users can now serialize and deserialize JSON and MessagePack data using the Jsoniter library in both the Doobie and Skunk database modules. New \JsoniterCodec\ objects provide \json\, \jsonb\, and \msgpack\ codecs that leverage \com.github.plokhotnyuk.jsoniter\_scala\ for efficient encoding and decoding, allowing applications to switch from default JSON handling to the high-performance Jsoniter implementation.

modules/doobie-jsoniter, modules/skunk-jsoniter · high confidence

Add PlantUML diagram support in mdoc

Users can now include PlantUML diagrams in their documentation by using the \plantuml\ directive. The new \PlantumlModifier\ registers this capability, allowing code blocks to be rendered as SVG images via the PlantUML server. The implementation defaults to the 'toy' theme for visual styling.

mdoc-plantuml · high confidence

Added Circe and Upickle codecs for the skunk backend

Users can now serialize and deserialize JSON and JSONB data in the skunk backend using either Circe or Upickle libraries. The new CirceCodec module provides \json\ and \jsonb\ codecs, while the UpickleCodec module adds support for \json\, \jsonb\, and MessagePack (\msgpack\) serialization, allowing developers to choose their preferred JSON library for database interactions.

modules/doobie-circe, modules/skunk-circe · high confidence

Added compile-time validation for PostgreSQL namespace names

The \modules/postgres\ module now includes a \PGNamespace\ opaque type that enforces PostgreSQL naming rules at compile time. Users can create namespace identifiers using a macro constructor (\`PGNamespace(

modules/postgres · high confidence

Introduce CQRS backend with command caching and retry logic

The CQRS backend module now provides a configurable \BackendBuilder\ that assembles a \Backend\ from a \StorageDriver\, an optional in-memory command cache, and a state cache. The command cache prevents redundant command processing by tracking executed command IDs, while the state cache (LRU) reduces database load by storing recent aggregate states. The \CommandHandler\ now includes built-in retry logic with jitter for handling version conflicts, configurable via \withRetryConfig\. Additionally, a \Notifications\ system using circular buffers allows consumers to subscribe to outbox and state update streams.

modules/backend/src/main/scala/cqrs · high confidence

New Doobie-based PostgreSQL persistence backend

Added a new persistence backend for PostgreSQL using the Doobie library, enabling users to store event-sourced state and command data in a relational database. This change introduces the \edomata.doobie\ package, which includes \DoobieDriver\ for event sourcing (with journal, snapshot, and outbox support) and \DoobieCQRSDriver\ for CQRS-style storage. The implementation provides \BackendCodec\ for serializing state and events as JSON, JSONB, or binary, and defines the necessary database schema (tables for journal, outbox, snapshots, and commands) along with readers and repositories to handle persistence operations.

modules/doobie/src/main · high confidence

New eventsourcing backend with command caching and retry logic

The \modules/backend/src/main/scala/eventsourcing\ directory now contains the implementation of the eventsourcing backend. This includes a \BackendBuilder\ that allows configuring command caching (with an in-memory default) and retry policies (with jitter) for command handling. The implementation introduces a \CachedRepository\ to optimize command processing by checking a command store and snapshots before hitting the underlying storage, and a \SnapshotStore\ with support for both in-memory and persisted snapshots, including deduplication of snapshot items on persistence.

modules/backend/src/main/scala/eventsourcing · high confidence

New examples demonstrating Skunk backend and CQRS integration

Added two new example files, Example1.scala and StomatonExample.scala, to illustrate the usage of the new Skunk backend and CQRS capabilities. Example1.scala shows a full application setup using the SkunkDriver with Circe codecs for JSONB storage, including session pooling and retry configuration. StomatonExample.scala demonstrates the CQRS model pattern, including the use of SkunkCQRSDriver and event handlers, providing a reference for implementing command/query separation with the new backend modules.

examples · high confidence

Project initialization and repository scaffolding

The repository has been initialized with the Edomata project, including the Apache 2.0 license, code of conduct, and a README detailing usage for Scala, Scala.js, and Scala Native. Development and CI workflows are established using Nix (flake.nix) and GitHub Actions (ci.sbt), with Docker Compose configured for PostgreSQL test databases. The build is configured with sbt-typelevel, pinned to Scala 3.3 LTS, and uses scalafmt 3.11.5 for code formatting.

(repo-wide) · high confidence

Removals

Removed HTTP endpoint routing and backend test infrastructure

The HTTP route definitions for FSM commands (FSMRoute) and their associated integration tests have been removed from the endpoint module. Additionally, the backend test kit infrastructure—including the DomainSuite trait, FakeCommandHandler, ScenarioCommandHandler, and Timeline utilities used for testing domain logic—has been deleted from the testkits/backend module.

modules/endpoint, testkits/backend · high confidence

Removed initial event-sourcing implementation draft

The \modules/eventsourcing\ module has been cleared of its initial draft code, removing all core abstractions and implementations. This includes the deletion of the \Journal\ and \SnapshotStore\ traits, their in-memory implementations (\InMemJournal\, \InMemSnapshotStore\), the \ESRepository\ interface and its \MyESRepository\ implementation, along with supporting types like \ConsumerController\, \JournalConsumer\, \SnapshotCache\, and the \Transition\ type. Corresponding unit tests for these components have also been removed.

modules/eventsourcing · high confidence

Behavioural changes

Backend refactored to support CQRS and Event Sourcing with outbox and retry mechanisms

The backend module has been restructured to support both Event Sourcing and CQRS patterns, replacing the previous single-pattern implementation. Users can now build backends for either domain type via the new \Backend.builder\ entry points. The change introduces an outbox pattern with \OutboxReader\ and \OutboxConsumer\ to handle event publishing, and adds a retry mechanism with jitter in \Helpers\ to handle \VersionConflict\ errors during command processing. Additionally, the internal \LRUCache\ has been refactored to implement a new \Cache\ trait with conditional replace capabilities, and the package has been renamed from \edfsm\ to \edomata\.

modules/backend/src/main/scala · high confidence

Core domain modeling API restructured with new DSLs and types

The core module has been refactored to introduce a new domain modeling architecture. The previous \edfsm.core\ package has been replaced by \edomata.core\, featuring new \Edomaton\ and \Stomaton\ types for event-driven state machines, alongside a comprehensive DSL (\DomainDSL\, \CQRSDomainDSL\) for constructing domain logic. The response model has been updated from \Response\ to \ResponseD\ (built on \ResponseT\), and the \Action\ monad now wraps \ResponseD\ directly. Additionally, \RequestContext\ and \CommandMessage\ types have been introduced to standardize input handling, while legacy files like \EDFSM\ and \Request\ have been removed.

modules/core/src/main · high confidence

Migrated documentation site to Typelevel Helium and updated build infrastructure

The project documentation site has been rebuilt using the Typelevel Helium theme, replacing the previous microsites setup. This change introduces a new landing page with updated metadata, navigation links to related Typelevel projects (cats, cats-effect, fs2), and specific teasers highlighting Edomata's features such as cross-platform support and functional design. The build infrastructure has been significantly modernized: sbt has been upgraded to version 1.13.0, and the plugin suite has shifted to the Typelevel ecosystem (sbt-typelevel, sbt-typelevel-site) while adding support for Scala Native and Scala.js. Additionally, core library dependencies have been updated to their latest versions, including Cats 2.13.0, Cats Effect 3.7.1, FS2 3.14.0, and Doobie 1.0.0-RC12.

project · high confidence

Skunk backend persistence layer refactored and modernized

The \modules/skunk/src/main\ persistence implementation has been completely rewritten to use the \edomata\ package structure and the \BackendCodec\ abstraction for type-safe serialization, replacing the legacy \edfsm\ codebase. Old files such as \DAOError\, \DataAccessLayer\, \Database\, \PGJournal\, and \PGServiceBuilder\ have been removed and replaced with new, modular components including \SkunkDriver\, \SkunkCQRSDriver\, \SkunkRepository\, \SkunkCQRSRepository\, \SkunkJournalReader\, \SkunkOutboxReader\, and \SkunkSnapshotPersistence\. This change introduces a cleaner separation between Event Sourcing and CQRS storage drivers, utilizes \Resource\-based session pooling for safer database access, and standardizes schema management and query definitions within the \Queries\ object.

modules/skunk/src/main · high confidence

Test coverage

Added Doobie integration tests for event sourcing and CQRS backends; Added comprehensive test suites for core Decision, Stomaton, and ResponseT components; Added end-to-end tests for the accounts module with Doobie and Skunk backends; Added integration test suites for backend storage and CQRS implementations; Added munit integration module; Added test coverage for CQRS backend components; Added test suite and test doubles for backend components; Added tests for the eventsourcing backend components; Migrated skunk backend tests to edomata compatibility suites.

Dependencies

Upgrade to Scala 3.3.6 and update core dependencies

The project has upgraded its base Scala version from 3.1.0 to 3.3.6. This change is accompanied by updates to key libraries, including scala-java-time to 2.7.0 for JavaScript platforms and PlantUML to 1.2026.8 for documentation generation. The build structure has also been refactored to use the Typelevel sbt plugin conventions, updating the base version to 0.13 and reorganizing module definitions.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 59 → 59 (-0.2)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (+0.0)
  • Architecture 89 → 88 (-1.7)
  • Maturity 62 → 62 (+0.0)
  • Readiness 44 → 45 (+1.5)
  • Security 82 → 74 (-8.8)
  • Performance 100 → 100 (+0.0)

Resolved (4)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no project overview (docs/tutorials/1-1_eventsourcing.md)
  • Documentation: no project overview (docs/tutorials/1-2_cqrs.md)

New (1)

  • Outdated: net.sourceforge.plantuml:plantuml

Changes since last survey

  • 6 commits — 6 feature/other, 0 fixes

By area

  • project/Dependencies.scala — 4 commits
  • (root) — 1 commit
  • project/build.properties — 1 commit

Notable commits

  • change: Update jsoniter-scala-core to 2.42.0 (#701)
  • change: Update jsoniter-scala-core to 2.42.1 (#704)
  • change: Update jsoniter-scala-core to 2.42.2 (#710)
  • change: Update jsoniter-scala-core to 2.42.3 (#712)
  • change: Update sbt, scripted-plugin to 1.13.1 (#703)
  • change: flake.lock: Update (#711)

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

Survey your own repository

hnaderi/edomata 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 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 55a5b8f01a2359acb6abde2f9948f01ee513b9d0 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.