Skip to content
CAI
Software that uses CAICheck a score

daxnet/apworks-core

31.0

Weak · 20 September 2026

9.9k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Apworks is a .NET Standard 2.0 application development framework that provides infrastructure for building event-sourced systems. It offers core abstractions for domain modeling, command handling, and messaging, with concrete implementations for persisting events and aggregates via ADO.NET, Entity Framework, and MongoDB. The framework also includes ASP.NET Core integration to expose these domain models as RESTful data services with HAL support and flexible query parsing.

Features

Added Entity Framework Core repository implementation

Users can now persist aggregate roots using Entity Framework Core. This change introduces the \EntityFrameworkRepository\ and \EntityFrameworkRepositoryContext\ classes, which implement standard repository operations (add, find, update, remove, and paginated queries) by wrapping a \DbContext\. The context handles transaction commits via \SaveChanges\ and manages the lifecycle of the database session.

src/Apworks.Repositories.EntityFramework · high confidence

Added JSON serialization for messages and objects

The Apworks.Serialization.Json package now provides concrete implementations for serializing application messages and generic objects using JSON. The new MessageJsonSerializer implements the IMessageSerializer interface, enabling the serialization and deserialization of messages by inferring their CLR type from embedded metadata. Additionally, the ObjectJsonSerializer implements the ObjectSerializer base class, allowing standard objects to be converted to and from byte arrays via Newtonsoft.Json. This change introduces the core JSON-based serialization capability for the messaging and object handling subsystems.

src/Apworks.Serialization.Json · high confidence

Added key generation infrastructure for aggregate roots

The Apworks framework now includes a new KeyGeneration module that allows for custom key generation strategies for aggregate roots. This update introduces the IKeyGenerator interface, enabling developers to define how unique identifiers are created for entities. It also provides two default implementations: GuidKeyGenerator, which generates new GUIDs for aggregates using GUID keys, and NullKeyGenerator, which returns the default value for the key type, useful for scenarios where keys are assigned externally or not needed.

src/Apworks/KeyGeneration · high confidence

Added simple in-memory message bus implementation

The Apworks.Messaging.Simple package now includes a new in-memory message bus implementation. This adds a SimpleMessageBus class that uses a ConcurrentQueue for message storage, along with specific SimpleCommandBus and SimpleEventBus variants, enabling synchronous or asynchronous message publishing and handling within the same process.

src/Apworks.Messaging.Simple · high confidence

Added string pluralization and singularization utilities

The Apworks Utilities library now includes a new \Utils\ class with a \Pluralize\ extension method for strings, backed by a new internal \Vocabulary\ system. This system provides comprehensive rules for converting words between singular and plural forms, handling regular patterns (e.g., adding 's'), irregular words (e.g., 'person' to 'people'), and uncountable nouns (e.g., 'information'). This allows developers to easily manage word plurality within the application without relying on external libraries.

src/Apworks/Utilities · high confidence

Initial MongoDB repository implementation

This change introduces the MongoDB data access layer for the Apworks framework, adding the \MongoRepository\, \MongoRepositoryContext\, and \MongoRepositorySettings\ classes. Users can now persist and query aggregate roots using MongoDB, with support for basic CRUD operations (add, remove, update), finding entities by key or specification, and sorting results. The implementation handles connection configuration via host, port, and database name, and integrates with the existing repository abstraction to provide a consistent API for data access.

src/Apworks.Repositories.MongoDB · high confidence

Initial messaging infrastructure release

The Apworks framework now includes a complete messaging subsystem in the \Apworks.Messaging\ namespace. This introduces core abstractions for asynchronous communication, including \IMessage\ and \Message\ for defining payloads with metadata, and \IMessageBus\ for publishing and subscribing to events. The system supports extensible serialization via \IMessageSerializer\ and flexible handling through \IMessageHandler\ interfaces, allowing developers to register and manage message handlers within a context. This foundational layer enables decoupled communication patterns within applications built on the framework.

src/Apworks/Messaging · high confidence

Initial release of ADO.NET-based event store with PostgreSQL and SQL Server providers

This change introduces the \Apworks.EventStore.AdoNet\ library, providing a database-agnostic abstraction for persisting domain events via ADO.NET. It includes concrete implementations for PostgreSQL (\PostgreSqlEventStore\) and SQL Server (\SqlServerEventStore\), enabling users to store and retrieve event sequences with support for min/max sequence filtering and async operations. The feature relies on a configurable \AdoNetEventStoreConfiguration\ to map event descriptors to database tables and fields.

src/Apworks.EventStore.AdoNet · high confidence

Initial release of Apworks Core framework

