Skip to content
CAI
Software that uses CAICheck a score

archimedes-projects/archimedes-jvm

54.3

Adequate · 21 September 2026

4.4k

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 modular Java/Kotlin framework that provides infrastructure for building enterprise applications, featuring a CQRS-based use-case execution pipeline with built-in transaction, audit, and security interceptors. It includes a type-safe SQL query builder and JDBC data access layer, alongside utilities for logging, collections, and authentication. The framework supports both Micronaut and Spring Boot environments, offering integration modules for dependency injection, transaction management, and security context handling.

How it got here

2021 — CQRS and use-case architecture

24 changes.

This period focused on implementing a structured application architecture based on CQRS and use-case patterns, introducing interceptor-based pipelines for transactional and audit support. The work also expanded framework integrations for Spring Boot and Micronaut, alongside a foundational JDBC data access layer and security context management.

2022–2025 — Micronaut migration and SQL builder

6 changes.

This period focused on modernizing the project's infrastructure by migrating the build system from Maven to Gradle and introducing a new Micronaut-based security authentication module. Concurrently, the codebase expanded its data access capabilities with a new type-safe SQL criteria builder and associated test coverage.

Features

Add Micronaut integration for security context

Users can now use the Archimedes security API within Micronaut applications. A new \MicronautSecurityContext\ class bridges Micronaut's \SecurityService\ to the framework's security context, exposing the authenticated user's name and role checks. The username is retrieved via the \SecurityService\, and authentication status is exposed through the standard \SecurityContext\ interface.

archimedes-security/src/main/kotlin/io/archimedesfw/security/micronaut · medium confidence

Add Micronaut integration for the ServiceLocator

The Micronaut integration module now provides a concrete implementation of the ServiceLocator pattern, allowing applications to resolve beans from the Micronaut ApplicationContext. This includes the core ServiceLocator interface and its Micronaut-specific holder, enabling manual bean lookup in scenarios where dependency injection is not possible. Additionally, a FakeServiceLocator is introduced for testing purposes, allowing tests to register mock or stubbed beans, with corresponding JUnit extensions and service loader configurations to automatically reset the locator between tests.

archimedes-context-micronaut · high confidence

Add Spring Boot integration for versioned JDBC repositories

Introduces a new Spring Boot module (archimedes-data-jdbc-spring) that provides a Spring-aware implementation of the JdbcTemplate interface and a factory for dependency injection. This enables the framework's versioned entity repository features to be used within Spring Boot applications, supported by integration tests and test configuration resources.

archimedes-data-jdbc-spring · high confidence

Add new utility classes and extensions for collections, time, and JDBC

The archimedes-commons-lang module introduces several new capabilities: a CircularIterator for wrapping iterables in a loop, collection extensions including requireSingle and average for BigDecimals, JDBC helper methods for setting and getting nullable types from PreparedStatement and ResultSet, a LazyVar for lazy property initialization, and time utilities for UTC conversion and interval calculations. Tests are added for all new functionality.

archimedes-commons-lang · high confidence

Added SLF4J logging utility for Kotlin

A new Kotlin extension function \logger()\ is now available in the \archimedes-commons-logging-slf4j\ module, providing a convenient way to obtain an SLF4J Logger instance for any reified type.

archimedes-commons-logging-slf4j · high confidence

Added transactional execution interface and no-op implementation

The archimedes-data-tx module now provides a Transactional interface that defines four methods for executing code blocks: newReadOnly, newWritable, readOnly, and writable. A corresponding NoOpTransactional class implements this interface, providing a pass-through behavior where the provided blocks are executed directly without any transactional overhead. This allows users to inject a no-op transactional strategy when transaction management is not required.

archimedes-data-tx · high confidence

Adds Spring-based transactional execution support

Users can now execute database operations using Spring's transaction management. This change introduces a new \DataSourceTxManagerFactory\ and \SpringTransactional\ implementation that integrates with Spring's \@Transactional\ annotations, allowing for standard Spring transactional behavior (REQUIRED, REPLACES, READ-otly) within the Archimedes framework. An integration test suite (\SpringTransactionalIT\) validates the transactional semantics, ensuring that write operations are properly rolled back on failure and that read-only constraints are enforced.

archimedes-data-tx-spring · high confidence

Initial implementation of Micronaut transactional support

This change introduces the initial implementation of the Micronaut integration for data transactions. It adds the \DefaultMicronautTransactional\ class which provides transactional execution using Jakarta EE annotations (\@Transactional\, \@ReadOnly\) and integrates with Micronaut's dependency injection. The entry also includes the corresponding integration tests (\MicronautTransactionalIT\) and supporting test resources (SQL migration, test configuration, and logging setup) to verify transactional behavior.

