Skip to content

Development

Adding a lifecycle operation

  1. Add an input + *Validator in .DomainModel / .DomainModel.Impl.
  2. Extend TenantLifecycleStatusEnumeration.AllowedTransitions if a new state/transition is involved.
  3. Add the method to ITenantsProcessor / DefaultTenantsProcessor, publish the matching tenants.domain.v1.* event.
  4. Expose over both adapters (ITenantManagementService -> REST controller + Grpc* adapter).
  5. Add unit + acceptance tests, including cross-adapter parity.

Evolving the aggregate

The live aggregate is a single flat TenantEntity. If you introduce documented children (TenantProfile, Contact), keep the one aggregate root rule (ITenant) - the architecture test enforces it - and model children as part of the Tenant aggregate.

Downstream contract stability

This service's published language is consumed by Entitlements, Billing, and Metering. CrossRepoPublishedLanguageTests guards the topic/event contracts; coordinate event shape changes across contexts.

Base template

The minimal-host matrix (build/DisableMicrosoftExtensionsStackForMinimalHost.TenantsHost.props) controls enabled stacks. See template layering and reuse.

See also