This change introduces the initial version of the Apworks Core application development framework, a rewrite of the legacy Apworks project targeting .NET Standard 2.0 for cross-platform compatibility. The solution establishes the core architecture with a modular structure, including the main Apworks library and specific implementations for event stores (Simple, ADO.NET, PostgreSQL, SQL Server), repositories (Simple, MongoDB, Entity Framework), messaging (Simple, RabbitMQ), and serialization (JSON). It also adds integration support for ASP.NET Core, query parsing via Irony, and a comprehensive test suite with integration tests supported by Docker Compose for environments like PostgreSQL and SQL Server.

(repo-wide) · high confidence

Initial release of the Apworks framework core

This change introduces the foundational components of the Apworks application development framework. It adds the core domain model interfaces and base classes, including \IEntity\, \IAggregateRoot\, and \AggregateRootWithEventSourcing\, which provide built-in support for event sourcing, versioning, and snapshotting. The release also includes a simple in-memory repository implementation (\DictionaryRepository\) for development and testing, a generic \ApworksException\ hierarchy for error handling, and a serialization infrastructure (\IObjectSerializer\ and \ObjectSerializer\) to handle object persistence. Additionally, a base \DisposableObject\ class is provided to standardize resource management across the framework.

src/Apworks · high confidence

Introduce ASP.NET Core Data Services with HAL support and query parsing

The \src/Apworks.Integration.AspNetCore/DataServices\ area now provides a complete REST data service implementation for ASP.NET Core. This includes a \DataServiceController\ base class that exposes standard CRUD endpoints (Get, Post, Put, Delete, Patch) with built-in pagination, sorting, and query condition parsing via Irony. Responses are formatted using HAL (Hypertext Application Language) through \DataServiceHalBuildConfiguration\, which automatically generates self-links and embedded resources. The package also introduces a dedicated exception hierarchy (\DataServiceException\, \EntityNotFoundException\, \EntityAlreadyExistsException\, \InvalidArgumentException\) and a \DataServiceExceptionHandler\ middleware to ensure errors are returned with appropriate HTTP status codes.

src/Apworks.Integration.AspNetCore/DataServices · high confidence

Introduce HAL representation support for ASP.NET Core data services

This change adds the infrastructure to generate Hypermedia as the Engine of Application State (HAL) responses for ASP.NET Core controllers. It introduces a \HalResultFilterAttribute\ that intercepts action results and, when a \SupportsHalAttribute\ is present, transforms the output into \application/hal+json\. The implementation includes a configuration system (\HalBuildConfiguration\) to map controller actions to HAL builders, and a specialized \PagedResultHalBuildConfiguration\ that automatically generates pagination links (first, last, prev, next) for actions returning \IPagedResult\ instances. It also adds attributes like \HalEmbeddedResourceAttribute\ and \PageNumberAttribute\ to customize how resources and pagination parameters are handled in the HAL output.

src/Apworks.Integration.AspNetCore/Hal · high confidence

Introduce core event sourcing infrastructure

This change adds the foundational event sourcing components to the Apworks framework, including the \Event\ and \DomainEvent\ base classes, an \EventDescriptor\ for metadata, and the \IEventStore\ interface with an abstract \EventStore\ implementation that supports sequence-based versioning. It also introduces the event handling model via \IEventHandler\ and the \HandlesAttribute\, along with the \IEventBus\ interface to integrate event publishing and subscription with the existing messaging infrastructure.

src/Apworks/Events · high confidence

Introduce snapshot support for event-sourced aggregates

Added a new snapshotting capability within the Apworks framework, allowing event-sourced aggregate roots to save and restore their state to reduce the number of events that must be replayed. This location introduces the core snapshot infrastructure, including the ISnapshot interface for storing aggregate state (timestamp, version, and key-value pairs), the ISnapshotOriginator interface for aggregates to create and restore snapshots, and the ISnapshotProvider interface for managing snapshot persistence. It also includes a default Snapshot implementation and a SuppressedSnapshotProvider that acts as a no-op, enabling users to opt into snapshotting behavior.

src/Apworks/Snapshots · high confidence

Introduction of in-memory event store implementation

A new in-memory event store implementation (DictionaryEventStore) has been added to the Apworks.EventStore.Simple namespace. This component stores event descriptors in a ConcurrentDictionary, supporting sequence range filtering for loading events and grouping by originator for saving. It utilizes a DummySerializer that currently throws NotImplementedExceptions, indicating it is intended for testing or development scenarios rather than production persistence.

src/Apworks.EventStore.Simple · high confidence

Introduction of the Command pattern API

The \src/Apworks/Commands\ directory now provides the foundational types for the Command pattern, including the \ICommand\ interface, the abstract \Command\ base class, and the \ICommandHandler\<TCommand\>\ interface along with its abstract \CommandHandler\<TCommand\>\ base class. Additionally, the \ICommandBus\ interface is introduced to manage command dispatching, extending \IMessageBus\ with \ICommandSender\ and \ICommandSubscriber\ capabilities to facilitate command publishing and subscription.

