Hexalith.Tenants.Server 8.0.3

dotnet add package Hexalith.Tenants.Server --version 8.0.3
                    
NuGet\Install-Package Hexalith.Tenants.Server -Version 8.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hexalith.Tenants.Server" Version="8.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hexalith.Tenants.Server" Version="8.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Hexalith.Tenants.Server" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hexalith.Tenants.Server --version 8.0.3
                    
#r "nuget: Hexalith.Tenants.Server, 8.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hexalith.Tenants.Server@8.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hexalith.Tenants.Server&version=8.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Hexalith.Tenants.Server&version=8.0.3
                    
Install as a Cake Tool

Hexalith.Tenants

CI NuGet License: MIT

Multi-tenant management for the Hexalith ecosystem. Built on event sourcing, DAPR, and .NET Aspire, this service provides a complete tenant lifecycle — from creation and user-role assignment to configuration and cross-tenant discovery — through a command-driven API that publishes domain events for downstream integration.

Features

  • Tenant Lifecycle Management — Create, update, enable, and disable tenants through commands that produce auditable domain events
  • User-Role Management — Add and remove users from tenants with role-based access (Owner, Contributor, Reader) and role behavior enforcement
  • Global Administration — Bootstrap a global administrator to authorize initial tenant operations
  • Tenant Configuration — Set and manage per-tenant key-value configuration with domain events for every change
  • Tenant Query and Audit APIs — Query tenant lists, tenant details, user memberships, and tenant audit history through protected cursor-paginated endpoints
  • Tenants Admin UI — Inspect tenants, memberships, configuration, and audit history. Authorized operators can create and manage tenants, change membership and configuration, and track command outcomes. Global administrators can grant and withdraw administrator access.
  • Event-Driven Integration — Subscribe to tenant domain events (TenantCreated, UserAddedToTenant, etc.) in consuming services via DAPR pub/sub
  • In-Memory Testing Fakes — Production-parity domain logic with in-memory stores for fast, reliable tests without infrastructure dependencies

Quickstart

Get from clone to your first tenant command after local prerequisites are installed:

Quickstart Guide — prerequisite-validated path for .NET SDK 11.0.100 with the .NET 11 runtimes, PowerShell 7, the Aspire CLI bundle, Docker, full DAPR local runtime, AppHost startup, local auth, and the first EventStore command submission.

Deployment Readiness — consolidated operator checklist and evidence template for production-like Tenants deployments, covering auth, DAPR, service invocation, health, command/query paths, and pub/sub recovery boundaries.

Sample Consuming Service Walkthrough — subscribe to tenant events, try Development access and configuration readouts, and configure a checkpointed projection for membership-based authorization.

Cross-Aggregate Timing — timing-window and eventual-consistency guidance for command status, event publication, subscriber delivery, local projections, stale reads, diagnostics, and fail-closed consumers.

Compensating Commands — explicit correction patterns for mistaken access, role, configuration, and lifecycle changes without hidden undo or event mutation.

See It In Action

Watch reactive cross-service access revocation in action: add a user to a tenant, then remove them — and see the consuming service automatically revoke access via DAPR pub/sub events, with zero custom integration code.

"Aha Moment" Demo — Step-by-step walkthrough with automated scripts in scripts/.

NuGet Packages

Package Description
Hexalith.Tenants.Contracts Commands, events, enums, and identity types — the shared API surface
Hexalith.Tenants.Client DI registration, event handlers, and client abstractions for consuming services
Hexalith.Tenants.Server Aggregates, projections, and domain processing
Hexalith.Tenants.Testing In-memory fakes and test helpers with production-parity domain logic
Hexalith.Tenants.Aspire .NET Aspire hosting extensions for consuming AppHosts