archimedes-data-tx-micronaut · high confidence

Introduce BulkAction API for transactional batch processing

A new BulkAction API has been added to the archimedes-data-tx-action module, enabling batch processing of elements with configurable transactional behavior. The implementation includes a BulkAction class that iterates over collections or streams, applying a user-provided action to each element while tracking success and error states. The system supports three transactional modes: no transaction, read-only transaction, and writable transaction, all managed via the DefaultBulkActionFactory. Each element can be identified via a customizable ElementIdentifier, with a default ToStringElementIdentifier implementation provided. The BulkActionSummary class aggregates results, providing counts of successes and errors, and offers a successOrThrow() method to fail fast if any errors occurred.

archimedes-data-tx-action/src/main · high confidence

Introduce CQRS action bus with interceptor-based processing and audit logging

The archimedes-cqrs module now provides a new CQRS implementation that separates action messages from their handlers. An \ActionBus\ dispatches actions through an \ActionInterceptor\ chain, which includes a \HandlerExecutorInterceptor\ to invoke the correct \ActionHandler\ from an \ActionHandlerRegistry\. A \TransactionalInterceptor\ manages read-only and writable database transactions based on the message type. Additionally, an \AuditInterceptor\ records execution details, including the principal name (or 'ANONYMOUS' if unauthenticated), into an \AuditLog\ persisted via \AuditRepository\. This introduces a structured way to handle commands and queries with built-in transaction and audit support.

archimedes-cqrs · high confidence

Introduce Micronaut integration for Archimedes JDBC template and SQL builder

Added Micronaut-specific implementations for the Archimedes JDBC template and SQL configuration. The new MicronautJdbcTemplate class provides a @Singleton bean that wraps Micronaut's JdbcOperations to execute SQL updates, batch updates, and queries using the existing Archimedes JDBC interfaces. Additionally, a SqlConfig factory creates singleton beans for SqlBuilder and CriteriaBuilder, enabling dependency injection of the new SQL query builder components within the Micronaut application context.

archimedes-data-jdbc-micronaut · high confidence

Introduce Micronaut-based security authentication module

A new security authentication module for Micronaut has been added, providing implementations for user and role management, password handling, and OAuth2/refresh token flows. The module introduces core domain models such as Subject, Role, and UsernamePrincipal, along with service interfaces and default implementations (e.g., DefaultRoleService, DefaultSubjectService) that manage these entities. It includes password authentication via Spring's BCrypt encoder and integrates with Micronaut's security framework through an AuthenticationProvider and OpenID Connect mappers. Additionally, it provides JDBC-based persistence for subjects, roles, passwords, and refresh tokens, enabling full-stack authentication capabilities within the Micronaut environment.

archimedes-security-auth-micronaut · high confidence

Introduce core security context management with thread-local storage

The security module now provides a new \Security\ object that manages the current authentication context using a \ThreadLocalSecurityContextHolder\. This allows applications to temporarily switch the security context using \Security.runAs\, which automatically restores the previous context even if an exception is thrown. The \SecurityContext\ interface defines methods for checking authentication status, roles, and principal names, with deprecated warnings guiding users toward the \name\ property and \hasRole\ method.

archimedes-security/src/main/kotlin/io/archimedesfw/security · high confidence

Introduces JDBC data access layer with criteria-based querying and versioned entity support

Adds a new JDBC data access module providing a structured way to query and persist entities. The change introduces a criteria-based DSL (AndCriteria, OrCriteria, Criterion) for building SQL conditions, along with abstract repository implementations (AbstractRepository, AbstractRepositoryVersioned) that handle insert/update logic and versioned entity lifecycle management. It also includes supporting interfaces and classes for entity definitions (Entity, EntityVersioned), ID generation strategies, and SQL generation helpers, enabling developers to perform database operations using a fluent, composable query builder pattern.

archimedes-data-jdbc/src/main/kotlin/io/archimedesfw/data · high confidence

Introduces an interceptor-based use-case execution pipeline with audit, security, and transactional support

The archimedes-usecase module now executes use cases through a chain of interceptors that handle auditing, security checks, and transaction management. A new UseCaseBus orchestrates this pipeline, allowing each use case to be wrapped with cross-cutting concerns. The audit interceptor logs execution details to an AuditLog, which is persisted via a new AuditRepository and JdbcAuditRepository implementation. Security checks are performed by the SecureInterceptor, which currently does nothing but is designed to enforce permissions. The TransactionalInterceptor manages read-only and writable database transactions based on the use case's isReadOnly flag. The UseCase base class provides a run() method for implementation and uses a copied implementation of the Kassava library for reflection-based equality, hashCode, and toString methods.

