bwatts/Totem
38.3
Weak · 21 September 2026
13.6k
lines of production code
C#
primary language
4
measurements over time
What this system is
Totem is a .NET framework for building event-sourced applications, providing a structured approach to managing state, commands, and queries. It offers a comprehensive runtime for handling durable types, connection lifecycles, and asynchronous threading utilities. The system integrates with ASP.NET Core and SignalR to expose command and query endpoints, while leveraging EventStore for persistent timeline storage and real-time client notifications.
How it got here
2015 — Foundational framework and core library development
8 changes.
This period focused on establishing the initial architecture and core infrastructure for the Totem framework, including the solution structure, CI/CD pipelines, and SDK-style project configuration. Significant effort was directed toward building foundational utility classes for testing, IO handling, reflection, and JSON serialization, alongside integration tests to verify the timeline and event store components.
2018 — Timeline feature implementation
13 changes.
This period focused on the end-to-end development of the 'Timeline' feature, establishing a comprehensive domain model for events, commands, and queries. It introduced the necessary runtime infrastructure, client-side communication, and persistence layers using EventStore. Additionally, it integrated the timeline into the application via MVC endpoints and real-time SignalR updates.
2019 — extensibility and testing infrastructure
4 changes.
This period focused on enhancing the framework's flexibility by introducing extensibility hooks for both service and web application configurations. Additionally, new threading utilities were added to improve asynchronous programming, while a comprehensive test suite was established to cover timeline, query, and topic flows.
Features
Add EventStore timeline integration
The application can now use EventStore as a timeline database. This adds the \Totem.Timeline.EventStore\ project, which registers the necessary services to connect to an EventStore instance. Users can configure the connection via \EventStoreTimelineOptions\, specifying server details, authentication, reconnection behavior, and subscription settings.
src/Totem.Timeline.EventStore/Hosting · medium confidence
Add SignalR hub for real-time query notifications
A new SignalR-based communication layer is introduced to deliver real-time updates to clients. The \QueryHub\ class manages client subscriptions and unsubscriptions to query change events, while the \QueryNotifier\ service pushes these updates (including stoppage errors) to connected clients. The \TimelineSignalRServerBuilderExtensions\ registers the \QueryHub\ and \QueryNotifier\ in the dependency injection container, and \TimelineHubRouteBuilderExtensions\ exposes the \/hubs/query\ endpoint for client connections.
src/Totem.Timeline.SignalR · high confidence
Add Totem MVC hosting extensions and JSON serialization configuration
Introduces the Totem.Timeline.Mvc project with new hosting extensions for ASP.NET Core MVC. The TimelineMvcBuilderExtensions class provides methods to register command and query servers, add the entry assembly, and configure the web runtime. Additionally, a WebRuntimeOptionsSetup class is added to automatically apply Totem's JSON format settings to the MVC JSON serializer, ensuring consistent serialization behavior across the application.
src/Totem.Timeline.Mvc/Hosting · high confidence
Add client-side timeline and query handling via EventStore
The Totem.Timeline.EventStore.Client package introduces new classes to manage client interactions with the timeline. ClientDb and QueryDb provide methods to read query states and content from EventStore, while ClientSubscription subscribes to both the main timeline and a dedicated client stream to receive updates. New event types—CommandFailed, QueryChanged, and QueryStopped—are added to surface command errors and query state changes to the client observer.
src/Totem.Timeline.EventStore/Client · high confidence
Add extensibility hooks for service application configuration
The Totem.App.Service project introduces a new way to customize the hosting of a Totem service application. Developers can now inject custom logic at specific stages of the application lifecycle using Before, After, and Replace hooks for the host builder, configuration, services, timeline, and Serilog. This allows for deeper integration and customization of the service startup process.
src/Totem.App.Service · medium confidence
Add new IO types for binary, file, folder, and HTTP links
The Totem.IO namespace now includes new value types for handling binary data (Binary, Base64, Hex) and structured links for file systems (FileLink, FolderLink, FileResource, FolderResource) and HTTP resources (HttpLink, HttpHost, HttpDomain, HttpQuery). These types provide robust parsing, equality checks, and type conversion capabilities for representing and manipulating file paths, folder structures, and HTTP URLs within the application.
src/Totem/IO · high confidence
Initial project structure and configuration for the Totem framework
The repository has been restructured to establish the foundational layout for the Totem framework. This includes the addition of a solution file (Totem.sln) defining the core projects (Totem, Runtime, Timeline, EventStore, MVC, SignalR, App.Service, App.Web, and tests), an .editorconfig for code formatting, and an AppVeyor CI/CD configuration for automated builds and NuGet publishing. The solution also includes updated documentation in readme.md and license.txt, and the removal of the legacy SolutionAssemblyInfo.cs file.
(repo-wide) · high confidence
Introduce EventStore-based timeline persistence and resumption
The new Totem.Timeline.EventStore module provides the infrastructure for persisting and resuming timeline events using EventStore. This includes the TimelineDb class which handles writing events and checkpoints, and a suite of DbOperations (ReadFlowCommand, ReadFlowToResumeCommand, ReadResumeScheduleCommand, SubscribeCommand) that manage reading flow states and scheduling resume points. The system also introduces a ResumeProjection (backed by a JavaScript script) to track which flows need resuming, and metadata classes (AreaEventMetadata, CheckpointMetadata) to store event context. This enables the timeline to survive restarts and recover from failures by reading from the event store.
src/Totem.Timeline.EventStore · high confidence
Introduce MVC endpoints for handling commands and queries
Added new classes in the Totem.Timeline.Mvc project to expose command and query handling via ASP.NET Core MVC. The CommandServer and ICommandServer interface allow processing write requests (POST, PUT, PATCH, DELETE) with support for conditional execution via CommandWhen. The QueryServer and IQueryServer interface handle GET requests for queries, returning QueryContentResult or QueryNotModifiedResult to support ETag-based caching. The When class provides a fluent API for defining HTTP responses to specific event types.
src/Totem.Timeline.Mvc · high confidence
Introduce Totem Runtime hosting infrastructure
Added new classes in the Totem.Runtime.Hosting namespace to support runtime hosting and configuration. This includes a base ConnectedService for managing connection lifecycles, extension methods for registering hosted services and configuring options (including JSON serialization settings and durable types), and specific services like RuntimeLogService for logging integration.
src/Totem.Runtime/Hosting · high confidence
Introduce core timeline domain model and serialization
Added the foundational classes for the timeline feature, including abstract base types for Event, Command, ErrorEvent, Flow, Query, and Topic, along with supporting types like TimelinePoint, TimelinePosition, FlowKey, and User. The change also includes JSON converters for FlowKey and TimelinePosition to ensure proper serialization of timeline data.
src/Totem.Timeline · high confidence
Introduce durable type serialization and JSON format infrastructure
The JSON serialization layer in Totem.Runtime now supports durable types, allowing objects marked with the DurableAttribute to be serialized using a compact, key-based format rather than full assembly-qualified type names. This is achieved through new classes (DurablePrefix, DurableType, DurableTypeKey) and a custom Json.NET contract resolver (JsonFormatContractResolver) and serialization binder (JsonFormatSerializationBinder) that map durable types to short keys. The change also adds extension methods for JSON conversion and a JsonFormat class to manage serialization settings, enabling more efficient and stable JSON payloads for durable types.
src/Totem.Runtime/Json · high confidence
Introduce extensible web application configuration hooks
The Totem.App.Web package now provides a comprehensive set of Before, After, and Replace hooks for configuring the web host, application builder, services, routing, and logging. Developers can now inject custom logic at specific stages of the ASP.NET Core pipeline, including before and after the host, app, configuration, service collection, timeline client, Serilog, MVC, and SignalR setups.
src/Totem.App.Web · high confidence
Introduce runtime infrastructure for the timeline feature
Added the core runtime classes for the timeline feature, including the FlowHost, FlowContext, FlowScope, and related interfaces (ITimelineDb, ITopicScheduler, IUserDb) to manage flow lifecycles, event observation, and checkpointing on the timeline.
src/Totem.Timeline/Runtime · high confidence
Introduce timeline area type system and reflection-based discovery
The timeline area now uses a new reflection-based type system to discover and map events, topics, and queries. This includes the \AreaMap\ for centralized type lookup, \AreaType\ and its subclasses (\EventType\, \TopicType\, \QueryType\) to represent the different kinds of timeline components, and builders (\AreaMapBuilder\, \FlowTypeBuilder\) that scan assemblies to construct these maps. This change replaces the previous \AreaTypeName\-based approach with a more robust, type-safe model that supports state inspection (\AreaTypeState\) and observation linking (\FlowObservation\).
src/Totem.Timeline/Area · high confidence
Introduce timeline client infrastructure for command execution and query subscriptions
Added the Totem.Timeline.Client namespace, introducing the core client-side components for interacting with the timeline. This includes the ClientHost to manage the client lifecycle, the CommandHost to execute commands and wait for responses, and the QueryHost to manage subscriptions to query changes. The change also adds supporting types such as IClientDb and IQueryDb for data access, IClientObserver and IQueryNotifier for event notification, and utility classes like QueryETag and QueryChangedWindow to handle state and synchronization.
src/Totem.Timeline/Client · high confidence
Introduce value types and assertion utilities for comparison, disposal, and text handling
The Totem library adds several new foundational types: \Check\ and \Expect\ classes for boolean and assertion-based testing, \Cmp\ and \Eq\ structs for standardized comparison and equality operations, \Disposal\ for lambda-based \IDisposable\ handling, and \Text\ for building string content. These additions provide developers with fluent APIs for validating runtime values, managing resource disposal, and constructing text output.
src/Totem · high confidence
Introduces the Totem.Runtime library with core runtime primitives
The Totem.Runtime project is added, introducing a new set of base types and utilities for the application. This includes a connection lifecycle management system (Connection, ConnectionState, IConnectable), a field-based binding model (Field, Fields, IBindable) for managing object state, and a metrics subsystem (Metric, Monitor, IMonitor) for tracking runtime performance. It also provides logging extensions and serialization attributes (Durable, Transient, WriteOnly) to support these capabilities.
src/Totem.Runtime · high confidence
New Threading utilities: TaskSource and TimedWait
Added new classes in the Totem.Threading namespace to improve asynchronous programming and timeout handling. TaskSource provides a TaskCompletionSource with asynchronous continuations by default, simplifying the creation of hot tasks. TimedWait offers a convenient way to wait for an event with a configurable timeout, automatically transitioning to a timeout state if the event does not occur within the specified duration.
src/Totem/Threading · high confidence
New reflection utilities for type resolution, conversion, and metadata extraction
Added new reflection utilities in the Totem.Reflection namespace to support type resolution, type conversion, and lambda expression analysis. The changes introduce a TypeResolver for resolving types by name and assembly, a ChangeType class for converting objects to specific types, and extension methods on LambdaExpression to extract member, field, property, and method information. Additionally, new extension methods on Assembly, Type, and LambdaExpression provide utilities for getting directory names, checking type properties, and navigating inheritance chains.
src/Totem/Reflection · high confidence
New timeline hosting and configuration infrastructure
Added new classes and extension methods in the \Totem.Timeline.Hosting\ namespace to support timeline integration. This includes \ConfigureStep\ to allow Before, After, and Replace hooks for app composition, builder interfaces (\ITimelineBuilder\, \ITimelineClientBuilder\) and their implementations for configuring services, and service extensions (\TimelineServiceExtensions\, \TimelineClientServiceExtensions\, \TimelineAreaServiceExtensions\) to register the timeline host, client, and area maps. Additionally, \TimelineJsonFormatOptionsSetup\ is introduced to register JSON converters and durable types for the timeline area.
src/Totem.Timeline/Hosting · high confidence
Behavioural changes
Removed legacy AssemblyInfo.cs from Totem
The file src/Totem/Properties/AssemblyInfo.cs, which previously defined assembly metadata such as the title and GUID, has been removed from the project.
src/Totem/Properties · high confidence
Test coverage
Added automated testing infrastructure for timeline, query, and topic flows; Added integration tests for the timeline.
Dependencies
Migrated project files to the new SDK-style format
The project files for the core library (Totem) and the test suite have been converted from the legacy MSBuild format to the modern SDK-style format. This change updates the build system to use the new .NET Core/Standard project system, which simplifies the configuration and aligns with current .NET development practices.
(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 39 → 38 (-0.4)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 70 → 69 (-1.0)
- Architecture 97 → 97 (-0.0)
- Maturity 50 → 50 (+0.0)
- Readiness 37 → 38 (+0.3)
- Security 27 → 26 (-1.0)
- Performance 60 → 60 (+0.0)
Resolved (10)
- Bounded contexts not declared
- High CVE: Microsoft.AspNetCore.Server.Kestrel.Core 2.1.1
- High CVE: Microsoft.AspNetCore.Server.Kestrel.Core 2.1.1
- High CVE: Microsoft.NETCore.App 2.2.0
- High CVE: Microsoft.NETCore.App 2.2.0
- Medium CVE: Microsoft.AspNetCore.Server.Kestrel.Core 2.1.1
- Medium CVE: Microsoft.NETCore.App 2.2.0
- No exposed public API
- Test runner surfaced no tests
- dormant codebase — no living knowledge left to concentrate
New (15)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (17 lines × 2) (src/Totem/Threading/TaskSource.cs)
- Duplicated block (29 lines × 2) (src/Totem.App.Service/ConfigureServiceApp.cs)
- End-of-life runtime: .NET netcoreapp2.2
- High CVE: Microsoft.NETCore.App 2.2.0
- No SBOM
- No artifact signing
- No build provenance
- No dependency advisory monitoring
- WriteOnlyPrivateField (src/Totem.App.Tests/Hosting/TopicInstance.cs)
- WriteOnlyPrivateField (src/Totem.Timeline.EventStore/ResumeProjection.cs)
- WriteOnlyPrivateField (src/Totem/Expect.cs)
- resume-projection.onNext (cognitive 27) (src/Totem.Timeline.EventStore/resume-projection.js)
- resume-projection.onNext (cyclomatic 18) (src/Totem.Timeline.EventStore/resume-projection.js)
Architecture
- Unchanged — 1 containers · 0 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
bwatts/Totem 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 c5cc2d927efaeb50ad3f0e5b54862da9d0e66319 — 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.