rahulsom/grooves
62.0
Adequate · 21 September 2026
6.5k
lines of production code
Java
with Kotlin, Groovy
4
measurements over time
What this system is
Grooves is an event-sourcing library for the JVM that enables the construction of event-sourced aggregates and read-model queries. It provides a core engine for computing snapshots from event streams, supporting both versioned and temporal consistency models with reactive stream integration. The system offers language-specific tooling for Java and Groovy, including compile-time validation of query implementations via annotation processors and AST transformations. Additionally, it includes utilities for visualizing event-sourcing diagrams and example applications demonstrating integration with Spring Boot and Kotlin.
How it got here
2017 — Kotlin migration and reactive API overhaul
15 changes.
The project underwent a significant architectural shift by migrating core modules from Groovy to Kotlin and replacing synchronous interfaces with reactive streams based on RxJava. This period also saw the standardization of the build environment through a transition to Gradle version catalogs and the introduction of Java support via a new annotation processor for compile-time query validation.
2019–2022 — Query engine and documentation features
15 changes.
This period focused on implementing a comprehensive functional-style query engine for temporal and versioned snapshots, including internal execution infrastructure and compile-time validation via Groovy AST transformations. It also introduced an Asciidoctor extension for rendering Event Sourcing diagrams as SVGs and expanded the project's example applications to demonstrate these capabilities in Spring Boot/Kotlin and push-style architectures.
2023–2026 — Core refactoring and test infrastructure
7 changes.
The project refactored its core event-sourcing logic by introducing Java-based functional interfaces and a new query implementation to replace previous Kotlin code. This period also established robust testing standards by adding JUnit 5 suites for examples and AST transformations, alongside a Gradle plugin to enforce non-regressing test coverage.
Features
Add CodeNarc static analysis configuration
Introduces a new CodeNarc ruleset configuration file at gradle/codenarc/codenarc.groovy to enable static code analysis for the project. The configuration enables a broad set of rule sets including basic, braces, concurrency, design, enhanced, exceptions, formatting, generic, grails, groovyism, imports, jdbc, junit, logging, naming, serialization, size, and unused rules. Several specific rules are disabled or customized, such as disabling class javadoc requirements, compile static checks, and certain naming conventions, while formatting rules like space around map entry colons are adjusted to specific regex patterns.
gradle/codenarc · high confidence
Add Kotlin-based Spring Boot example application
Introduces a new Kotlin implementation of the Grooves example application within the Spring Boot ecosystem. This includes the main application entry point, a REST controller exposing patient and event endpoints, a bootstrap component for seeding test data, and supporting beans for dependency injection, providing a concrete reference for using the Grooves library with Kotlin and Spring Boot.
grooves-example-springboot-kotlin/src/main/kotlin/grooves/boot/kotlin · high confidence
Add Push Style Event Sourcing example
The grooves-example-pushstyle module has been added to demonstrate a push-based event sourcing pattern using Grooves. This example includes a complete banking application setup with an Application entry point, an EventService that processes transactions via a Guice-injected EventBus, and a Balance snapshot implementation. It introduces ContextAwareScheduler and ContextManager to handle RxJava threading context propagation, ensuring that transaction data is correctly carried across threads during event processing. The example also provides the necessary database schema migration and test cases to verify deposit and withdrawal operations.
grooves-example-pushstyle · high confidence
Add indented method tracing via @Trace annotation
Users can now annotate methods with @Trace to enable hierarchical, indented logging of method entry, exit, and exceptions. This new AspectJ-based feature automatically tracks nesting depth and formats output at the trace level, making it easier to follow complex call flows in logs.
grooves-core/src/main/java/com/github/rahulsom/grooves/logging · high confidence
Add patient account and health query projections
New Kotlin query projections have been added for the Patient aggregate to maintain read-model snapshots. The PatientAccountQuery tracks financial state by updating the balance and money made on procedure and payment events, while the PatientHealthQuery maintains a list of procedures performed. Both components implement the framework's query support interfaces to retrieve snapshots and apply relevant domain events.
grooves-example-springboot-kotlin/src/main/kotlin/grooves/boot/kotlin/queries · high confidence
Added Spring Data MongoDB repositories for patient domain entities
The example application now includes a new \PatientRepository.kt\ file defining Spring Data MongoDB repositories for the patient domain. This introduces blocking and reactive interfaces for \Patient\, \PatientEvent\, \PatientAccount\, and \PatientHealth\, enabling data access operations such as finding events by aggregate ID and position/timestamp ranges, and retrieving account or health snapshots based on the last event position or timestamp.
grooves-example-springboot-kotlin/src/main/kotlin/grooves/boot/kotlin/repositories · high confidence
Compile-time validation of Query event handlers
The grooves-groovy module now includes internal AST transformations that enforce compile-time correctness for Query implementations. When a class is annotated with @Query, the system verifies that it contains properly signed methods (returning Publisher\<EventApplyOutcome\> and accepting the specific Event and Snapshot types) for every event registered to its associated aggregate. If a required handler method is missing or has an incorrect signature, the build fails with a clear error, preventing runtime issues caused by unhandled events.
grooves-groovy/src/main/java/com/github/rahulsom/grooves/groovy/transformations/internal · high confidence
Grooves site now features a dynamic version dropdown and Playwright-based testing
The grooves-site now includes a new landing page (index.html) with a 'Documentation' button that opens a dropdown menu dynamically populated with version links from src/versions.json (categorizing versions as supported, upcoming, and old). This functionality is implemented in src/main.ts using jQuery and Bootstrap 5, and is supported by a new npm build toolchain (npmw, .ntw.sh) and Playwright end-to-end tests (tests/dropdown.spec.ts, tests/layout.spec.ts, tests/responsive.spec.ts, tests/visual.spec.ts) that verify the dropdown behavior, layout, responsiveness, and visual appearance across different viewports.
grooves-site · high confidence
Introduce Asciidoctor extension for rendering Event Sourcing diagrams as SVG
This change adds a new Asciidoctor extension (registered as the \esdiag\ block) that allows users to embed Event Sourcing diagrams directly into their documentation. The extension parses a structured text input representing aggregates and events, then generates a scalable vector graphic (SVG) output. The rendering logic, implemented in Kotlin classes such as \SvgBuilder\, \Aggregate\, and \Event\, handles layout calculations, positioning, and the drawing of visual elements like circles, lines, and paths. Styling is defined in a new SCSS file (\esdiag.scss\) which is compiled and embedded into the SVG, supporting visual distinctions for event types such as Revert, DeprecatedBy, Join, and Disjoin. The extension automatically caches generated SVGs based on a SHA256 hash of the input content.
grooves-diagrams/src/main · high confidence
Introduce GroovesQueryImpl for snapshot computation
Added the default implementation of the GroovesQuery interface, which orchestrates functional components to build snapshots from event streams. This component handles redirects, deprecations, reverts, and exceptions, allowing users to compute aggregate snapshots by applying event logic through the provided providers and classifiers.
grooves-core/src/main/java/com/github/rahulsom/grooves/impl · high confidence
Introduce core event-sourcing query types and builder
The grooves-core module now exposes the foundational types for its event-sourcing query engine. Users can build queries via GroovesQueryBuilder, which validates that all required providers (such as snapshot, event, and deprecation handlers) are configured before creating a GroovesQuery instance. The query engine returns GroovesResult, a sealed interface distinguishing between successful snapshot computations and redirects to other aggregates or versions. Supporting types include EventType (Normal, Revert, Deprecates, DeprecatedBy) to classify event semantics, EventApplyOutcome to control snapshot processing flow, and DeprecatedByResult to track deprecation relationships.
grooves-core/src/main/java/com/github/rahulsom/grooves · high confidence
Introduce functional-style query builders for temporal and versioned snapshots
The queries package now provides a functional, builder-based API for constructing read-model queries. Users can use Grooves.versioned() and Grooves.temporal() to configure snapshot retrieval, event loading, and event application logic via fluent setters (e.g., withSnapshot, withEvents, withEventHandler). This replaces or supplements previous query construction patterns with a more composable, functional style that supports both version-based and timestamp-based snapshot computation, including support for joins and deprecation redirects.
grooves-api/src/main/java/com/github/rahulsom/grooves/queries · high confidence
Introduces internal query execution framework
The \grooves-api\ module now includes a new internal package (\com.github.rahulsom.grooves.queries.internal\) that provides the core infrastructure for executing queries. This includes interfaces like \BaseQuery\ and \Executor\, along with implementations such as \QueryExecutor\, \JoinExecutor\, and \SimpleExecutor\ to handle event application, snapshot management, and join operations. Utility classes like \Utils\ and \Pair\ support these operations, enabling the system to process events, manage snapshots, and handle complex query logic internally.
grooves-api/src/main/java/com/github/rahulsom/grooves/queries/internal · high confidence
Java annotation processor for query validation
Added Java support to Grooves, introducing three source-level annotations—@Aggregate, @Event, and @Query—and a corresponding annotation processor (QueryProcessor). The processor validates that every Query implementation includes the required apply methods for all events associated with its target Aggregate, ensuring compile-time consistency between queries, aggregates, and events.
grooves-java/src/main · high confidence
New Gradle plugin to track and enforce test count growth
A new included build plugin (\count-tests\) has been added to the Gradle configuration. It introduces a \countTests\ task that aggregates test results from all submodules, compares current counts against previous runs stored in \test-counts.properties\, and displays a summary of increases or decreases. Crucially, the build will now fail if any module's test count decreases, enforcing a policy that test coverage must not regress.
gradle/plugins/count-tests · high confidence
New Groovy AST transformation annotations for Aggregates, Events, and Queries
The grooves-groovy library now provides three new Java annotations—@Aggregate, @Event, and @Query—in the transformations package to enable compile-time AST transformations. @Aggregate marks a class as an event-sourced aggregate, @Event defines an event type linked to a specific aggregate, and @Query defines a read-model query that computes a Snapshot from an aggregate and its events. These annotations allow developers to use Groovy's AST transformation capabilities to generate implementation code for these domain concepts.
grooves-groovy/src/main/java/com/github/rahulsom/grooves/groovy/transformations · high confidence
New Spring Boot JPA example for event sourcing with RxJava queries
This location introduces a complete example application demonstrating event sourcing using Spring Boot, JPA, and RxJava. It provides REST endpoints for managing Patient and Zipcode aggregates, utilizing JPA repositories to persist events and snapshots in an RDBMS. The example includes domain models for patients and zipcodes, query projections for patient accounts and health records, and a bootstrap component that seeds the database with sample data to illustrate temporal and versioned snapshot queries.
grooves-example-springboot-jpa · high confidence
New domain models for patient management and health tracking
This change introduces the core domain classes for the patient example: \Patient\ as the base aggregate, \PatientAccount\ and \PatientHealth\ as snapshot aggregates managing financial balances and medical procedures respectively, and \PatientEvent\ defining the event stream including creation, procedure, payment, and deprecation events. These classes implement the Grooves framework's \Snapshot\ and \BaseEvent\ interfaces to enable event sourcing capabilities for patient data.
grooves-example-springboot-kotlin/src/main/kotlin/grooves/boot/kotlin/domain · high confidence
Behavioural changes
Core event-sourcing function interfaces added
The \grooves-core\ module now exposes a set of Java functional interfaces in the \functions\ package to define event-sourcing behavior, replacing previous Kotlin implementations. These interfaces include \EventHandler\ for applying events to snapshots, \SnapshotProvider\ and \EmptySnapshotProvider\ for retrieving or creating snapshots, \EventsProvider\ for fetching event streams, and specialized handlers for deprecation (\Deprecator\, \DeprecatedByProvider\), event classification (\EventClassifier\), versioning (\EventVersioner\, \SnapshotVersioner\), and exception handling (\ExceptionHandler\).
grooves-core/src/main/java/com/github/rahulsom/grooves/functions · high confidence
Introduction of reactive snapshot and join interfaces
The internal snapshot API now defines \BaseSnapshot\ and \BaseJoin\ interfaces that utilize Reactive Streams (\Publisher\) for aggregate retrieval and deprecation tracking. \BaseSnapshot\ exposes methods to get and set the current aggregate, as well as track deprecation relationships, while \BaseJoin\ extends this to manage joined aggregates. This shifts the underlying data access pattern to be reactive, allowing consumers to handle aggregate state and relationships asynchronously.
grooves-types/src/main/kotlin/com/github/rahulsom/grooves/api/snapshots/internal · high confidence
JavaEE example now runs tests in Docker via Testcontainers
The JavaEE example application has been updated to use Testcontainers for its test execution, replacing the previous setup. Tests now spin up an isolated Open Liberty container (using the \openliberty/open-liberty:full-java21-openj9-ubi-minimal\ image) to deploy the application WAR and run acceptance tests against it. This change eliminates the need for a local Liberty installation, ensures a consistent testing environment across different platforms, and improves CI/CD integration by containerizing the runtime.
grooves-example-javaee · high confidence
Migrate event types to Kotlin and introduce reactive stream interfaces
The event type definitions in the \grooves-types\ module have been rewritten from Groovy to Kotlin. This change introduces a new \EventApplyOutcome\ enum to control event processing flow and establishes a set of reactive interfaces (\BaseEvent\, \JoinEvent\, \DisjoinEvent\, \Deprecates\, \DeprecatedBy\, \RevertEvent\) that utilize \org.reactivestreams.Publisher\ for aggregate references. Additionally, the legacy \EventApplyOutcome\ Groovy enum has been removed and replaced with a \GroovesException\ class to handle errors.
grooves-types/src/main/kotlin/com/github/rahulsom/grooves/api/events · high confidence
Project license changed to Apache 2.0 and build environment standardized
The project license has been updated to Apache 2.0, replacing the previous license terms. Additionally, the Gradle wrapper scripts (gradlew and gradlew.bat) have been upgraded to a newer version that includes improved POSIX compliance, better error handling, and explicit JVM memory settings (-Xmx64m/-Xms64m). New configuration files have been added to enforce consistent code formatting via EditorConfig and to ignore specific IDE and build artifacts in .gitignore.
(repo-wide) · high confidence
Removal of Groovy AST-based annotation processing and core API interfaces
The Grooves API has removed its compile-time annotation processing infrastructure, specifically deleting the \@Aggregate\, \@Event\, and \@Query\ annotations along with their corresponding AST transformations (\AggregateASTTransformation\, \EventASTTransformation\, \QueryASTTransformation\). This change eliminates the automatic generation of query interfaces and event application logic that previously relied on these annotations. Additionally, the core API interfaces \AggregateType\, \BaseEvent\, \Snapshot\, \DeprecatedBy\, and \Deprecates\, as well as the \QueryUtil\ trait for computing snapshots, have been removed, indicating a significant restructuring or simplification of the library's core domain model and event handling mechanisms.
grooves-api/src/main/groovy · high confidence
Snapshot interfaces now expose last event timestamp and position
The snapshot API in the grooves-types module has been refactored to make temporal and versioned tracking explicit. The new TemporalSnapshot interface exposes a lastEventTimestamp property, while VersionedSnapshot exposes a lastEventPosition property, allowing users to identify suitable snapshots based on event timing or sequence position. Additionally, new Join interfaces (Join, TemporalJoin, VersionedJoin) have been introduced to handle joined entity snapshots, extending the existing snapshot hierarchy.
grooves-types/src/main/kotlin/com/github/rahulsom/grooves/api/snapshots · high confidence
Test coverage
Added Groovy test resources for reactive query and domain models; Added JUnit 5 tests for Grooves AST transformations; Added Java domain model test resources for event sourcing; Added Java-based test infrastructure for the Grooves example; Added acceptance and builder validation tests for the Grooves query system; Added integration tests for the Spring Boot Kotlin example; Added test infrastructure configuration for JUnit extensions and logging; Added test resources for Java query validation; Added tests for Java query processor validation; Added tests for SVG diagram generation.
Dependencies
Gradle wrapper upgraded to version 9.7.1 with enhanced network configuration
The Gradle wrapper has been updated from version 3.4 to 9.7.1, requiring a significant upgrade for users building the project. The configuration now includes explicit network timeout settings (10 seconds), retry logic with a 500ms backoff, and distribution URL validation to improve build reliability and security.
gradle/wrapper · high confidence
Migrate build system to Gradle version catalogs and Kotlin DSL
The project build has been converted from Groovy to Kotlin DSL (build.gradle.kts) and now uses Gradle version catalogs (gradle/libs.versions.toml) to centrally manage dependency and plugin versions. This change introduces a standardized, type-safe dependency resolution mechanism across all subprojects, including the root build, API, core, diagrams, docs, and example modules, while also configuring Spotless, Checkstyle, JaCoCo, and SonarQube via the catalog.
(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
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 61 → 62 (+0.7)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (+0.6)
- Architecture 100 → 96 (-4.5)
- Maturity 50 → 53 (+2.5)
- Readiness 82 → 73 (-8.1)
- Security 61 → 79 (+18.5)
- Domain Modelling 100 → 65 (-35.3)
- Accessibility 67 → 67 (+0.0)
Resolved (19)
- Build action pinned to a mutable branch
- 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) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/TemporalQuerySupport.java)
- Duplicated block (12 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/BootStrap.java)
- Duplicated block (6 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/queries/CustomQuerySupport.java)
- Duplicated block (7 lines × 2) (grooves-groovy/src/main/java/com/github/rahulsom/grooves/groovy/transformations/internal/EventASTTransformation.java)
- Duplicated block (8 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/TemporalQuerySupport.java)
- Duplicated block (9 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/internal/JoinExecutor.java)
- Duplicated block (9 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/BootStrap.java)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Off-boarding risk: anonymized user #1
- Scanner failed to run — not a clean result
- Test reliability not included
New (22)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (11 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/internal/JoinExecutor.java)
- Duplicated block (12 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/TemporalQuerySupport.java)
- Duplicated block (15–16 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/TemporalQuerySupport.java)
- Duplicated block (25 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/BootStrap.java)
- Duplicated block (6 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/queries/PatientAccountQuery.java)
- Duplicated block (6 lines × 2) (grooves-groovy/src/main/java/com/github/rahulsom/grooves/groovy/transformations/internal/EventASTTransformation.java)
- Duplicated block (69 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/domain/PatientAccount.java)
- Duplicated block (7 lines × 2) (grooves-example-javaee/src/main/java/grooves/example/javaee/BootStrap.java)
- Duplicated block (8 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/TemporalQuerySupport.java)
- Duplicated block (90 lines × 2) (grooves-api/src/main/java/com/github/rahulsom/grooves/queries/FunctionalTemporalQuery.java)
- Edited copy of a member (26 corresponding lines) (grooves-example-javaee/src/main/java/grooves/example/javaee/BootStrap.java)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Medium: security finding (details withheld)
- No ADRs found
- …and 2 more
Changes since last survey
- 50 commits — 31 feature/other, 19 fixes
By area
- gradle/libs.versions.toml — 30 commits
- grooves-site/package-lock.json — 6 commits
- grooves-site/npmw — 5 commits
- (repo) — 2 commits
- gradle/wrapper — 2 commits
- (root) — 1 commit
- .github/workflows — 1 commit
- grooves-api/src — 1 commit
- grooves-example-springboot-jpa/src — 1 commit
- grooves-site/.ntw.sh — 1 commit
Notable commits
- fix: Merge pull request #1723 from rahulsom/fix-lombok-compat
- fix: fix(deps): update dependency ch.qos.logback:logback-classic to v1.6.1 (#1683)
- fix: fix(deps): update dependency ch.qos.logback:logback-classic to v1.6.3 (#1694)
- fix: fix(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.2 (#1698)
- fix: fix(deps): update dependency com.google.guava:guava to v33.7.0-jre (#1702)
- fix: fix(deps): update dependency com.google.guava:guava to v33.7.1-jre (#1703)
- fix: fix(deps): update dependency com.puppycrawl.tools:checkstyle to v13.10.0 (#1696)
- fix: fix(deps): update dependency com.puppycrawl.tools:checkstyle to v13.11.0 (#1700)
- fix: fix(deps): update dependency com.puppycrawl.tools:checkstyle to v14 (#1704)
- fix: fix(deps): update dependency com.puppycrawl.tools:checkstyle to v14.1.0 (#1714)
- fix: fix(deps): update dependency com.squareup.okhttp3:okhttp to v5.5.0 (#1699)
- fix: fix(deps): update dependency org.projectlombok:lombok to v1.18.48 (#1718)
- fix: fix(deps): update groovy monorepo to v5.0.8 (#1684)
- fix: fix(deps): update groovy monorepo to v5.1.0 (#1697)
- fix: fix(deps): update groovy monorepo to v5.1.1 (#1710)
- fix: fix(deps): update groovy monorepo to v5.1.2 (#1719)
- fix: fix(deps): update junit-framework monorepo to v6.1.3 (#1692)
- fix: fix(deps): update slf4j monorepo to v2.0.19 (#1720)
- fix: fix: Address lombok compatibility
- change: Merge pull request #1707 from rahulsom/update-ntw
- …and 30 more
Architecture
- Containers 0 added · 0 removed · contexts 7 added · 2 removed · edges 3 added · 0 removed
Added bounded contexts (7)
- grooves-api
- grooves-core
- grooves-example-javaee
- grooves-example-pushstyle
- grooves-example-springboot-kotlin
- grooves-example-test
- grooves-groovy
Removed bounded contexts (2)
- .
- grooves-types
Added dependency edges (3)
- grooves-example-javaee → grooves-api
- grooves-example-javaee → grooves-example-test
- grooves-example-springboot-kotlin → grooves-example-test
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
rahulsom/grooves 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 d87d69f5f88a297a6a48452e3784fa1bbbea9a5b — 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.