Skip to content

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.

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
  • Microsoft Bot Framework Template (ConnectSoft.MicrosoftBotFrameworkTemplate) - Layer 3 microservice with Microsoft Bot Framework; uses the base template as a base-template/ git submodule and forked Application / ApplicationModel (same pattern as the Identity template). Install or compose via template short name connectsoft-microsoft-bot-framework when 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
  • Microsoft Bot Framework Template - Conversational bots on the shared microservice kernel (Layer 3; not part of the generic microservice template)

Library Templates

  • Library Template - Reusable .NET libraries
  • API Library Template - Service agent libraries for API integration

Frontend Templates

  • Blazor Templates - Blazor component libraries, microfrontends, and shell applications

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

Key Features

All templates 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

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 / ApplicationModel maintenance when updating the base-template submodule (same model as the Identity template)

Template Documentation

For detailed information about each template: