Base Template — Use cases¶
Use Base (Layer 2) directly when¶
- Authoring a new Layer 3 template — you need the submodule graph, MSBuild conditions, and CI baselines before product naming.
- Prototyping kernel behavior — optional stacks (Orleans grain health, ingestion pipeline, OpenTelemetry layouts) without product noise.
- Fixing shared defects — security defaults, wrong middleware order, broken health checks in
MicroserviceRegistrationBase. - Teaching ConnectSoft structure —
.BaseTemplate.*sample layout is smaller than a full Microservice or SaaS repo.
Use a Layer 3 template instead when¶
- Shipping a product microservice — use Microservice Template or a SaaS bounded-context template; you need real
ConnectSoft.{Product}.DomainModeland production CI. - Exposing identity or tokens — Identity Backend owns users/roles; Authorization Server issues OAuth/OIDC; do not rebuild these on raw Base alone.
- Need an edge / BFF — API Gateway for routing, perimeter auth, rate limits.
- Need fleet-wide health aggregation — Health Checks Aggregator.
Anti-patterns¶
| Anti-pattern | What to do |
|---|---|
Long-lived product code only inside base-template/ submodule checkout |
Move domain to Layer 3; fix kernel in Base repo |
dotnet new connectsoft-base for a customer-facing service without renaming / hardening |
Use Microservice or domain template; align configuration alignment |
Duplicating MicroserviceRegistrationBase logic in one product |
Extend via documented hooks; upstream the change |