src/Apworks/Commands · high confidence

Irony-based query condition and sort specification parsers

The Apworks framework now includes a new parsing implementation using the Irony library, adding \IronyQueryConditionParser\ and \IronySortSpecificationParser\ to interpret query strings. Users can now write query conditions using logical operators (AND, OR, NOT), relational operators (EQ, NE, GE, GT, LE, LT), and string operations (StartsWith, EndsWith, Contains), as well as define sort specifications with ascending (A) or descending (D) order, allowing for more flexible and expressive data querying.

src/Apworks.Querying.Parsers.Irony · high confidence

New RabbitMQ-based message bus implementation with DI-integrated handler execution

This change introduces a new messaging infrastructure for RabbitMQ, including the \RabbitMessageBus\ base class and its specialized \RabbitCommandBus\ and \RabbitEventBus\ implementations. The \RabbitMessageBus\ handles connection management, exchange/queue declaration, and message publishing/consumption via the RabbitMQ.Client library. Crucially, it integrates with the new \ServiceProviderMessageHandlerExecutionContext\ in the AspNetCore integration layer, which allows message handlers to be resolved from the ASP.NET Core dependency injection container. This ensures that handler dependencies are properly managed within child service scopes, allowing for correct disposal of resources after message handling is complete.

src/Apworks.Integration.AspNetCore/Messaging, src/Apworks.Messaging.RabbitMQ · high confidence

New event-sourcing and standard repository abstractions with snapshot support

The \src/Apworks/Repositories\ layer now introduces a dual-repository architecture: a standard \IRepository\/\Repository\ for typical CRUD operations and a new \IDomainRepository\/\DomainRepository\ hierarchy for event sourcing. The \EventSourcingDomainRepository\ implements the core event-sourcing behavior by loading aggregate state from an \IEventStore\ and applying domain events, with optional state restoration via an \ISnapshotProvider\ to optimize performance. It also integrates with an \IEventPublisher\ to automatically publish uncommitted domain events upon saving. A \SimpleDomainRepository\ is provided as a lightweight implementation that delegates to the standard repository context, while \EventPublishingDomainRepository\ adds the event-publishing capability to the base domain repository.

src/Apworks/Repositories · high confidence

New fluent configuration API for Apworks integration in ASP.NET Core

The \IntegrationExtensions\ class now provides a fluent API for configuring Apworks capabilities within an ASP.NET Core application. Users can chain methods on \IApworksConfigurator\ to enable repository support (\WithRepository\), data service support (\WithDataServiceSupport\), and Hypertext Application Language (HAL) support (\WithHalSupport\). The API also allows configuring key generators via \IRepositoryConfigurator\ and \IKeyGeneratorConfigurator\, and enables data service exception handling middleware via \IApplicationBuilder.EnrichDataServiceExceptionResponse\.

src/Apworks.Integration.AspNetCore · high confidence

New querying primitives for pagination, sorting, and condition parsing

The Apworks.Querying namespace now includes core abstractions and implementations to support advanced data retrieval: IPagedResult and PagedResult provide a standard contract and class for paginated data collections; SortSpecification and SortOrder define how results are sorted; and IQueryConditionParser and ISortSpecificationParser introduce interfaces for parsing query conditions and sort strings into executable expressions. These types establish the foundation for structured querying within the framework.

src/Apworks/Querying · high confidence

Behavioural changes

1 commit (0 fixes) modifying tools

A change to existing behaviour in tools — 1 commit, 1 file.

tools · low confidence · unverified

Automated version substitution script added to build process

A new PowerShell script (subst\_version.ps1) has been added to the build-scripts directory to automate version updates. This script recursively searches for .csproj and AssemblyInfo.cs files and replaces the hardcoded version string '0.999.0' with a specified version number, streamlining the release process.

build-scripts · high confidence

New ASP.NET Core data service configuration API

The integration now uses a new \DataServiceConfigurator\ and \DataServiceConfigurationOptions\ to register data service services in ASP.NET Core applications. This change introduces support for configuring the repository context lifetime, enabling Hypertext Application Language (HAL) support for HTTP GET responses, and integrating Irony-based parsers for query conditions and sort specifications, allowing developers to customize data service behavior through a fluent configuration interface.

src/Apworks.Integration.AspNetCore/Configuration · high confidence

Restored Sphinx documentation build infrastructure

The Sphinx documentation source files and build scripts have been re-added to the docs-src folder. This includes the Makefile and make.bat for building the docs, the configuration file (conf.py) for the Apworks project, and initial RST content files for the introduction, ASP.NET integration, and data services sections.

docs-src · high confidence

Test coverage

