Skip to content

TurkNet/microservice-framework

Repository files navigation

Cloud-native Noctools Core Kit

A set of cloud-native tools and utilities for .NET Core.

The goal of this project is implement the most common used cloud-native technologies (cloud-agnostic approach, containerization mechanism, container orchestration and so on) and share with the technical community the best way to develop great applications with .NET Core.

Features

  • Simple libraries. No frameworks. Little abstraction.
  • Opt-in and out of the box features with Feature Toggles technique.
  • Adhere to twelve-factor app paradigm and more.
  • Authentication/Authorization with OAuth 2.0 and OpenID Connect.
  • Out of the box Miniprofiler.
  • Domain-driven Design in mind.
  • Simply Clean Architecture supports.
  • Generic repository for data persistence.
  • Mapping between domain entity to DTO and vice versa.
  • Clean and demystify error, debug logs.
  • Resilience and health check out of the box.
  • Easy for configuration management.
  • API versioning from Docker container to WebAPI.
  • Documentation template with OpenAPI documentation.
  • Cache a side
  • Wcf Proxy
  • Message Broker
  • Unit and integration tests
  • Sonar Cloud
  • Arch Test

Features Devops

  • Work natively with Kubernetes or even with Service Mesh(Istio).
  • Logging
  • Dashboard on Kibana like (pagespeed,errorline,response time etc.)
  • Monitoring
  • Alert notification on monitoring systems like grafana
  • Obversability like zipkin
  • Correlation

Less code to get starting

Small, lightweight, cloud-native out of the box, and much more simple to get starting with miniservices approach. Why miniservices?

Look how simple we can start as below:

  • Standard template - Noctools.Template.Standard: without storage, merely calculation and job tasks:
public class Startup
{
  public void ConfigureServices(IServiceCollection services)
  {
    services.AddStandardTemplate();
  }

  public void Configure(IApplicationBuilder app)
  {
    app.UseStandardTemplate();
  }
}
  • Elasticsearch template - Noctools.Template.Elasticsearch: with NoSQL (Elasticsearch provider) comes along with the generic repository in place:
public class Startup
{
  public void ConfigureServices(IServiceCollection services)
  {
    services.AddElasticsearchTemplate();
  }

  public void Configure(IApplicationBuilder app)
  {
    app.UseElasticsearchTemplate();
  }
}

Host template guidance

  • Standard Template
  • Elasticsearch Template
  • EfCore Template
  • MongoDB Template

Nuget package publish

$ dotnet pack <.csproj path> -c Release
$ nuget push -Source https://pkgs.dev.azure.com/turknet-it/_packaging/turknet-it/nuget/v3/index.json -ApiKey az <.nupkg>
$ username : from nuget.config
$ password : from nuget.config

Open https://dev.azure.com/turknet-it/Tn.Nuget/_packaging?_a=feed&feed=turknet-it and search as noctools on filter bar

Application architecture

app_architecture

Microservice architecture

msa_architecture

Domain architecture

msa_architecture

Devops architecture

cloud native roadmap

cloud-native

gitops roadmap

gitops

Clean ddd in 10 minutes

  1. https://medium.com/hackernoon/clean-domain-driven-design-in-10-minutes-6037a59c8b7b

Books

  1. https://www.amazon.com.tr/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215
  2. https://www.amazon.com/Implementing-Domain-Driven-Design-Vaughn-Vernon/dp/0321834577
  3. https://www.amazon.com.tr/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164
  4. https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543