Skip to content

SaaS bounded contexts and ConnectSoft.Saas.*Template backend repositories

Each in-scope bounded context is delivered as one Git repository named ConnectSoft.Saas.<Context>Template. That repository:

  • Includes ConnectSoft.BaseTemplate as a Git submodule (not a separate “MicroserviceTemplate.Base” branding in SaaS naming).
  • Ships a dotnet new template pack producing a DDD-oriented solution (Application, Domain, EntityModel, persistence/messaging as needed).
  • Publishes ServiceModel / RestApi / Grpc projects for external consumers (aligned with EPIC-SAAS-SVC-SURFACE in saas-extensions-and-templates-epics.md).

Out of scope contexts

Audit & compliance, Notifications, and Configuration / feature-flag platforms are not part of this template program; they may adopt the same patterns later under other initiatives.

Context matrix

Bounded context Template repository (backend) Role Canonical aggregates (see company DDD spec)
Tenants ConnectSoft.Saas.TenantsTemplate Tenant lifecycle, directories, isolation boundaries Tenant, directory, and related aggregates as defined in the company DDD Entities specification
Product catalog ConnectSoft.Saas.ProductsCatalogTemplate Sellable products, editions, features, pricing surfaces Product, Edition, Feature, ProductFeature, EditionFeature, …
Entitlements ConnectSoft.Saas.EntitlementsTemplate What a tenant may use (feature entitlements, assignments) Entitlement-related aggregates
Billing ConnectSoft.Saas.BillingTemplate Subscriptions, invoices, payments integration Billing aggregates
Metering ConnectSoft.Saas.MeteringTemplate Usage events, quotas, rating inputs Metering aggregates

Company canonical model

Aggregate and entity names, relationships, and cross-context rules are defined in the ConnectSoft.CompanyDocumentation repository: docs/saas/framework/saas-platform-ddd-entities.md (published under SaaS & Solutions → SaaS Framework).

Optional generic scaffold

  • ConnectSoft.Saas.MicroserviceTemplate (optional) — parameterizable dotnet new template for a non–context-specific SaaS-flavored microservice (same submodule to ConnectSoft.BaseTemplate). Use when a team needs a generic SaaS backend before a dedicated context template exists.

Delivery waves (suggested)

  1. Core path: Tenants → Product catalog → Entitlements (enables catalog + access stories).
  2. Monetization path: Billing → Metering (depends on stable product/edition/feature identifiers from catalog).

Blazor alignment

  • Each context may have one or more MFE template repositories for admin or self-service UI; they consume ServiceModel packages and OIDC via the Authorization Server pattern.
  • ConnectSoft.Blazor.Shell.Saas hosts MFEs and shared navigation; see ConnectSoft Blazor Templates HLD and SaaS platform solution plan.

Reference implementation

  • ConnectSoft.Saas.ProductCatalogDemo — product-catalog–shaped prototype in the ConnectSoft Git project; useful for extracting Phase 2 library contracts—not a full multi-tenant platform by itself.