App generator API solution template which is built on Hexagnonal Architecture with all essential feature using .NET Core!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
If you like or are using this project to learn or start your solution, please give it a star. Thanks!
If you have found this project helpful, either as a library that you use or as a learning tool, please consider buying me a coffee:
Hexagonal architecture was proposed by Alistair Cockburn in 2005.
Hexagonal Architecture, or to call it properly, "Ports and Adapters pattern", is driven by the idea that the application is central to your system. All inputs and outputs reach or leave the core of the application through a port that isolates the application from external technologies, tools and delivery mechanics
App generator API solution template which is built on Hexagnonal Architecture with all essential feature using .NET Core!
Select project type as WebAPI, and select Hexagonal Architecture
Select project type as Web API, and select Hexagonal Architecture
Navigate to Health Checks UI https://localhost:44377/healthcheck-ui and make sure everything is green.
** Change port number according to your application
Swagger UI https://localhost:44377/OpenAPI/index.html
** Change port number according to your application
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
Note: while commiting message follow conventional standard - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
we can see that all the Layers are dependent only on the Core Layers
Domain Api layer
Domain Api Layers (Core layer) is implemented in center and never depends on any other layer.
It is contract for domain layer interaction(ports) so that primary and secondary adapters can implement the contract.This is also known and DIP or Dependency Inversion Principle
Domain layer
Domain Layers (Business layer) which has business logic. and it is keep clean with no other dependencies.
Rest Adapter layer
Rest Adapter also known as left port's adapter and primary adapter where we implement restfull service (i.e., GET, POST, PUT, DELETE, etc)
Persistence Adapter layer
Rest Adapter also known as right port's adapter and secondary adapterwhere we have implement Entityframework core which already implements a repository design pattern. DbContext will be UoW (Unit of Work) and each DbSet is the repository. This interacts with our database using dataproviders
Bootstrap/Presentation Layer
This is final build of project, where it all begins
See the contents of the LICENSE file for details
Having any issues or troubles getting started? Drop a mail to [email protected] or Raise a Bug or Feature Request. Always happy to help.