Skip to content

SaaS Tenants (ConnectSoft.Saas.TenantsTemplate)

A Layer 3 SaaS microservice template for the Tenants bounded context - the authoritative tenant registry and lifecycle service. Aggregate root: Tenant. Topic prefix: tenants.domain.v1.

It extends ConnectSoft.BaseTemplate via the base-template/ submodule + MSBuild layering. Shared behavior is covered by the Base Template and template layering; this section documents the Tenants domain.

Responsibility

Owns the source of truth for tenant partitions: create draft tenants, activate, suspend, decommission, and change residency region. One Tenant row per tenant partition, with globally unique TenantId and TenantKey. It publishes the platform's tenant lifecycle events that downstream contexts (Entitlements, Billing, Metering) consume.

External references (by id only)

  • EditionRef -> Products Catalog
  • BillingAccountRef -> Billing

Live aggregate vs docs

docs/bounded-context.md lists planned children (TenantProfile, Contact, ...) that are not yet implemented. The live aggregate is a flat TenantEntity with scalar fields.

dotnet new

dotnet new install ConnectSoft.Saas.TenantsTemplate.Installer
dotnet new connectsoft-saas-tenants -n ConnectSoft.MyTenantsService

See also