Added integration test fixtures for MongoDB, PostgreSQL, and SQL Server; Added integration tests for Entity Framework, MongoDB, PostgreSQL, and SQL Server repositories and event stores; Added test model classes for Customer and Domain Events; Added test models and domain events for integration testing; Initial unit test suite for Apworks core components.

Dependencies

Initial release of Apworks .NET Standard 2.0 packages

This change introduces the initial set of Apworks NuGet packages, all targeting .NET Standard 2.0 and versioned at 0.999.0. The release includes the core Apworks library alongside specific implementations for event stores (ADO.NET, PostgreSQL, SQL Server, and a simple in-memory store), repositories (Entity Framework Core, MongoDB, and simple in-memory), messaging (RabbitMQ and simple in-memory), and a query parser based on Irony. It also adds ASP.NET Core integration components and JSON serialization support, establishing the foundational dependency structure for the framework.

(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 34 → 31 (-3.0)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 85 → 85 (-0.6)
  • Architecture 86 → 86 (+0.0)
  • Maturity 46 → 46 (+0.0)
  • Readiness 17 → 15 (-1.6)
  • Security 36 → 38 (+2.5)
  • Domain Modelling 56 → 58 (+2.1)
  • Event-Driven 100 → 100 (+0.0)
  • Event Sourcing 37 (new)

Resolved (20)

  • Bounded contexts not declared
  • High CVE: Microsoft.NETCore.App 2.1.0
  • High CVE: Microsoft.NETCore.App 2.1.0
  • High CVE: Microsoft.NETCore.App 2.1.0
  • High CVE: Microsoft.NETCore.App 2.1.0
  • High CVE: System.Net.Security 4.3.0
  • High CVE: System.Net.Security 4.3.0
  • Medium CVE: Microsoft.NETCore.App 2.1.0
  • Medium CVE: Microsoft.NETCore.App 2.1.0
  • Medium CVE: Microsoft.NETCore.App 2.1.0
  • Medium CVE: Microsoft.NETCore.App 2.1.0
  • Medium CVE: System.Data.SqlClient 4.6.1
  • Medium CVE: System.Net.Security 4.3.0
  • Medium CVE: System.Net.Security 4.3.0
  • No exposed public API
  • Test runner surfaced no tests
  • redundant comment (src/Apworks.Integration.AspNetCore/Configuration/CommandSenderConfigurator.cs)
  • redundant comment (src/Apworks.Integration.AspNetCore/Configuration/CommandSubscriberConfigurator.cs)
  • redundant comment (src/Apworks.Integration.AspNetCore/Configuration/Configurator.cs)
  • single-maintainer — knowledge-concentration (bus factor) risk

New (27)

  • CommentedOutCode (src/Apworks/Snapshots/ISnapshotProvider.cs)
  • CommentedOutCode (src/Apworks/Snapshots/SuppressedSnapshotProvider.cs)
  • CommentedOutCode (src/Apworks/Snapshots/SuppressedSnapshotProvider.cs)
  • CommentedOutCode (src/Apworks/Snapshots/SuppressedSnapshotProvider.cs)
  • CommentedOutCode (tests/Apworks.Tests/Helpers/InMemorySnapshotProvider.cs)
  • CommentedOutCode (tests/Apworks.Tests/Helpers/InMemorySnapshotProvider.cs)
  • Duplicated block (11 lines × 2) (src/Apworks.Repositories.MongoDB/MongoRepository.cs)
  • Duplicated block (12 lines × 2) (src/Apworks.EventStore.AdoNet/AdoNetEventStore.cs)
  • Duplicated block (12–13 lines × 2) (src/Apworks.Repositories.Simple/DictionaryRepository.cs)
  • Duplicated block (21 lines × 2) (src/Apworks.EventStore.AdoNet/AdoNetEventStore.cs)
  • Duplicated block (8 lines × 2) (src/Apworks.Querying.Parsers.Irony/IronyQueryConditionParser.cs)
  • Duplicated block (8 lines × 2) (src/Apworks.Repositories.EntityFramework/EntityFrameworkRepository.cs)
  • End-of-life runtime: .NET netcoreapp2.1
  • High CVE: Microsoft.NETCore.App 2.1.0
  • High CVE: System.Net.Security 4.3.0
  • High IaC: WD-COMPOSE-0002 (scripts/int-env/docker-compose.yml)
  • High IaC: WD-COMPOSE-0002 (scripts/int-env/docker-compose.yml)
  • High IaC: WD-COMPOSE-0002 (scripts/int-env/docker-compose.yml)
  • High secret: WD-SECRET-0001 (tools/Apworks.snk)
  • Leaked secret: private-key-blob (tools/Apworks.snk)
  • …and 7 more

API surface

  • Unchanged — 6 HTTP endpoints

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

Survey your own repository

daxnet/apworks-core 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 29347f7fe93fa547c3cdfdbf5eec31fc1a4dcb32 — 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.