Hexalith.Tenants.Contracts
3.15.1
dotnet add package Hexalith.Tenants.Contracts --version 3.15.1
NuGet\Install-Package Hexalith.Tenants.Contracts -Version 3.15.1
<PackageReference Include="Hexalith.Tenants.Contracts" Version="3.15.1" />
<PackageVersion Include="Hexalith.Tenants.Contracts" Version="3.15.1" />
<PackageReference Include="Hexalith.Tenants.Contracts" />
paket add Hexalith.Tenants.Contracts --version 3.15.1
#r "nuget: Hexalith.Tenants.Contracts, 3.15.1"
#:package Hexalith.Tenants.Contracts@3.15.1
#addin nuget:?package=Hexalith.Tenants.Contracts&version=3.15.1
#tool nuget:?package=Hexalith.Tenants.Contracts&version=3.15.1
Hexalith.Tenants
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
- 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 in about 15 minutes:
Quickstart Guide — ~15 minutes with prerequisites installed, ~45 minutes including first-time prerequisite setup.
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 |
Project Structure
src/
Hexalith.Tenants.AppHost/ # .NET Aspire AppHost — orchestrates the full topology
Hexalith.Tenants.Aspire/ # Aspire hosting extensions for consuming AppHosts
Hexalith.Tenants.Client/ # Client DI registration and event handling
Hexalith.Tenants.CommandApi/ # REST API, auth, validation, DAPR actors
Hexalith.Tenants.Contracts/ # Commands, events, enums, identities
Hexalith.Tenants.Server/ # Aggregates, projections, domain logic
Hexalith.Tenants.ServiceDefaults/ # Shared service config, OpenTelemetry
Hexalith.Tenants.Testing/ # In-memory fakes and test helpers
tests/
Hexalith.Tenants.Client.Tests/
Hexalith.Tenants.Contracts.Tests/
Hexalith.Tenants.IntegrationTests/
Hexalith.Tenants.Server.Tests/
Hexalith.Tenants.Testing.Tests/
samples/
Hexalith.Tenants.Sample/ # Example consuming service with event subscription
Hexalith.Tenants.Sample.Tests/
docs/
quickstart.md # Getting started guide
demo.md # "Aha Moment" demo walkthrough
event-contract-reference.md # Event schemas and audit patterns
idempotent-event-processing.md # Event handling patterns
scripts/
demo.ps1 # PowerShell demo automation
demo.sh # Bash demo automation
Contributing
Branch Naming
feat/<description>— Features and enhancementsfix/<description>— Bug fixesdocs/<description>— Documentation changes
Development Workflow
- Fork and clone with
--recurse-submodules(theHexalith.EventStoresubmodule is required) - Create a feature branch from
main - Make changes following the code style defined in
.editorconfig - Ensure all tests pass:
dotnet test Hexalith.Tenants.slnx - Submit a pull request against
main
Test Requirements
All pull requests must pass the existing test suite. New functionality should include appropriate unit tests. Integration tests require DAPR initialization (dapr init).
License
This project is licensed under the MIT License — see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Hexalith.EventStore.Contracts (>= 3.15.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Hexalith.Tenants.Contracts:
| Package | Downloads |
|---|---|
|
Hexalith.Tenants.Server
Multi-tenant management service for .NET built on Hexalith.EventStore |
|
|
Hexalith.EventStore.Admin.Server
DAPR-backed admin service implementations for Hexalith.EventStore — shared backend for Web UI, CLI, and MCP |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.15.1 | 118 | 5/9/2026 |
| 3.15.0 | 111 | 5/9/2026 |
| 3.14.2 | 113 | 5/9/2026 |
| 3.14.1 | 109 | 5/7/2026 |
| 3.14.0 | 107 | 5/7/2026 |
| 3.13.5 | 110 | 5/7/2026 |
| 3.13.4 | 111 | 5/7/2026 |
| 3.13.3 | 103 | 5/6/2026 |
| 3.13.2 | 102 | 5/6/2026 |
| 3.13.1 | 107 | 5/6/2026 |
| 3.13.0 | 108 | 5/5/2026 |
| 3.12.0 | 110 | 5/5/2026 |
| 3.11.1 | 105 | 5/5/2026 |
| 3.11.0 | 107 | 5/5/2026 |
| 3.10.0 | 111 | 5/5/2026 |
| 3.9.1 | 109 | 5/4/2026 |
| 3.9.0 | 121 | 5/3/2026 |
| 3.8.0 | 104 | 5/3/2026 |
| 3.7.0 | 111 | 5/3/2026 |
| 3.6.0 | 111 | 5/3/2026 |