ConnectSoft Templates Overview¶
This document provides an overview of ConnectSoft solution templates. Templates are pre-configured, reusable solution structures that enable rapid development of production-ready applications following ConnectSoft's architectural principles and best practices.
See also the Templates registry for a master table of repos, dotnet new short names, and alignment notes.
Canonical CLI short names (microservice templates)¶
Base and extended microservice templates use connectsoft-* dotnet new short names (for example connectsoft-base, connectsoft-apigateway). See Template naming guide for the full table, installer model (base vs composed extended packages), and migration from legacy cs-* names.
Template Architecture¶
ConnectSoft templates follow a three-layer architecture model:
Layer 1: Shared Libraries¶
- NuGet packages (
ConnectSoft.Extensions.*) - Cross-cutting infrastructure (logging, messaging, persistence, etc.)
- Used by all templates
Layer 2: Base Template¶
- Base Template (
ConnectSoft.BaseTemplate) - Foundation for all specialized templates - Domain-agnostic microservice structure
- Clean Architecture layout
- Common infrastructure and bootstrapping
Layer 3: Specialized Templates¶
All specialized templates are derived from the Base Template:
- Microservice Template - Full-featured microservice with Clean Architecture, DDD, and event-driven capabilities
- Worker Template — Background worker service (Layer 3
ConnectSoft.WorkerTemplate; same submodule and layering model as other specialized templates) - Identity Backend Template - Identity and user management service with authentication and authorization
- Authorization Server Template - OAuth2/OpenID Connect authorization server for token management
- API Gateway Template - API gateway with routing, aggregation, authentication, and rate limiting
- Health Checks Aggregator (
ConnectSoft.HealthChecksAggregatorTemplate) — aggregated health APIs over downstream services; short nameconnectsoft-healthchecks-aggregator - SaaS bounded-context hosts — five
ConnectSoft.Saas.*Templaterepos (Tenants, Products Catalog, Entitlements, Metering, Billing); see registry for eachconnectsoft-saas-*short name - Microsoft Bot Framework Template (
ConnectSoft.MicrosoftBotFrameworkTemplate) — Layer 3 microservice with Microsoft Bot Framework;base-template/submodule and forkedApplication/ApplicationModel(Identity-style). Short nameconnectsoft-microsoft-bot-frameworkwhen the composed template package is published.
Template Categories¶
Backend Service Templates¶
All backend service templates are derived from the Base Template:
- Base Template - Foundation template providing core microservice structure
- Microservice Template - Full-featured microservice with multiple service models
- Worker Template - Background job processing and scheduled tasks
- Identity Backend Template - User identity and management
- Authorization Server Template - OAuth2/OpenID Connect server
- API Gateway Template - API gateway and reverse proxy
- Health Checks Aggregator — federated health endpoints (overview)
- SaaS bounded-context templates — overview for
ConnectSoft.Saas.*hosts - Microsoft Bot Framework Template - Conversational bots on the shared microservice kernel (Layer 3; not part of the generic microservice template)
- MAUI Base Template (
ConnectSoft.MauiBaseTemplate) — .NET MAUI cross-platform application kernel;dotnet newshort nameconnectsoft-maui-base. Separate fromConnectSoft.BaseTemplate(microservice kernel); see Architecture.
Library Templates¶
- Library Template - Reusable .NET libraries
- API Library Template - Service agent libraries for API integration
- AI Skills Library (
ConnectSoft.AISkillsLibraryTemplate) — Blazor MFE and AI templates; short nameconnectsoft-aiskills-library
Frontend Templates¶
- Blazor Component Library — reusable Blazor RCL / design-system style library
- Blazor Microfrontend Library — microfrontend module packaging
- Blazor Shell — application shell / portal host
- Marketing Site Template (
ConnectSoft.MarketingSiteTemplate) — Blazor Server marketing website with UIKit, Flowbite, JSON-driven pages, SEO, analytics, and lead capture;dotnet newshort nameconnectsoft-marketing-site - Blazor MFE product templates — AI Chat, Authorization Server Admin, and other MFE product repos (including links to additional repositories without a published
dotnet newshort name yet)
Mobile (MAUI) templates¶
- MAUI Base Template (
ConnectSoft.MauiBaseTemplate) — Clean Architecture MAUI solution with optional observability, localization, SQLite/offline, Serilog, MSAL-oriented auth, and HTTP resilience. Use with backend templates (REST + OIDC) as the mobile client counterpart to Factory microservices — not via thebase-template/submodule used by Layer 3 service templates.
Platform Templates¶
- Platform Template - Multi-service SaaS platforms
Documentation Templates¶
- Documentation Template - MkDocs-based documentation sites
Template Inheritance Model¶
All specialized backend templates extend the Base Template through:
Git Submodule (Build-Time)¶
- Base Template included as
base-template/submodule - Specialized templates add domain-specific projects
- Both base and specialized code coexist in the same solution
- Fully buildable as normal .NET solutions
Overlay Composition (Generation-Time)¶
- At generation time, base + overlay are composed
- Final template includes both base structure and domain-specific code
- Template metadata (
template.json) is merged from base + extend files
Documentation Composition¶
- ConnectSoft.Documentation is the source of truth for shared concepts, standards, architecture, technologies, and cross-cutting concerns.
- ConnectSoft.BaseTemplate keeps Layer 2 implementation references: exact projects, registration methods, options, feature flags, MSBuild behavior, packages, tests, and troubleshooting.
- Layer 3 templates keep overlay docs only: purpose, inherited features, feature matrix, domain-specific projects, configuration deltas, runbook, tests, and generated-solution behavior.
- Every template repo should carry a
docs-manifest.ymlso tooling can validate coverage, generate matrices, compose generated-solution docs, and report missing canonical topics. - Generated solutions receive curated docs. They link to central canonical docs by default and include selected BaseTemplate/overlay implementation pages only when the enabled features need them.
Key Features¶
Templates commonly provide:
- Clean Architecture - Structured layering and separation of concerns
- Domain-Driven Design - DDD patterns and practices
- Observability - Logging, metrics, tracing with OpenTelemetry
- Testing - Unit tests, integration tests, architecture tests
- CI/CD - Pre-configured Azure DevOps pipelines
- Documentation - Comprehensive documentation structure
- Security - Security-first design principles
- Multitenancy and SaaS — where applicable,
ConnectSoft.Extensions.Saas.*integration and tenancy patterns; see SaaS libraries, Multitenancy guide, and SaaS bounded-context templates - Composable features — conditional MSBuild /
Use*symbols; see Cross-cutting features — template matrix (internal) - ConnectSoft.Extensions ecosystem — ConnectSoft.Extensions catalog (packages pinned by Base Template CPM and beyond)
- Metrics and options — extensibility and testing hooks; see Metrics and options extensibility
- Integration and layering — submodule + overlay model; see Template layering and reuse
- Documentation governance — canonical/source-of-truth docs, manifests, and generated docs bundles; see Template documentation policy and Documentation source of truth
Template Selection Guide¶
When to Use Base Template¶
- Creating new specialized template overlays
- Understanding microservice foundation structure
- Building domain-agnostic microservice infrastructure
When to Use Microservice Template¶
- Building backend services with REST/gRPC APIs
- Creating domain-specific services
- Implementing business logic services
- Building event-driven services
When to Use Worker Template¶
- Building background job processing services
- Implementing scheduled task execution
- Creating message queue consumers
- Building long-running task processors
When to Use Identity Backend Template¶
- Building identity and user management services
- Implementing user authentication
- Managing user profiles and accounts
- Creating multi-tenant identity solutions
When to Use Authorization Server Template¶
- Building OAuth2/OpenID Connect servers
- Implementing token-based authentication
- Creating authorization servers for API access
- Building SSO (Single Sign-On) solutions
When to Use API Gateway Template¶
- Aggregating multiple microservices
- Implementing API versioning
- Managing API authentication
- Rate limiting and throttling
When to Use Microsoft Bot Framework Template¶
- Building Azure Bot Service / Bot Framework endpoints with the ConnectSoft microservice layout
- Needing dialogs, adaptive cards, and bot telemetry on the shared kernel
- Accepting forked
Application/ApplicationModelmaintenance when updating thebase-templatesubmodule (same model as the Identity template)
Template Documentation¶
For detailed information about each template:
- Templates registry — master table (repos, short names)
- Blazor MFE and AI templates — AI Skills Library and Blazor MFE product templates
- Template Architecture Specification - Comprehensive technical specification
- Template Layering and Reuse - Three-layer architecture guide
- Extended templates: full multi-layer alignment playbook - Submodule, MSBuild, Docker, application and template-installer CI, composition (Identity + BaseTemplate as reference)
- Template Documentation Policy - Layered ownership, manifests, generated solution docs, and validation rules
- ConnectSoft.Extensions catalog - Packages pinned by ConnectSoft.BaseTemplate CPM
- Template Metadata Composition - Template.json composition details
- Templates Dependencies - Template dependencies and relationships
Related Documents¶
- Template Architecture Specification - Technical specification for template hierarchy and inheritance
- Template Layering and Reuse - Guide to three-layer template architecture
- Extended templates: full multi-layer alignment playbook - Operational guide for extended Layer 3 template repositories
- Template Documentation Policy - Documentation ownership and composition policy for Layer 1-3 templates
- Template Metadata Composition - Guide to template.json composition
- Templates Dependencies - Comprehensive overview of template dependencies