netcorepal-cloud-framework¶
A tactical
framework for Domain-Driven Design
based on ASP.NET Core
.
Core features: + Domain-Driven Design practice support + CQRS + Event Driven + Distributed transactions (eventual consistency of event handling) + Multi-tenant + Multi-environment (canary release)
How to use¶
Using the template tool¶
Create a project using the NetCorePal.Template
template tool:
# Install the template tool
dotnet new -i NetCorePal.Template
# Create a project
dotnet new netcorepal-web -n My.Project.Name
Template tool source code: https://github.com/netcorepal/netcorepal-cloud-template
Quick start documentation¶
Complete documentation¶
https://netcorepal.github.io/netcorepal-cloud-framework/en
Vision¶
With the development of the .NET technology ecosystem, its microservice architecture in the cloud-native era has become very mature, and the implementation of Domain-Driven Design has also received very good support. At the same time, with the increasing demand for informatization and digitalization in various industries, more enterprises and teams are beginning to pay attention to how to effectively organize R&D teams and realize their business architecture.
The core purpose of this project is to help enterprises quickly build a technical implementation framework based on Domain-Driven Design, while accumulating and discussing the methodology of Domain-Driven Design, so that more enterprises and teams can benefit.
Roadmap¶
Planned capabilities
- Support for flexible configuration and deployment of gateways
- Rapid development framework based on
ASP.NET Core
and open-source components - Provide code template project scaffolding for Domain-Driven Design implementation
- Implement a business-extensible overall canary release solution
- Implement business-extensible tenant capabilities
- Microservice architecture practice based on Domain-Driven Design
- Modular design, can be used and replaced as needed
- Provide detailed documentation
- Provide microservice infrastructure with a visual operation interface
- Based on .NET Aspire
Component description¶
- Context Passing
- AspNetCore (HTTP Request)
- HttpClient
- RabbitMQ (Based on DotNetCore.CAP)
- Domain
- Entity
- StronglyTypedId (With Source Generator)
- AggregateRoot
- DomainEvent
- Repository (Based On EntityFrameworkCore)
- Transaction
- UnitOfWork
- Distributed Transaction
- Outbox (Based on DotNetCore.CAP)
- IdGeneration
- Snowflake
- Snowflake with Etcd
- Snowflake with Redis
- Snowflake with Consul
- Primitives
- Exception Handling
- Clock
- Service Discovery
- Microsoft Service Discovery (Aspire)
- Service Discovery Kubernetes
- Multi Tenant
- Multi Environment
- Gray Environment
For more information, please refer to the documentation
Referenced projects¶
About collaboration¶
We have an open mindset and welcome anyone to provide opinions and suggestions, and also welcome anyone to contribute code.
Development and debugging¶
- Install
.NET 9.0 SDK
or higher.
SDK download address: https://dot.net/download
- Have a
Docker
environment for automated unit testing and integration testing.
Docker Desktop
download address: https://www.docker.com/products/docker-desktop/
-
Build the project
dotnet build
-
Run tests
dotnet test
-
Other optional dependencies
Install skywalking
```shell
# Install oap
docker run --name oap -p 11800:11800 -p 12800:12800 --restart always -d apache/skywalking-oap-server:9.0.0
# Install oap-ui
export version=9.0.0
docker run --name oap-ui -p 8080:8080 -d --link oap -e SW_OAP_ADDRESS=http://oap:12800 apache/skywalking-ui:$version
```
Preview source¶
https://www.myget.org/F/netcorepal/api/v3/index.json
Focus points¶
- Beginner-friendly
- Comprehensive documentation
- Supporting tutorials
- Modeling-friendly
- Direct support for Domain-Driven Design modeling
- Extension-friendly
- Modular design
- Support for module integration or replacement
- Encourage customization and modification based on source code
- Deployment-friendly
- Support Docker
- Support Helm
- Testing-friendly
- Emphasize support for unit testing and integration testing
- AI-friendly
- Continuously explore support for AI automated code generation with large language models
Some principles¶
We do not reinvent the wheel, but rather organically organize excellent infrastructure to achieve our goals through good architectural conventions.
We continuously focus on collaboration efficiency. The architectural design of this project will continuously focus on the impact of the architecture on team collaboration and continuously improve.
We continuously focus on robustness and the quality of project code.