Clean Architecture with .NET Core & React+Redux
Sample implementation of the Clean Architecture Principles with .NET Core. Use cases as central organizing structure, decoupled from frameworks and technology details. Built by small components that are developed and tested in isolation.
We maintain two versions:
- Latest .NET Core 3.1 release - Check the .NET Core SDK on
- .NET 5 - Experimental features and .NET 5.
Manga is a Virtual Wallet software in which the customer register an account then manage the balance by
The Web API's demo is hosted on Azure servers and there's a beautiful Swagger Client available.
We also support the React client:
Build & Run
To startup the whole solution, execute the following command:
$ cd .docker; ./makecert.sh && ./trustcert.sh && sudo ./hostsadd.sh; popd; $ cd .docker; ./startup.sh; popd;
Then the following containers should be running
|SQL Server||Server=localhost;User Id=sa;Password=<YourStrong!Passw0rd>;Database=Accounts;|
https://wallet.local:8081 then click on Log In. Trust the self-signed certificate.
If you prefer dotnet commands then start each service individually:
Expand to get the dotnet run steps.
Generate Self Signed Certificate
dotnet dev-certs https --clean dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\aspnetapp.pfx -p MyCertificatePassword dotnet dev-certs https --trust
Spin up SQL Server in a Docker container
docker pull mcr.microsoft.com/mssql/server:2019-latest docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2019-latest
Create and Seed Accounts Database
dotnet tool update --global dotnet-ef --version 3.1.6 dotnet ef database update --project accounts-api/src/Infrastructure --startup-project accounts-api/src/WebApi
dotnet run --project identity-server/src/IdentityServer.csproj
dotnet run --project accounts-api/src/WebApi/WebApi.csproj
pushd wallet-spa/src/ClientApp npm install popd dotnet run --project wallet-spa/src/WalletSPA.csproj --launch-profile WalletSPA
Learn how to design modular applications.
Explore the .NET Core features.
Learn how to design modular applications
Learning how to design modular applications will help you become a better engineer. Designing modular applications is the holy grail of software architecture, it is hard to find engineers experienced on designing applications which allows adding new features in a steady speed.
Explore the .NET Core features
.NET Core brings a sweet development environment, an extensible and cross-platform framework. We will explore the benefits of it in the infrastructure layer and we will reduce its importance in the application and domain layers. The same rule is applied for modern C# language syntax.
Learn from the open source community
This is continually updated, open source project.
Contributions are welcome!
Learn from the community.
Feel free to submit pull requests to help:
- Fix errors.
- Build the Front End.
- Submit issues and bugs.
The Discussão em Português is pinned for the large community of brazillian developers.
Index of Clean Architecture Manga
- Hexagonal Architecture Style
- Onion Architecture Style
- Clean Architecture Style
- Unit of Work
- First-Class Collections
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
- Swagger and API Versioning
- Microsoft Extensions
- Feature Flags
- Data Annotations
- Running the Application Locally
- Running the Tests Locally
- Continuous Integration & Continuous Deployment
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!