Silky Microservice FrameworkSilky Microservice Framework
Home
Docs
Config
Source
github
gitee
  • 简体中文
  • English
Home
Docs
Config
Source
github
gitee
  • 简体中文
  • English
  • Introduction

    • Silky Framework Overview
  • Getting Started

    • Glossary
    • Quick Start
    • Project Template
    • Microservice Architecture
    • Sample Projects
  • Host & Module

    • Host Types
    • Gateway Configuration
    • Module System
    • Plugin System
  • Gateway & HTTP

    • Swagger / OpenAPI
    • MiniProfiler
    • CORS
    • Audit Logging
  • Service & RPC

    • App Services & Service Entries
    • RPC Communication
    • WebSocket
    • Service Registry
    • Service Governance
  • Data & Cache

    • EFCore Data Access
    • Caching
    • Distributed Lock
  • Security & Auth

    • Identity & Authentication
    • Distributed Transactions
  • Infrastructure

    • Dependency Injection
    • Object Mapping
    • Validation
    • Link Tracking (SkyAPM)
    • Logging (Serilog)
    • Health Checks
    • Message Bus (MassTransit)
    • Unit & Integration Testing

Overview

Silky provides a dotnet new project template that scaffolds a complete microservice application including service interfaces, implementation projects, and a gateway.

Installation

dotnet new install Silky.App.Template

Verify installation:

dotnet new list | grep silky

Expected output:

Template Name           Short Name      Language  Tags
----------------------  --------------  --------  ---------------------
Silky Host              silky-host      C#        Silky/Microservice
Silky Gateway           silky-gateway   C#        Silky/Gateway
Silky App Solution      silky-app       C#        Silky/Solution

Creating a New Solution

Create a complete multi-project solution:

dotnet new silky-app -n MyCompany -o ./MyCompany

This generates:

MyCompany/
  MyCompany.sln
  src/
    MyCompany.GatewayHost/          # API gateway
    MyCompany.SampleService.Host/   # Business microservice host
    MyCompany.SampleService.Application/       # Application service implementation
    MyCompany.SampleService.Application.Contracts/  # Interfaces & DTOs
    MyCompany.SampleService.Domain/            # Domain entities & logic
  NuGet.Config
  README.md

Creating Individual Projects

Create a Microservice Host

dotnet new silky-host -n Order -o ./src/OrderHost

Create a Gateway

dotnet new silky-gateway -n Gateway -o ./src/GatewayHost

Template Options

dotnet new silky-app --help
OptionDescriptionDefault
--registryRegistry center type (zookeeper/nacos/consul)zookeeper
--transportTransport protocol (tcp)tcp

Update the Template

dotnet new update

Or reinstall with the latest version:

dotnet new uninstall Silky.App.Template
dotnet new install Silky.App.Template

Next Steps

After scaffolding, follow the Quick Start guide to configure the registry center, run services, and test RPC communication.

Edit this page
Prev
Quick Start
Next
Microservice Architecture