Compendium.Infrastructure
1.0.0
See the version list below for details.
dotnet add package Compendium.Infrastructure --version 1.0.0
NuGet\Install-Package Compendium.Infrastructure -Version 1.0.0
<PackageReference Include="Compendium.Infrastructure" Version="1.0.0" />
<PackageVersion Include="Compendium.Infrastructure" Version="1.0.0" />
<PackageReference Include="Compendium.Infrastructure" />
paket add Compendium.Infrastructure --version 1.0.0
#r "nuget: Compendium.Infrastructure, 1.0.0"
#:package Compendium.Infrastructure@1.0.0
#addin nuget:?package=Compendium.Infrastructure&version=1.0.0
#tool nuget:?package=Compendium.Infrastructure&version=1.0.0
Compendium
A pragmatic .NET framework for building event-sourced, multi-tenant SaaS applications.
Compendium is the framework that powers Nexus, Sassy Solutions' multi-tenant platform engineering product. It distills years of building event-sourced SaaS into a small set of focused packages: DDD primitives, CQRS handlers, an event store, multi-tenancy, and ready-to-use adapters for PostgreSQL, Redis, Zitadel, and more.
Why Compendium?
- Zero-dependency Core — Pure DDD primitives (
AggregateRoot<TId>,ValueObject,Result<T>,Error) with no external dependencies beyond the .NET BCL. - CQRS + Event Sourcing built-in — Command/query dispatchers, event store interfaces, and a PostgreSQL adapter wired out of the box.
- Sagas, two flavors —
ProcessManager<TState>for DDD-style orchestration sagas andIHandle<TEvent>for event-driven choreography sagas, each clearly named so you don't have to guess which pattern you're using. See docs/sagas.md. - Multi-tenancy native — Tenant context, resolution, and scoping baked into the primitives — not bolted on.
- Result pattern everywhere — No control-flow exceptions. Every fallible operation returns
Result<T>with structuredErrorvalues. - Modular adapters — Pick only what you need: PostgreSQL, Redis, Zitadel, Listmonk, LemonSqueezy, OpenRouter, ASP.NET Core.
- Battle-tested in production — Powers Nexus, a multi-tenant platform engineering product.
Quick start
Install the packages you need:
dotnet add package Compendium.Core
dotnet add package Compendium.Application
dotnet add package Compendium.Adapters.PostgreSQL
Define an event-sourced aggregate:
using Compendium.Core.Domain.Primitives;
using Compendium.Core.Results;
public sealed class OrderAggregate : AggregateRoot<OrderId>
{
private OrderStatus _status;
private decimal _amount;
private OrderAggregate(OrderId id) : base(id) { }
public static Result<OrderAggregate> Create(CustomerId customerId, decimal amount)
{
if (amount <= 0)
return Result.Failure<OrderAggregate>(
Error.Validation("Order.Amount.Invalid", "Amount must be positive"));
var order = new OrderAggregate(OrderId.New());
order.AddDomainEvent(new OrderCreated(order.Id, customerId, amount));
return Result.Success(order);
}
public void Apply(OrderCreated @event)
{
_status = OrderStatus.Pending;
_amount = @event.Amount;
}
}
Wire it up in Program.cs:
using Compendium.Application.CQRS;
using Microsoft.Extensions.DependencyInjection;
var builder = WebApplication.CreateBuilder(args);
// Register Compendium CQRS dispatchers (command/query handlers are resolved via IServiceProvider).
builder.Services.AddScoped<ICommandDispatcher, CommandDispatcher>();
builder.Services.AddScoped<IQueryDispatcher, QueryDispatcher>();
// Register your command/query handlers, then wire the PostgreSQL event store adapter
// using the options published by Compendium.Adapters.PostgreSQL.
var app = builder.Build();
Architecture
Core (zero deps) → Abstractions → Application → Infrastructure → Adapters
↓
Multitenancy (cross-cutting)
- Core — Domain primitives with no external dependencies.
- Abstractions — Ports (interfaces) for infrastructure concerns: identity, billing, email, AI.
- Application — CQRS orchestration: command/query handlers, dispatchers.
- Infrastructure — Generic infrastructure concerns: projections, outbox, caching.
- Adapters — Concrete integrations with external systems.
- Multitenancy — Tenant resolution and scoping, usable across all layers.
Packages
Documentation
The full documentation site is being built at sassy-solutions.github.io/compendium (DocFX-powered). In the meantime:
- ROADMAP.md — themes, what's next, and what's out of scope
- CONTRIBUTING.md — build, test, conventions
- docs/adr/ — architecture decision records
- Source under
src/and the Nexus consumer code for end-to-end examples
Who's using Compendium?
- Nexus — Multi-tenant platform engineering by Sassy Solutions.
Using Compendium in your project? Open a PR to add yourself to this list.
Contributing
Contributions, issues, and feedback are welcome. See CONTRIBUTING.md for guidelines on code style, commit conventions, and the development loop.
License
MIT © 2026 Sassy Solutions. See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Compendium.Abstractions (>= 1.0.0)
- Compendium.Application (>= 1.0.0)
- Compendium.Core (>= 1.0.0)
- Compendium.Multitenancy (>= 1.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- OpenTelemetry (>= 1.15.3)
- OpenTelemetry.Api (>= 1.15.3)
- OpenTelemetry.Exporter.Console (>= 1.15.3)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.12.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- OpenTelemetry.Instrumentation.Runtime (>= 1.15.1)
- Polly (>= 8.6.4)
- Polly.Extensions (>= 8.6.4)
- Serilog (>= 4.3.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Process (>= 3.0.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Extensions.Hosting (>= 8.0.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Settings.Configuration (>= 8.0.4)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 6.0.0)
- Serilog.Sinks.Seq (>= 8.0.0)
- System.Text.Json (>= 9.0.0)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Compendium.Infrastructure:
| Package | Downloads |
|---|---|
|
Compendium.Adapters.PostgreSQL
PostgreSQL Event Store adapter for Compendium Framework: JSONB event storage, optimistic concurrency, multi-tenancy support, schema auto-creation. Production-ready Event Sourcing with PostgreSQL. |
|
|
Compendium.Adapters.Listmonk
Listmonk email service adapter for Compendium Framework: Transactional emails, newsletter management, subscriber management via REST API. |
|
|
Compendium.Adapters.Zitadel
Zitadel identity provider adapter for Compendium Framework: User management, token validation, organization management via REST API. Supports multi-tenancy through Zitadel organizations. |
|
|
Compendium.Adapters.LemonSqueezy
LemonSqueezy billing adapter for Compendium Framework: Subscriptions, checkouts, license keys, webhooks via REST API (JSON:API format). |
|
|
Compendium.Adapters.AspNetCore
ASP.NET Core integration for Compendium Framework: Health checks (PostgreSQL/Redis), middleware, web API utilities, security headers, CORS, multi-tenancy HTTP resolution. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3 | 66 | 5/21/2026 |
| 1.0.2 | 82 | 5/18/2026 |
| 1.0.1 | 82 | 5/16/2026 |
| 1.0.0 | 376 | 5/14/2026 |
| 1.0.0-preview.9 | 468 | 5/14/2026 |
| 1.0.0-preview.8 | 1,657 | 5/2/2026 |
| 1.0.0-preview.7 | 64 | 5/2/2026 |
| 1.0.0-preview.6 | 108 | 5/2/2026 |
| 1.0.0-preview.5 | 96 | 4/30/2026 |
| 1.0.0-preview.4 | 177 | 4/26/2026 |
| 1.0.0-preview.3 | 73 | 4/26/2026 |
| 1.0.0-preview.2 | 65 | 4/25/2026 |
| 1.0.0-preview.1 | 156 | 4/24/2026 |