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.
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 for message processing, scheduled jobs, and long-running tasks
- 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
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
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
Template Documentation¶
For detailed information about each template:
- Template Architecture Specification - Comprehensive technical specification
- Template Layering and Reuse - Three-layer architecture guide
- 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
- Template Metadata Composition - Guide to template.json composition
- Templates Dependencies - Comprehensive overview of template dependencies