Normal package builds use EventStore 5.4.0 and McpCli.Abstractions 3.0.0. Tenant-access recovery requires the EventStore 5.3 snapshot-budget API. Historical archive admission retains the qualified 4.x, 5.0.1, 5.1.x, 5.2.0 and 5.3.x cohorts. The retained catalog compatibility set includes stable 3.129.0, 3.129.1, 3.130.0, 3.130.1, 3.130.2, 3.131.0, 3.132.0, 3.132.1, 3.132.2 and 3.133.0, including zero-revision and build-metadata aliases. See the published SDK qualification commands and evidence. The optional durable Client projection uses EventStore's checkpointed API and is available with the source SDK or published 3.133.0 and the qualified 4.x, 5.0.1, 5.1.x, 5.2.0, 5.3.x and 5.4.0 cohorts; older qualified SDKs keep the in-memory Client projection. Contracts includes its compiled route and operation declarations; Server includes its existing declared intent adapter enrollment. These are offline catalog inputs: the composition owner must still activate the catalog through the SDK before traffic is admitted. An activated trusted generation and matching host identity are mandatory for runtime readiness and generated requests. Unconfigured Production returns 503 from /ready and refuses generated requests. The composition owner supplies Production trust through the SDK's existing extension seams; this module does not install a Production trust policy or auto-activate declarations.

This is a runtime migration requirement for the next major release. Upgrade the Contracts and Server packages together, retain their exact catalog inputs and complete trusted activation before directing traffic to the upgraded hosts. When private Development bootstrap is enabled, the composition owner supplies the API host's actual Dapr app ID through EventStore:DomainService:AppId; the host records that exact value in its observation.

Project Structure

src/
  Hexalith.Tenants.AppHost/          # .NET Aspire AppHost — orchestrates the full topology
  Hexalith.Tenants.Api/              # External-facing generated Tenants REST API host
  Hexalith.Tenants.Aspire/           # Aspire hosting extensions for consuming AppHosts
  Hexalith.Tenants.Client/           # Client DI registration and event handling
  Hexalith.Tenants/                  # Domain service host: DAPR-invoked endpoints, EventStore command controllers, auth, validation, bootstrap
  Hexalith.Tenants.Contracts/        # Commands, events, enums, identities
  Hexalith.Tenants.Server/           # Aggregates, projections, domain logic
  Hexalith.Tenants.Testing/          # In-memory fakes and test helpers
  Hexalith.Tenants.UI/               # Blazor InteractiveServer Tenants Admin UI host

tests/
  Hexalith.Tenants.AppHost.Tests/
  Hexalith.Tenants.Client.Tests/
  Hexalith.Tenants.Contracts.Tests/
  Hexalith.Tenants.IntegrationTests/
  Hexalith.Tenants.Server.Tests/
  Hexalith.Tenants.Testing.Tests/
  Hexalith.Tenants.UI.Tests/

samples/
  Hexalith.Tenants.Sample/           # Example consuming service with event subscription
  Hexalith.Tenants.Sample.Tests/

docs/
  quickstart.md                      # Getting started guide
  deployment-readiness.md            # Deployment checklist and evidence template
  production-auth-claim-contract.md  # Production IdP claim mapping contract
  production-auth-readiness.md       # Deployment auth checklist and smoke-test evidence
  demo.md                            # "Aha Moment" demo walkthrough
  event-contract-reference.md        # Event schemas and audit patterns
  compensating-commands.md           # Explicit correction command patterns
  cross-aggregate-timing.md          # Timing windows and eventual consistency
  idempotent-event-processing.md     # Event handling patterns
  sample-consuming-service-walkthrough.md # Sample service adoption walkthrough
  tenants-ui-*.md                    # Phase 2 Admin UI planning, dependency, and evidence specs

scripts/
  demo.ps1                           # PowerShell demo automation
  demo.sh                            # Bash demo automation

Contributing

Branch Naming

  • feat/<description> — Features and enhancements
  • fix/<description> — Bug fixes
  • docs/<description> — Documentation changes

Development Workflow

  1. Fork and clone, then initialize root-declared submodules under references/: git submodule update --init references/Hexalith.EventStore references/Hexalith.Commons references/Hexalith.AI.Tools references/Hexalith.Builds references/Hexalith.FrontComposer references/Hexalith.PolymorphicSerializations references/Hexalith.Memories references/Hexalith.McpCli references/Hexalith.Platform
  2. Create a feature branch from main
  3. Make changes following the code style defined in .editorconfig
  4. Build the solution with dotnet build Hexalith.Tenants.slnx -c Release -warnaserror
  5. Run test projects individually; do not use solution-level dotnet test
  6. Submit a pull request against main

Hexalith.Tenants.slnx remains the canonical development and topology solution. Dependency governance builds Hexalith.Tenants.Standalone.slnx in Release package mode (-p:UseNuGetDeps=true -p:HexalithFrontComposerFromSource=false). That solution contains every owned project and no project or file entries under references/.

The AppHost links the two canonical Dapr identity source files from the declared references/Hexalith.Platform checkout, or the sibling ../Hexalith.Platform checkout. An explicit HexalithPlatformRoot takes precedence. When Tenants is inside the Platform umbrella, run from the Platform root with that owner selected:

dotnet build references/Hexalith.Tenants/src/Hexalith.Tenants.AppHost/Hexalith.Tenants.AppHost.csproj -c Debug -p:UseHexalithProjectReferences=true -p:HexalithPlatformRoot="$PWD" -warnaserror

The AppHost requires the Platform solution marker and both canonical source files before building. It never discovers sources from unnamed parent directories. These checks establish build prerequisites; the owning source mapping and census retain responsibility for the exact committed source identities and bytes.

Test Requirements

All pull requests must pass the relevant existing test projects. Run test projects individually; the repository selects Microsoft.Testing.Platform for its xUnit 4 projects.

dotnet test tests/Hexalith.Tenants.Contracts.Tests/Hexalith.Tenants.Contracts.Tests.csproj -c Release
dotnet test tests/Hexalith.Tenants.Client.Tests/Hexalith.Tenants.Client.Tests.csproj -c Release
dotnet test tests/Hexalith.Tenants.Testing.Tests/Hexalith.Tenants.Testing.Tests.csproj -c Release
dotnet test tests/Hexalith.Tenants.UI.Tests/Hexalith.Tenants.UI.Tests.csproj -c Release
dotnet test samples/Hexalith.Tenants.Sample.Tests/Hexalith.Tenants.Sample.Tests.csproj -c Release
dotnet test tests/Hexalith.Tenants.AppHost.Tests/Hexalith.Tenants.AppHost.Tests.csproj -c Release
dotnet test tests/Hexalith.Tenants.Server.Tests/Hexalith.Tenants.Server.Tests.csproj -c Release

Integration and server tests require DAPR initialization (dapr init) and the local runtime prerequisites documented in the quickstart.

Hexalith.Tenants.IntegrationTests runs on .NET 11 using the EventStore family selected in the Builds catalog. Tenants owns the Aspire AppHost and local daprd test fixtures used for cold bootstrap, authenticated routes, failure injection, and bounded teardown. The CI setup verifies that the executable host source belongs to the same release as the packages. The integration suite uses EventStore's published diagnostics.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Hexalith.Tenants.Server:

Package Downloads
Hexalith.Tenants.Testing

Multi-tenant management service for .NET built on Hexalith.EventStore

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.3 49 11/21/2026
8.0.2 525 11/18/2026
8.0.1 442 11/16/2026
8.0.0 342 11/14/2026
7.0.7 1,151 11/11/2026
7.0.6 169 11/9/2026
7.0.5 958 11/6/2026
7.0.4 442 11/5/2026
7.0.3 119 11/5/2026
7.0.2 727 11/4/2026
7.0.1 107 11/4/2026
7.0.0 827 11/3/2026
6.0.0 2,360 10/31/2026
5.11.2 376 10/31/2026
5.11.1 297 10/28/2026
5.11.0 143 10/28/2026
5.10.1 387 10/22/2026
5.10.0 118 10/21/2026
5.9.0 325 10/18/2026
5.8.0 458 10/8/2026
Loading failed