xmolecules/jmolecules
50.9
Weak · 22 September 2026
3.2k
lines of production code
Java
with Kotlin
7
measurements over time
What this system is
This system is a Java and Kotlin library that provides a comprehensive set of annotations and marker interfaces for modeling architectural styles and domain-driven design concepts. It supports multiple patterns including CQRS, Hexagonal, Layered, and Onion architectures, as well as core DDD building blocks like entities, aggregates, and domain events. The library enables developers to explicitly mark and structure their code to enforce consistent architectural boundaries and domain modeling practices.
How it got here
2020 — DDD and architecture style annotations
7 changes.
This period focused on expanding the jMolecules library with comprehensive annotations for Domain-Driven Design and various architectural styles. New modules were introduced to support CQRS, Hexagonal, Layered, and Onion architectures, alongside foundational DDD building blocks like AggregateRoot and BoundedContext. The work established a standardized way to model domain concepts and enforce architectural boundaries through Java and Kotlin annotations.
2021–2025 — Architecture and DDD feature expansion
6 changes.
This period focused on expanding the library's architectural and domain-driven design capabilities, introducing new annotations for CQRS, Hexagonal Architecture, and Kotlin support. The team also standardized the Maven build environment and introduced a new stereotype meta-annotation to support structured configuration.
Features
Add AggregateRoot annotation for DDD modeling
The jMolecules DDD module now includes an \AggregateRoot\ annotation in both Java and Kotlin, allowing developers to mark classes as aggregate roots in a Domain-Driven Design context. This new annotation, which carries a \@Stereotype\ meta-annotation, provides a standardized way to identify the root entity of an aggregate, supporting the modeling of consistent rules and boundaries within the domain layer.
jmolecules-parent · high confidence
Added project infrastructure and tooling files
The repository now includes essential project configuration files to support development and build processes. This includes an .editorconfig for consistent code formatting, a .gitignore for build artifacts and IDE files, a CODE\_OF\_CONDUCT.md to establish community guidelines, a settings.xml for Maven deployment credentials, an application.yml for changelog configuration, and the Apache Maven Wrapper scripts (mvnw/mvnw.cmd) to ensure consistent Maven versions across environments.
(repo-wide) · high confidence
Introduce @Stereotype meta-annotation and supporting schemas
A new @Stereotype meta-annotation is added to the org.jmolecules.stereotype package, allowing developers to mark types or annotations as representing specific architectural or design elements. This change also introduces JSON Schema definitions for jMolecules stereotypes and stereotype groups, enabling structured configuration and validation of these stereotypes in project files.
jstereotype · high confidence
Introduce layered architecture annotations
The library now provides a set of Java annotations to mark classes and packages for a layered architecture. Specifically, @ApplicationLayer, @DomainLayer, @InfrastructureLayer, and @InterfaceLayer are introduced, each annotated with @Stereotype and @Documented, and configured with RUNTIME retention. These annotations allow developers to explicitly define architectural boundaries in their code, supporting domain-driven design practices by clearly separating application, domain, infrastructure, and interface concerns.
jmolecules-architecture/jmolecules-layered-architecture · high confidence
Introduce new jMolecules modules for architecture styles and events
The project now includes new Maven modules for CQRS, Hexagonal, Layered, and Onion architectural styles, alongside dedicated modules for Domain-Driven Design (DDD) and Events. A new 'jstereotype' module provides the foundational annotations, while a Kotlin-based 'kmolecules-ddd' module offers a Kotlin flavor of the DDD concepts. These modules depend on the core 'jstereotype' library and are managed by a new parent POM that sets the project version to 2.1.0-SNAPSHOT.
(dependencies) · high confidence
Introduces domain event abstractions and externalization support
Adds new annotations and interfaces to express CQRS concepts, including \DomainEvent\, \DomainEventHandler\, and \DomainEventPublisher\ in the \org.jmolecules.event.annotation\ package, alongside corresponding marker interfaces in \org.jmolecules.event.types\. The update also introduces the \@Externalized\ annotation and interface to mark domain events for external publication, and moves the \module-info.java\ to the JAR root.
jmolecules-events/src/main/java · medium confidence
Kotlin support for DDD building blocks
The kmolecules-ddd module now provides Kotlin counterparts for core Domain-Driven Design concepts, including annotations and type interfaces for AggregateRoot, Entity, Factory, Repository, Service, ValueObject, and Association. This enables Kotlin developers to use idiomatic Kotlin constructs to mark and model DDD elements such as entities, value objects, and associations, aligning the Kotlin API with the existing Java implementation.
kmolecules-ddd · high confidence
New DDD building block annotations and types
The library now provides a comprehensive set of Domain-Driven Design (DDD) building blocks. This includes new annotations such as @BoundedContext, @Module, @Association, @Entity, @Factory, @Repository, @Service, and @ValueObject, alongside corresponding marker interfaces and types like AggregateRoot, Association, Identifiable, and Identifier. These additions enable developers to explicitly model and identify core DDD concepts within their applications.
jmolecules-ddd/src/main · high confidence
New Hexagonal Architecture annotations with metadata support
The jmolecules-hexagonal-architecture module now includes new Java annotations for Hexagonal Architecture patterns, including @Adapter, @Application, @Port, @PrimaryAdapter, @PrimaryPort, @SecondaryAdapter, and @SecondaryPort. Each annotation now supports 'name' and 'description' attributes to provide metadata for external tooling, and all annotations use runtime retention to ensure they are available for reflection-based processing.
jmolecules-architecture/jmolecules-hexagonal-architecture · high confidence
Behavioural changes
Deprecate legacy CQRS annotations in favor of new architecture markers
The CQRS architecture module now provides new, non-deprecated annotation types in the \org.jmolecules.architecture.cqrs\ package (\Command\, \CommandDispatcher\, \CommandHandler\, \QueryModel\) that serve as the primary interface for expressing CQRS concepts. The corresponding annotations in the \org.jmolecules.architecture.cqrs.annotation\ package are now marked as deprecated and will be removed in version 2.0. Users should migrate their code to use the new annotations to ensure future compatibility.
jmolecules-architecture/jmolecules-cqrs-architecture/src/main/java · high confidence
Onion architecture annotations now use runtime retention and are documented
The Java annotations for the onion architecture (ApplicationRing, DomainRing, DomainModelRing, DomainServiceRing, and InfrastructureRing) have been updated to use runtime retention, making them available at runtime for frameworks that inspect annotations dynamically. Additionally, all these annotations are now marked with @Documented, ensuring they appear in generated JavaDoc. The stereotype metadata in jmolecules-stereotypes.json has been updated to reflect these changes.
jmolecules-architecture/jmolecules-onion-architecture · high confidence
Updated Maven Wrapper to version 3.9.11
The Maven Wrapper configuration has been updated to use version 3.3.4 of the wrapper script and to download Apache Maven 3.9.11 from the official Maven repository. This ensures that all developers and CI systems use a consistent, pre-configured version of Maven for building the project.
.mvn · high confidence
Test coverage
Added unit tests for the Association class
Added a new unit test class, AssociationUnitTests, which validates the behavior of the Association class. The tests cover static factory methods for creating associations from identifiers and aggregates, null argument rejection, equality checks, and reference comparison methods such as pointsTo and pointsToSameAggregateAs.
jmolecules-ddd/src/test · 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 49 → 51 (+2.3)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 100 → 96 (-3.7)
- Maturity 35 → 35 (+0.0)
- Readiness 44 → 47 (+3.5)
- Security 58 → 70 (+11.4)
Resolved (11)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High: security finding (details withheld)
- High: security finding (details withheld)
- 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
- complexity unreadable for .java, .kt — churn × complexity hotspots could not be measured
- dormant codebase — no living knowledge left to concentrate
New (17)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no contributor guidance (README.adoc)
- Documentation: no installation or build instructions (README.adoc)
- Documentation: no usage examples (README.adoc)
- 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)
- Inconsistent access pattern for identity retrieval between Java and Kotlin types. Java uses getter 'getId()', while Kotlin uses property 'id'. While this is idiomatic for each language, it creates an inconsistency in the conceptual API surface if users expect a uniform 'getId' or 'id' across both.
- Inconsistent naming for factory/creation methods. One uses 'forAggregate' (object-centric) and the other 'forId' (identifier-centric), despite both likely serving as static factory methods or constructors to create an Association instance.
- Inconsistent naming for query methods. 'pointsTo' is used for both aggregate and ID checks, but the semantic distinction between checking against an object vs an ID is not reflected in the method name, potentially causing confusion with 'forAggregate'/'forId' which are likely constructors.
- No assertions: rejectsNullReferenceAggregate (jmolecules-ddd/src/test/java/org/jmolecules/ddd/types/AssociationUnitTests.java)
- No dependency advisory monitoring
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
- SimpleAssociation exposes 'id' directly as a property, while Identifiable also exposes 'id'. However, SimpleAssociation is a specific type of association, not necessarily an Identifiable entity. If SimpleAssociation is meant to be an Identifiable, it should implement the Identifiable interface to ensure consistent access via 'id' or 'getId()'.
Architecture
- Containers 0 added · 0 removed · contexts 2 added · 1 removed · edges 0 added · 0 removed
Added bounded contexts (2)
- jmolecules-ddd
- kmolecules-ddd
Removed bounded contexts (1)
- jmolecules-parent
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
xmolecules/jmolecules 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 20d2636beba2e3cb8f0a9b62c07e3606c49da84f — 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-b84573e22831.