archimedes-usecase/src/main · high confidence

Micronaut integration for action handler registry

The CQRS module now includes a new \MicronautActionHandlerRegistry\ implementation that resolves action handlers via the Micronaut \BeanLocator\. This change enables automatic registration and retrieval of handlers within the Micronaut framework, allowing the application to locate the correct handler for a given action message using Micronaut's dependency injection.

archimedes-cqrs-micronaut · high confidence

New JDBC data access layer with Kotlin DSL and query builder

The Archimedes framework introduces a new JDBC module providing a Kotlin-centric data access layer. This includes a fluent QueryBuilder for constructing SQL statements, a JdbcTemplate for executing queries and updates, and repository classes (JdbcRepository, JdbcRepositoryVersioned) that simplify standard CRUD operations. The update also adds support for mapping enum columns to Kotlin types and allows prepared statement parameters to start at an index other than 1.

archimedes-data-jdbc/src/main/kotlin/io/archimedesfw/data/jdbc · high confidence

New SQL criteria builder for type-safe query construction

The \archimedes-data-jdbc\ module introduces a new SQL criteria builder that allows constructing type-safe SELECT, INSERT, UPDATE, and DELETE queries using a fluent API. This includes a \CriteriaBuilder\ to initiate queries, domain classes for \Table\ and \Column\ definitions, and a comprehensive set of \Predicate\ and \Expression\ classes (such as \AndPredicate\, \BinaryPredicate\, and \SqlExpression\) to build complex WHERE clauses. The \SqlBuilder\ component then compiles these criteria objects into executable SQL strings, supporting features like joins, ordering, and parameterized queries.

archimedes-data-jdbc/src/main/kotlin/io/archimedesfw/data/sql · high confidence

Behavioural changes

Migrate build system from Maven to Gradle

The project's build system has been migrated from Maven to Gradle. This change introduces the Gradle wrapper (including the wrapper JAR and properties file) to manage the build environment, replacing the previous Maven-based build configuration.

gradle · high confidence

Migrate build system to Gradle with Micronaut 4.8 and Kotlin 2.1.20

The project has migrated from Maven to a Gradle-based build system, introducing new convention plugins in buildSrc to configure Micronaut (runtime: Netty, AOT optimizations, and KSP annotation processing) and standardize JVM 21, Kotlin 2.1.20, and testing dependencies. Additionally, a new DefaultMicronautBulkActionFactory implementation is added to the archimedes-data-tx-action-micronaut module, providing a Micronaut-specific singleton for bulk actions.

archimedes-data-tx-action-micronaut, buildSrc · medium confidence

Project build system migrated from Maven to Gradle

The project has switched its build system from Maven to Gradle, introducing Gradle wrapper scripts (gradlew, gradlew.bat) and a .gitignore configuration for the new build artifacts. The README has been updated to reflect the new build commands using Gradle.

(repo-wide) · high confidence

Test coverage

Add tests for Security.runAs context management; Added FakeSecurityContext test utility; Added integration and unit tests for the BulkAction feature; Added integration test for transactional use-case interception; Added test resources for database migration and logging; Added tests and test utilities for the use-case module; Added tests for Criteria, EntityVersionedToIntervalConverter, and GeneratedKeysHolder; Added tests for SQL criteria builder components; Added tests for audit functionality.

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

Lenses

  • Code Health 98 → 98 (+0.6)
  • Architecture 100 → 74 (-25.9)
  • Maturity 45 → 45 (+0.0)
  • Readiness 52 → 47 (-5.3)
  • Security 65 → 75 (+9.8)

Resolved (9)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (archimedes-cqrs/src/main/kotlin/io/archimedesfw/cqrs/interceptor/audit/persistence/jdbc/JdbcAuditRepository.kt)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Scanner failed to run — not a clean result
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (11)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (archimedes-data-jdbc/src/main/kotlin/io/archimedesfw/data/jdbc/JdbcRepository.kt)
  • Duplicated block (14 lines × 2) (archimedes-cqrs/src/main/kotlin/io/archimedesfw/cqrs/interceptor/audit/persistence/jdbc/JdbcAuditRepository.kt)
  • Duplicated block (8 lines × 2) (archimedes-data-jdbc/src/main/kotlin/io/archimedesfw/data/jdbc/JdbcRepository.kt)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No dependency advisory monitoring
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result
  • TodoComment (archimedes-data-jdbc/src/main/kotlin/io/archimedesfw/data/sql/criteria/builder/SqlWhereBuilder.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

archimedes-projects/archimedes-jvm 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 9c010c6f689fbbc55870e9113aa69156de553340 — 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.