Foundation.Templates 1.1.0

dotnet new install Foundation.Templates::1.1.0
                    
This package contains a .NET Template Package you can call from the shell/command line.

Foundation Project Templates

Official project templates for creating Foundation-based applications and services.

Installation

dotnet new install Foundation.Templates

Available Templates

foundation-api

Full-featured Web API with Clean Architecture, authentication, caching, and more.

dotnet new foundation-api -n MyApi

Options:

  • --AuthType - Authentication type (JWT, Identity, None) - Default: JWT
  • --CacheType - Caching strategy (Redis, Memory, None) - Default: Redis
  • --DatabaseProvider - Database provider (SqlServer, PostgreSQL, SQLite) - Default: SqlServer
  • --IncludeDocker - Include Docker support - Default: true
  • --IncludeTests - Include test projects - Default: true

foundation-microservice

Lightweight microservice with service discovery and health checks.

dotnet new foundation-microservice -n MyService

Options:

  • --ServiceDiscoveryProvider - Service discovery (Configuration, Kubernetes, Consul, None) - Default: Configuration
  • --MessagingProvider - Messaging infrastructure (Wolverine, RabbitMQ, None) - Default: Wolverine
  • --DatabaseProvider - Database (SqlServer, PostgreSQL, SQLite, None) - Default: PostgreSQL
  • --IncludeHealthChecks - Include health check endpoints - Default: true
  • --IncludeDocker - Include Docker support - Default: true
  • --IncludeMetrics - Include Prometheus metrics - Default: true
  • --ApiKeyAuth - Include API key authentication - Default: true

foundation-worker

Background worker service for processing tasks.

dotnet new foundation-worker -n MyWorker

Options:

  • --Scheduler - Job scheduling (Cron, Quartz, None) - Default: None
  • --Messaging - Message bus (Wolverine, RabbitMQ) - Default: Wolverine
  • --IncludeDocker - Include Docker support - Default: true

foundation-library

Class library following Foundation patterns.

dotnet new foundation-library -n MyLibrary

Options:

  • --LibraryType - Library type (Domain, Application, Infrastructure) - Default: Domain
  • --IncludeContracts - Include contracts project - Default: false
  • --IncludeTests - Include test project - Default: true

Examples

Create a full API with PostgreSQL and no Docker

dotnet new foundation-api -n ProductApi --DatabaseProvider PostgreSQL --IncludeDocker false

Create a microservice with Kubernetes service discovery

dotnet new foundation-microservice -n OrderService --ServiceDiscovery Kubernetes

Create a worker service with Quartz scheduling

dotnet new foundation-worker -n EmailWorker --Scheduler Quartz

Create an infrastructure library with contracts

dotnet new foundation-library -n MyCompany.Infrastructure --LibraryType Infrastructure --IncludeContracts true

Post-Creation

After creating a project:

  1. Navigate to the project directory
  2. Restore dependencies: dotnet restore
  3. Build the project: dotnet build
  4. Run the project: dotnet run

For API projects with Docker:

docker-compose up -d
dotnet ef database update -s src/[ProjectName].WebApi -p src/[ProjectName].Infrastructure
dotnet run --project src/[ProjectName].WebApi

Support

  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 752 7/22/2025
1.0.0 730 7/22/2025