modernice/goes
65.3
Adequate · 21 September 2026
27k
lines of production code
Go
with TypeScript
4
measurements over time
What this system is
This system is a comprehensive Go framework for building event-sourced applications, providing core abstractions for aggregates, event stores, and command buses. It supports multiple backend implementations, including in-memory, MongoDB, PostgreSQL, and NATS, while offering a robust projection system for building read models and managing distributed workflows. The project also includes a standalone web UI for inspecting event data, a CLI for operational management, and an authorization module for role-based access control.
How it got here
2021 — core event-sourcing framework development
50 changes.
The project established its foundational event-sourcing architecture by implementing core packages for events, aggregates, and projections, alongside a distributed command bus. It introduced comprehensive tooling including a CLI, Event Store UI, and robust Docker-based CI infrastructure to support these new capabilities.
2022 — Authorization module and storage expansion
21 changes.
This period focused on introducing a comprehensive role-based authorization system with gRPC and HTTP integration, alongside expanding storage capabilities with a new PostgreSQL backend and MongoDB driver v2 migration. Significant effort was also directed toward enhancing the framework's utility layer through new helpers for streams, contexts, and error handling, as well as establishing robust testing infrastructure.
2023–2026 — Workflow runtime and UI expansion
6 changes.
This period focused on introducing a new event-driven workflow (saga) runtime and comprehensive examples demonstrating its lifecycle and error recovery capabilities. It also delivered a standalone web interface for inspecting event stores, alongside experimental testing utilities for aggregates. A deprecated NATS JetStream backend was added with warnings about its architectural flaws.
Features
Add CLI connection configuration and projection trigger command
The CLI now includes a new \--connect\ flag to specify the Connector service address and a \--connect-timeout\ flag to control the connection timeout, allowing users to configure how the CLI communicates with the backend. Additionally, the \projection trigger\ command is now available, enabling users to trigger projections directly from the command line.
cli/internal/clifactory, cli/internal/cmd/rootcmd · high confidence
Add PostgreSQL event store backend
Introduces a new PostgreSQL-based event store implementation for the backend. The store supports connection via a provided \pgxpool.Pool\ or a connection URL, with configurable database and table names. It automatically creates the event table and required indexes if they do not exist, or validates the schema of pre-existing tables to ensure compatibility. The implementation uses \pgx/v5\ for database interactions and includes comprehensive tests covering schema validation, connection pooling, and edge cases like existing tables with incorrect schemas or tables in unrelated schemas.
backend/postgres · high confidence
Add generic delayed event stream utilities
The internal xstream package now provides generic functions, Delayed and DelayedFunc, that wrap an event channel to introduce artificial delays before events are passed through. This allows consumers to simulate latency in event processing pipelines, which is useful for testing or controlling the pace of event consumption.
internal/xevent/xstream · high confidence
Add todo list example application
Introduces a new example application demonstrating a todo list system, including a server and client, using NATS as the event bus and MongoDB as the event store. The example features a \List\ aggregate for managing tasks (adding, removing, and marking as done), a \Counter\ read-model projection that tracks active, removed, and archived tasks with optional debouncing, and includes tests for the aggregate logic.
examples/todo · high confidence
Add xtime package for nanosecond-precision timestamps
Introduces the internal xtime package to provide reliable nanosecond-precision timestamps on systems where the Go runtime may truncate to microseconds. The package includes a SupportsNanoseconds check to detect system capabilities and a Now function that falls back to a monotonic-time calculation when native precision is unavailable, ensuring consistent high-resolution time data across different environments.
internal/xtime · high confidence
Added context-aware error handling utilities
The internal/concurrent package now includes a new errors.go file that provides the Errors and Failer functions. These utilities allow developers to create error channels that automatically close when the associated context is cancelled, ensuring that errors are only propagated if the operation is still active.
internal/concurrent · high confidence
Added projection testing utilities
Introduced the \internal/projectiontest\ package, providing mock implementations for projection testing. This includes \MockProjection\ for verifying applied events, \MockProgressor\ for testing progress tracking, \MockGuardedProjection\ for testing query guards, and \MockResetProjection\ for testing projection reset logic, simplifying the process of writing tests for projection handlers.
internal/projectiontest · high confidence
Added utility to deduplicate UUIDs
A new \UUID\ function has been added to the \internal/unique\ package that accepts a slice of UUIDs and returns a new slice containing only the unique values, effectively filtering out duplicates.
internal/unique · high confidence
CLI command to trigger projection schedules
Users can now trigger specific projection schedules directly from the command line using the new \goes projection trigger\ command. This feature allows operators to manually initiate scheduled projections by name (e.g., \goes projection trigger foo bar\) and includes an optional \--reset\ flag to reset the projection state before applying events, providing immediate control over projection execution without needing to restart services or modify code.
cli/internal/cmd/projectioncmd · high confidence
Command bus dispatch now supports synchronous execution and reporting
The command bus in the \cmdbus/dispatch\ package now allows users to configure dispatch behavior via options. Specifically, the new \Sync()\ option forces synchronous dispatch, ensuring that errors during command execution are returned directly to the caller rather than handled asynchronously. Additionally, the \Report()\ option enables execution result reporting to a specified reporter. Notably, if a reporter is configured, the system automatically enforces synchronous dispatch to ensure results are captured reliably. The \Async()\ option is also provided to override synchronous settings if needed.
command/cmdbus/dispatch · high confidence
In-memory event store enforces uniqueness and adds bus decorator
The in-memory event store now enforces uniqueness of event IDs and aggregate versions, failing inserts with duplicate IDs or conflicting aggregate versions to support optimistic concurrency control, while also introducing a \WithBus\ decorator that automatically publishes inserted events to an event bus.
event/eventstore · high confidence
Initial project scaffolding and documentation overhaul
The repository has been initialized with essential configuration files, including a Dockerfile for building a multi-stage image (Go backend and Nuxt frontend), a Makefile for managing tests and builds, and updated .gitignore/.dockerignore rules. The project documentation has been significantly rewritten to introduce the 'goes' event-sourcing framework, detailing its core concepts, backend options (in-memory, MongoDB, PostgreSQL, NATS), and the new Event Store UI. Additionally, an Apache 2.0 license has been added, and best practices for aggregate and projection design have been documented.
(repo-wide) · high confidence
Introduce SAGA action execution and reporting primitives
The \saga/action\ package now provides the core building blocks for SAGA workflows, including an \Action\ interface for defining executable steps, a \Context\ for managing execution state, and a \Report\ struct for tracking action outcomes. The \Context\ enables actions to publish events, dispatch commands synchronously, and fetch aggregates, while the \Report\ captures timing, errors, and compensating action details to support saga orchestration and auditing.
saga/action · high confidence
Introduce command bus and handler system
This change introduces a new command system for distributed applications, allowing services to dispatch and subscribe to commands via an event-driven bus. It adds the \command.Bus\ interface with \Dispatch\ and \Subscribe\ methods, implemented by the \cmdbus\ package. The system includes a \command.Handler\ type for convenient command handling, a \command.Context\ for managing command execution and completion, and a \command.Registerer\ interface with \Handlers\ map for registering command handlers. It also provides typed command creation via \command.New\, error handling with \command.Err\, and utilities for command casting and registration.
command · high confidence
Introduce command execution reporting with aggregation support
A new \report\ package has been added to the \cmdbus\ command layer, introducing a \Report\ struct that captures command execution details including the command metadata, runtime duration, and any errors encountered. The package provides a functional \New\ constructor along with \Runtime\ and \Error\ options for building reports, and includes a \Report\ method on the struct to aggregate information from multiple executions into a single report instance. Tests verify the correct handling of command data, timing, and error states during this aggregation process.
command/cmdbus/report · high confidence
Introduce event-driven distributed command bus
The \command/cmdbus\ package now provides a new event-driven Command Bus that coordinates command dispatching and handling across distributed nodes via an underlying event bus. Users can subscribe to specific command types and receive them as contexts, with support for configurable parallel processing concurrency (\Workers\), command filtering (\Filter\), and timeouts for assignment and reception (\AssignTimeout\, \ReceiveTimeout\). The bus publishes internal lifecycle events (dispatched, requested, assigned, accepted, executed) to coordinate state, and returns a specific \ExecutionError\ type when synchronous dispatches fail, allowing callers to distinguish execution failures from other errors.
command/cmdbus · high confidence
Introduce event-driven workflow (saga) runtime
Adds a new \workflow\ package that provides an event-driven, distributed workflow runtime (saga/process manager). Users can define workflows using \workflow.Define\ with trigger handlers for starting (\Starts\), advancing (\Reacts\), and compensating (\Compensates\) states, as well as handling timeouts (\OnTimeout\, \OnCompensationTimeout\). The runtime persists effects like outgoing commands and scheduled timeouts as events on the workflow aggregate, ensuring they are executed reliably by a background service even after crashes. It supports correlation by aggregate ID or business key, custom repositories with snapshotting, and configurable recovery windows and resync intervals for distributed environments.
workflow · high confidence
Introduce event-sourced aggregate framework with base type, consistency validation, and soft-delete support
The \aggregate\ package now provides a foundational framework for building event-sourced aggregates. Users can embed the new \\*Base\ type to automatically implement core interfaces like \Aggregate\, \Committer\, and soft-deletion APIs (\SoftDeleter\, \SoftRestorer\). The framework includes a \ValidateConsistency\ function to enforce event ordering and integrity (checking ID, name, version, and time), with an option to ignore time checks. It also introduces \ApplyHistory\ for replaying events, \Next\ for creating and applying new events, and a \Repository\ interface with \TypedRepository\ for type-safe persistence, fetching, querying, and soft-deletion of aggregates.
aggregate · high confidence
Introduce new projection framework with typed targets, progress tracking, and guards
The \projection\ package now provides a new framework for building and managing projections. Projections are defined by implementing the new generic \Target\[Data\]\ interface, which replaces the previous \EventApplier\ interface. The framework includes built-in support for tracking projection progress via the \ProgressAware\ interface and the \Progressor\ helper, allowing projections to resume from their last applied event. It also introduces a \Guard\ interface and a \QueryGuard\ type to filter events before they are applied to a projection. The \Apply\ and \ApplyStream\ functions handle the application of events, respecting progress and guard constraints. Additionally, the package provides a \Service\ for triggering schedules across multiple services via events, and a \Job\ interface for querying and applying events in a scheduled context.
projection · high confidence
Introduce snapshot marshaling, in-memory storage, and scheduling
The aggregate/snapshot package now provides a complete snapshotting capability. Users can create snapshots of aggregates using the new Snapshot type, which automatically marshals aggregate state via custom Marshaler/Unmarshaler interfaces or standard encoding interfaces (Binary/Text). An in-memory Store implementation is included for testing and lightweight usage, supporting operations like Save, Latest, Version, Limit, and Query with time-based filtering. Additionally, a Schedule interface with an Every() helper allows users to define when aggregates should be snapshotted based on event counts.
aggregate/snapshot · high confidence
Introduce standalone Event Store UI
Adds a new standalone web interface for inspecting event stores, featuring a Go backend server (eventstoreui) and a Vue/Nuxt frontend (ui). The backend provides an HTTP server with configurable event decoding and environment-based settings, while the frontend delivers a responsive dashboard with event listing, detailed event and stream views, JSON payload syntax highlighting, and filtering capabilities.
eventstoreui, ui · high confidence
Introduction of a generic event system with type-safe handlers and sorting
The \event\ package now provides a generic event system built around the \Of\[Data\]\ interface and \New\[Data\]\ constructor, enabling type-safe event creation and handling. Users can now register handlers that automatically cast event data to specific types using \event.On\ or \RegisterHandler\, and the \Handler\ struct supports both synchronous and asynchronous execution modes. Additionally, the package introduces comprehensive event sorting capabilities (by time, aggregate name, ID, and version) and a \Store\ interface for persisting and querying events with flexible constraints.
event · high confidence
NATS event bus now supports JetStream and load-balanced subscriptions
The NATS backend for the event bus has been rewritten to support both NATS Core and NATS JetStream drivers, selectable via the \Use\ option. JetStream mode enables durable consumers, configurable stream names, and wildcard subscriptions, while Core mode remains the default. The bus now supports load-balancing across multiple service instances using queue groups via the \LoadBalancer\ or \QueueGroup\ options, and provides explicit \Connect\ and \Disconnect\ methods for lifecycle management. Subject generation is customizable via \SubjectFunc\ and \SubjectPrefix\, with automatic character replacement in JetStream to ensure single-token subjects.
backend/nats · high confidence
New Awaiter utility and configurable artificial delay for the in-memory event bus
The in-memory event bus now includes an \Awaiter\ utility that allows users to wait for the first occurrence of specific events via a channel-based API with context cancellation support. Additionally, the bus supports an \WithArtificialDelay\ option to introduce a configurable delay between event publications, which is useful for simulating network latency during testing or debugging.
event/eventbus · high confidence
New CLI and Event Store UI entry points
Users can now launch the Event Store UI and the CLI tool via dedicated commands. The \goes-ui\ command initializes the event store UI, while the \goes\ command starts the CLI interface, enabling users to interact with the system's projection and event store capabilities directly from the terminal or browser.
cmd · high confidence
New CLI application with gRPC connector for projection management
The CLI tool now includes a new \App\ entry point and a \Connector\ that exposes a gRPC server (default port 8000) to manage projections. Users can now trigger projection schedules via the CLI by connecting to this connector, which registers the projection service and handles graceful shutdowns. The main entry point (\Main\) provides user-friendly error messages if the connector is unavailable.
cli · high confidence
New CLI connector service for managing event projections
A new CLI connector command has been added to the internal/cmd/cli-connector package, providing a standalone service that exposes a port for interacting with the projection system. This service initializes an event bus and store, registers continuous and periodic projection schedules (specifically for 'foo' and 'bar' events), and runs a projection service that can be controlled via the CLI interface. The connector handles graceful shutdowns and logs errors from the various scheduled jobs and the service itself, offering a concrete entry point for managing event-driven projections from the command line.
internal/cmd · high confidence
New CLI test utilities for gRPC and event infrastructure
A new \clitest\ package has been introduced to provide shared testing helpers for the CLI component. This includes utilities to set up event registries, buses, and stores, as well as functions to create and run gRPC servers using in-memory buffer connections (\bufconn\), simplifying the setup of integration tests that rely on these infrastructure components.
cli/internal/clitest · high confidence
New Docker configuration for the Todo example
The Todo example now includes a complete set of Docker files to simplify local development and deployment. This adds Dockerfiles for both the server and client components (using Go 1.18), a Docker Compose file to orchestrate the application along with NATS and MongoDB services, and a script to initialize the MongoDB replica set.
examples/todo/.docker · high confidence
New Docker-based test infrastructure for CI and coverage
The project introduces a comprehensive set of Dockerfiles and Compose configurations to standardize local and CI testing environments. New Dockerfiles (coverage, github, nats-bench, tag-test, act) upgrade the base Go image to 1.25.0 and support specific testing workflows, including coverage reporting, GitHub Actions integration with gotestsum, NATS benchmarks, and tagged tests for MongoDB, NATS, and Postgres backends. Corresponding Compose files (coverage, github, mongo-test, nats-bench, nats-test, postgres-test) define service dependencies for these backends, including MongoDB replica sets and Postgres health checks, enabling reliable, isolated integration tests for each backend.
.docker · high confidence
New HTTP middleware for actor authorization and permission checks
Added \contrib/auth/http/middleware\ package providing HTTP middleware functions (\Authorize\, \AuthorizeField\, \Permission\, \PermissionField\) to integrate authentication and authorization into Go HTTP handlers. The \Authorize\ and \AuthorizeField\ middleware identify and register actors for the current request context, while \Permission\ and \PermissionField\ enforce access control by checking if authorized actors have specific permissions on target aggregates, returning 403 Forbidden if access is denied or if the aggregate reference is zero. A \Factory\ is also provided to simplify middleware creation by encapsulating the \PermissionFetcher\ and \Lookup\ dependencies.
contrib/auth/http · high confidence
New aggregate query filtering and sorting API
The \aggregate/query\ package introduces a new \Query\ type that allows filtering aggregates by name, ID, version constraints, and sorting options. Users can construct queries using functional options (e.g., \Name\, \ID\, \Version\, \SortBy\, \SortByMulti\) and merge multiple queries into a single filter. The package also provides a \Test\ function to check if an aggregate matches a query's criteria, including support for tag-based filtering via the \Tagger\ interface.
aggregate/query · high confidence
New aggregate repository with caching, soft-delete, and typed access
The aggregate repository layer has been expanded to support several new capabilities. A new \CachedRepository\ wraps existing repositories to store fetched aggregates in memory, reducing repeated fetches from the underlying store. Soft-delete support is now available: aggregates can be marked as deleted via events, and subsequent fetches will return \ErrDeleted\ until they are restored; queries automatically exclude soft-deleted aggregates. A \TypedRepository\ provides type-safe access to aggregates of a specific type, including a \Refresh\ method to update an aggregate with the latest data from the store. Additionally, the repository now supports configurable retry strategies for operations via \RetryEvery\ and \RetryApprox\, and allows customizing query behavior through \ModifyQueries\.
aggregate/repository · high confidence
New authorization module with role-based access control
The \contrib/auth\ package introduces a complete authorization system for goes-driven applications, enabling role-based and action-based access control. It provides \Actor\ aggregates (supporting both UUID and string identifiers) and \Role\ aggregates to manage permissions on specific aggregates. The module includes a \Permissions\ read-model that projects actor and role events to determine effective permissions, a \Lookup\ system to resolve actor and role IDs, and a \Granter\ component for automatic permission assignment based on application events. Integration is handled via command and query clients, allowing permissions to be granted and revoked through the command bus or directly via repositories.
contrib/auth · high confidence
New command handler package with lifecycle hooks for aggregates
The \command/handler\ package has been introduced to simplify command handling within aggregates. It provides a \BaseHandler\ type that aggregates can embed to automatically implement command registration and dispatch. This new handler supports \BeforeHandle\ and \AfterHandle\ lifecycle options, allowing users to register callbacks that run before or after a command is processed, with support for targeting specific commands or applying to all commands via wildcards. The package also includes a generic \Of\ helper to wire aggregate command handling to a command bus and repository.
command/handler · high confidence
New context helper to delay cancellation
A new \contexts\ package has been added to the helper library, introducing the \IgnoreCancel\ function. This utility allows callers to create a derived context that ignores the cancellation signal of a parent context for a specified duration, providing a grace period before the context is actually cancelled.
helper/contexts · high confidence
New developer utility scripts for documentation, testing, and cleanup
Added a suite of shell scripts to streamline local development workflows: \docs.sh\ generates missing documentation using the \jotbot\ tool (requiring \dev.env\ and \OPENAI\_API\_KEY\), \clear.sh\ removes local \jotbot-patch\ branches, \test-actions\ runs GitHub Actions locally via \act\ using a provided PAT, \test-packages\ enumerates Go test packages while excluding the tour module, and \generate\ compiles protobuf definitions into Go code.
scripts · high confidence
New error stream helper utilities
Added the \helper/errstream\ package, which provides functions to wrap errors flowing through Go channels with additional context. The \Prefix\ function allows adding a custom string prefix to every error in a stream, while the \Module\ function automatically formats errors with a module name in square brackets (e.g., \\[moduleName\] error message\), facilitating clearer error tracing in multi-module or layered systems.
helper/errstream · high confidence
New event handler with startup replay and worker configuration
The event handler package now supports initializing state by replaying historical events from a configured event store upon startup, using a customizable query to filter and sort those events. Users can also configure the number of concurrent worker goroutines used to process events, allowing for parallel handling. The handler prevents concurrent execution of the same instance and provides methods to register event handlers and check the running status.
event/handler · high confidence
New event query builder with time and version constraints
The \event/query\ package introduces a new builder for constructing event queries, allowing users to filter events by name, ID, aggregate name, aggregate ID, and specific aggregates. It adds support for filtering by time (exact times, ranges, min/max) and aggregate version (exact versions, ranges, min/max) through dedicated constraint packages. Users can also sort query results by time, aggregate details (name, ID, version), or using multi-sort options. The package includes a \Test\ function to check if individual events match a query and an \Apply\ function to filter event slices, facilitating in-memory event store implementations.
event/query · high confidence
New event-driven lookup table for aggregates
The \projection/lookup\ package introduces a new capability to maintain an event-sourced lookup table, allowing aggregates to be queried by fields other than their UUID (e.g., looking up a user by email). The \Lookup\ type processes specified events to populate this table, supporting both forward lookups (finding an aggregate ID by key/value) and reverse lookups (finding an aggregate ID by value). It includes utilities like \Expect\ and \Contains\ for type-safe retrieval, allows customizing event application via \ApplyEventsWith\, and exposes the projection schedule for monitoring.
projection/lookup · high confidence
New event-to-aggregate streaming capability with configurable options
The \aggregate/stream\ package now provides a \stream.New\ function that converts a stream of events into aggregate Histories, allowing users to build aggregate state from event streams. This new capability includes options to control sorting (\Sorted\), grouping (\Grouped\), consistency validation (\ValidateConsistency\), event filtering (\Filter\), and inclusion of soft-deleted aggregates (\WithSoftDeleted\). The implementation supports both untyped and typed event channels and includes comprehensive benchmarks to measure performance across various aggregate and event counts.
aggregate/stream · high confidence
New experimental testing utilities for event-sourcing aggregates
The new \exp/gtest\ package provides a suite of tools for testing event-sourcing patterns, allowing users to verify aggregate constructors, check for expected or unexpected events, and validate event data. It introduces \Constructor\ tests to ensure proper initialization, \Transition\ and \Signal\ helpers to assert that aggregates emit specific events with or without data, and \NonTransition\ to confirm events are not emitted. For more complex scenarios, \TransitionWithEqual\ and \TransitionWithComparer\ enable custom comparison logic for event data, supporting both the \Comparable\ interface and custom functions, while the \Times\ option allows matching the same event multiple times.
exp · high confidence
New gRPC server for triggering projections via CLI
A new gRPC server implementation has been added to the CLI's projection package, exposing a \Trigger\ method that allows users to manually start a projection schedule. The server accepts a schedule name and an optional reset flag; when the reset flag is set, the projection is reset before triggering. If the specified schedule is not registered with the projection service, the server returns a \NotFound\ error, providing clear feedback to the user.
cli/internal/projectionrpc · high confidence
New helper package for extracting aggregate details
A new \helper/pick\ package has been introduced, providing utility functions (\AggregateID\, \AggregateName\, \AggregateVersion\) to extract specific fields from any type implementing the \AggregateProvider\ interface. This allows users to easily access the ID, name, and version of aggregates without needing to handle the tuple returned by the \Aggregate()\ method directly.
helper/pick · high confidence
New in-memory model repository for testing
Added a thread-safe, in-memory implementation of the model repository interface in the backend/memory package. This component supports saving, fetching, deleting, and using models with built-in locking to prevent concurrent access issues, and includes an optional factory function to automatically create models on fetch. It is designed primarily for use in testing environments.
backend/memory · high confidence
New internal Event Store UI for browsing event data
This change introduces a new internal \eventstoreui\ package that provides a web-based interface for browsing event store data. The UI supports connecting to PostgreSQL and MongoDB backends, handling authentication via static username/password with signed session cookies, and displaying event streams, summaries, and facets. It includes configuration loading from environment variables, automatic index creation for both databases, and background polling to keep the overview up to date.
internal/eventstoreui · high confidence
New internal aggregate testing helpers
The internal \xaggregate\ package now provides utility functions to assist with testing aggregates. It includes a \Make\ function to create a specified number of test aggregates with an optional name and a helper to retrieve applied events, a \Map\ function to index aggregates by UUID for quick lookup, and a \Shuffle\ function to randomize the order of an aggregate slice. These tools are intended for internal use to simplify the setup and verification of aggregate behavior in tests.
internal/xaggregate · high confidence
New internal environment variable helper package
Added a new internal \env\ package that provides utility functions for reading and temporarily modifying environment variables. The package includes \Temp\ for setting an environment variable and restoring its previous value, \String\ for retrieving raw string values, \Bool\ for parsing boolean values from a set of common truthy strings (e.g., "1", "true", "yes"), \Int\ for parsing integers, and \Duration\ for parsing time durations. Tests are included to verify the correct behavior of these parsing and restoration functions.
internal/env · high confidence
New internal error bus for asynchronous error propagation
The internal/errbus package introduces a new asynchronous error bus that allows components to publish errors to multiple subscribers via channels. This enables decoupled, async error handling within the application, where subscribers receive errors on their channels and are automatically unsubscribed when their context is cancelled. Tests confirm that errors are correctly broadcast to multiple subscribers and that context cancellation properly stops error delivery.
internal/errbus · high confidence
New internal gRPC status helper and test utility
Added a new internal package \grpcstatus\ that provides a \New\ function to construct gRPC status objects with details, automatically handling the conversion of protobuf messages and ignoring errors during detail attachment. Additionally, a \testutil\ package was introduced with a \PanicOn\ function that consumes an error channel and panics on any non-nil error except \context.Canceled\, simplifying error handling in tests.
internal/grpcstatus · high confidence
New internal red-black tree for ordered event storage
The \internal/xevent/etree\ package introduces a red-black tree implementation (\Tree\) that stores and orders events by their aggregate version. This data structure provides \Insert\, \Walk\, and \Matrix\ operations, accompanied by benchmarks comparing its performance against slice-based insertion and sorting. The package is currently marked as unused in the codebase.
internal/xevent/etree · high confidence
New internal slice helpers and UUID v7 support
This change introduces new internal utilities: a slice package providing generic functions for mapping (including error-aware mapping), filtering, deduplication, and error ignoring, alongside a new internal UUID generator that produces version 7 UUIDs using the google/uuid library.
internal/slice · high confidence
New projection scheduling modes with debouncing and startup options
The \projection/schedule\ package introduces \Continuous\ and \Periodic\ schedules, allowing projections to run either on every published event or at fixed intervals. The continuous schedule supports event debouncing via \Debounce()\ and \DebounceCap()\ options to batch rapid events into single jobs, reducing processing overhead. Both schedule types now support configurable startup jobs, which can be executed synchronously or asynchronously via the \StartupAsync()\ option, ensuring projections are initialized before processing live events.
projection/schedule · high confidence
New setup and logging utilities for the Todo example
The Todo example now includes dedicated setup and logging helpers to simplify initialization. A new \logging.go\ file provides a \LogErrors\ function that aggregates and logs errors from multiple channels using fan-in logic. A new \setup.go\ file introduces a \Setup\ struct that centralizes configuration, offering methods to create a signal-aware context, configure NATS-based event buses with MongoDB event stores, register command and event handlers, and initialize aggregate repositories.
examples/todo/cmd · high confidence
New snapshot cleanup service to automatically remove old snapshots
A new \cleanup\ package has been added to the \aggregate/snapshot\ area, providing a \Service\ that periodically deletes snapshots exceeding a specified age. Users can configure the cleanup interval and maximum age via \NewService\, then start the background worker with \Start\, which returns a channel for asynchronous errors. The service queries the snapshot store for entries older than the configured \maxAge\ and deletes them, ensuring that stale data is automatically purged without manual intervention.
aggregate/snapshot/cleanup · high confidence
New stream processing and concurrency helpers
The \helper/streams\ package now provides a suite of generic utilities for working with Go channels. Users can merge multiple input channels into one using \FanIn\, \FanInContext\, and \FanInAll\, or create and push values into channels concurrently with \NewConcurrent\, \Concurrent\, \NewConcurrentContext\, and \ConcurrentContext\. Stream consumption is simplified with \Drain\ and \All\ to collect all elements, \Take\ to retrieve a specific number of elements, \Walk\ to iterate with side effects, and \ForEach\ for concurrent iteration. Additionally, \Before\ allows injecting extra events into a stream based on conditions.
helper/streams · high confidence
New workflow examples demonstrating SAGA patterns and lifecycle management
Added runnable examples in the \examples/workflow\ directory that illustrate the core workflow capabilities, including the fundamental trigger-to-completion lifecycle, event correlation strategies (by aggregate ID, by business key, and custom logic), timeout handling with rescheduling and cancellation, compensation phases for error recovery, event-sourced workflow state, durability across service restarts, and multi-instance cluster coordination via shared event stores.
examples/workflow · high confidence
Snapshot query builder supports time-based filtering
The \aggregate/snapshot/query\ package now includes a new \Query\ struct and builder pattern that allows filtering snapshots by the time they were created. Users can apply time constraints using the \Time\ option, which integrates with the existing \time.Constraints\ interface, alongside other existing filters like name, ID, version, and sorting options.
aggregate/snapshot/query · high confidence
gRPC server for the authorization module
A new gRPC server implementation has been added to the auth RPC package, exposing methods to query permissions, check access rights (Allows), and look up actors and roles by ID. When configured with command-handling options, the server also supports granting and revoking permissions for actors and roles. Comprehensive tests verify the correct behavior of these read and write operations.
contrib/auth/authrpc · high confidence
Behavioural changes
Deprecated NATS JetStream backend added with known architectural flaws
A new \backend/natsjs\ package provides a combined event store and bus backed by NATS JetStream, but it is immediately marked as deprecated and will be removed in a future release. The implementation stores events in per-aggregate-type streams and uses a KV bucket for indexing, but the README and code comments warn of critical issues: missing optimistic concurrency control, non-atomic writes, broken load balancing, and unbounded resource growth. Users are advised to use \backend/mongo\ or \backend/postgres\ for the event store and \backend/nats\ for the bus instead.
backend/natsjs · high confidence
Deprecated built-in aggregate deletion command with configurable event publishing
The command/builtin package, which provides a built-in command to delete aggregates by removing their event stream, is now deprecated. When using the built-in handler, deleting an aggregate publishes a 'goes.command.aggregate.deleted' event by default, but users can now override this behavior to publish custom deletion events via the DeleteEvent option. The package also allows configuring whether events are published and inserted into the event store through the PublishEvents option.
command/builtin · high confidence
Introduction of generic repository interfaces for persistence models
The persistence layer now defines generic interfaces for repository operations, allowing any model with a comparable identifier to be saved, fetched, used, or deleted. This change introduces a standard \Repository\ interface that enforces a consistent contract for data access, including error handling for missing models via \ErrNotFound\.
persistence · high confidence
MongoDB backend migrated to Go Driver v2 with new ModelRepository
The MongoDB backend has been upgraded to use the MongoDB Go Driver v2, requiring applications to migrate their dependencies and connection logic. This update introduces a new \ModelRepository\ for generic model persistence, adds transaction hooks (\PreInsert\, \PostInsert\) to the \EventStore\ for custom logic during event insertion, and exposes the underlying MongoDB collection for advanced operations. Additionally, error handling has been refined with the introduction of \IsConsistencyError\ for version and command errors, and the backend now supports custom query interceptors and optional index management.
backend/mongo · high confidence
MongoDB event store indices migrated to driver v2 with updated partial filter expressions
The MongoDB backend's event store index definitions have been updated to use the MongoDB Go driver v2 API. This change includes refactoring the index models to align with the new driver's BSON and options structures, and correcting the partial filter expression for the unique aggregate index to explicitly use the $exists operator for validating field presence alongside value checks.
backend/mongo/indices · high confidence
Regenerated API protobuf definitions with updated structure and new gRPC services
The generated Go code and Protocol Buffer definitions in the \api/proto\ directory have been regenerated to reflect a reorganized directory structure and expanded service contracts. New message types include \aggregate.Ref\ for aggregate references, \command.Error\ and \command.ErrorDetail\ for enriched command execution errors, and \common.UUID\ for standardized UUID handling. The \contrib/auth\ package now exposes a comprehensive \AuthService\ gRPC service with methods for managing permissions, including \GetPermissions\, \Allows\, \LookupActor\, \LookupRole\, and granular grant/revoke operations for actors and roles. Additionally, a new \ProjectionService\ gRPC service has been added with a \Trigger\ RPC method to manage projection scheduling and resets.
api · high confidence
Rewritten codec with configurable registry and custom marshaling
The codec package has been rewritten to use a new \Registry\ type that manages data type registration and encoding. Users can now configure default marshal and unmarshal functions (defaulting to JSON) via options, and types can implement custom \Marshaler\ or \Unmarshaler\ interfaces to override this behavior. The registry supports generic registration, allows enabling debug logging, and provides a \Map()\ method to inspect registered types.
codec · high confidence
Saga package deprecated in favor of durable workflow runtime
The saga package is now deprecated and superseded by the workflow package. The saga package implements an in-process SAGA coordinator that runs a predefined sequence of actions and compensates completed actions when a later action fails. However, because execution is neither persisted nor distributed, a crashed process cannot recover a running SAGA. The workflow package replaces it with a durable, event-driven workflow runtime: workflow instances are event-sourced aggregates, every step is persisted, commands and timeouts are recorded as durable effects, and any service instance can recover and resume the work of a crashed one. The saga package will be removed in a future release.
saga · high confidence
Test coverage
Added event bus integration test suite; Added event comparison and test data utilities; Added event store conformance test suite; Added mock implementations for snapshot store and query interfaces; Added snapshot store test suite; Added test helpers for intercepting aggregate events and commits; Added test helpers for validating aggregate changes; New internal event testing helpers.
Dependencies
Upgrade Go toolchain and core dependencies
The project has upgraded its Go toolchain to version 1.25.0 and refreshed its core dependencies to improve stability and security. Key updates include the MongoDB driver to v2.8.0, the NATS client to v1.53.1, gRPC to v1.83.1, and the protobuf library to v1.36.12. The documentation site has also been updated to use VitePress 1.6.3, Tailwind CSS 3.3.5, and Vue 3.3.8.
(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
Baseline
- First survey — no prior run to compare against. CAI 65.
Lenses
- Code Health 65
- Architecture 69
- Maturity 70
- Readiness 72
- Security 75
- Domain Modelling 85
- Event-Driven 87
- Accessibility 62
Changes since last survey
- 300 commits — 284 feature/other, 16 fixes
By area
- (root) — 174 commits
- examples/todo — 14 commits
- docs/pnpm-lock.yaml — 9 commits
- .github/workflows — 7 commits
- backend/mongo — 7 commits
- docs/tutorial — 7 commits
- backend/postgres — 6 commits
- contrib/auth — 6 commits
- docs/backends — 6 commits
- (repo) — 5 commits
- backend/natsjs — 5 commits
- backend/nats — 4 commits
- docs/.vitepress — 4 commits
- docs/guide — 4 commits
- event/handler — 4 commits
- aggregate/repository — 3 commits
- exp/gtest — 3 commits
- command/builtin — 2 commits
- docs/package.json — 2 commits
- docs/reference — 2 commits
Notable commits
- fix: Fix ambiguous selector in Tutorial chapter 2
- fix: Revert "Revert "fix(contrib/auth): add checks to ensure events apply only to current actor in Permissions methods""
- fix: Revert "fix(contrib/auth): add checks to ensure events apply only to current actor in Permissions methods"
- fix: fix(backend/nats): fix JetStream subjects
- fix: fix(backend/natsjs): replace aggStreams.Range with ListStreams to subscribe to existing streams
- fix: fix(command/cmdbus): track dispatch before publishing event
- fix: fix(contrib/auth): add checks to ensure events apply only to current actor in Permissions methods
- fix: fix(contrib/auth): correct roleGiven and roleRemoved checks to use slice containment instead of aggregate ID comparison
- fix: fix(go.mod): update google.golang.org/protobuf dependency from v1.35.2 to v1.36.0 to incorporate bug fixes and improvements in the latest version
- fix: fix(gtest): fix TransitionTest when matching same event multiple times with different event data
- fix: fix(postgres): handle nil values correctly
- fix: fix(postgres): resolve event table through search_path when validating schema
- fix: fix(repository_test.go): add event time to support fast machines during tests
- fix: fix(test): propagate Docker Compose test failures
- fix: fix: preserve deterministic order for equal sort keys
- fix: test(auth): fix role grant and add actor ID in permissions tests for correctness test(auth): correct PermissionsOf call to use actor's AggregateID in wildcard tests
- change: Add Pool option for Postgres backend
- change: Add interactive docs tour with lesson runner
- change: GOES-1: Improve PostgreSQL Backend
- change: Prevent caller to modify underlying array
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
modernice/goes 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 e12a246d2401f8fc2b3d28dac4f80be1720a630e — 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.