{"repo":"panagiop/node.js-clean-architecture","free":true,"listed":false,"github":"https://github.com/panagiop/node.js-clean-architecture","clone":"git clone https://github.com/panagiop/node.js-clean-architecture.git","description":"A use case of Clean Architecture in Node.js comprising of Express.js, MongoDB and Redis as the main (but replaceable) infrastructure.","language":"JavaScript","stars":1162,"topics":["nodejs","microservice","crud","mongodb","expressjs","clean-architechture","rest-api"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"node.js-clean-architecture A use case of Clean Architecture in Node.js comprising of Express.js, MongoDB and Redis as the main (but replaceable) infrastructure. Overview This example is a simple RESTful API application in which a user can create / update / delete / find a post, by using the Clean Architecture . The objective of Clean Architecture by [Robert C. Martin] is the separation of concerns in software. This separation is achieved by dividing the software into layers. Each layer is encapsulated by a higher level layer and the way to communicate between the layers is with the Dependency Rule . Dependency Rule This rule says that nothing in an inner circle can know anything at all about something in an outer circle. The dependency direction is from the outside in. Meaning that the Entities layer is independent and the Frameworks & Drivers layer (Web, UI, DB etc.) depends on all the other layers. Entities Contains all the business entities an application consists of. In our example the User and the Post . Use Cases Contains application specific business rules. These use cases orchestrate the flow of data to and from the entities. In our example some of the use cases are: AddPost , AddUser , DeleteById etc. Interface Adapters This layer is a set of adapters (controllers, presenters, and gateways) that convert data from the format most convenient for the use cases and entities, to the format most convenient for some external agency such as the DB or the Web. In other words,","default_branch":null,"files":null,"tree":[],"storefront":"/r/panagiop","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/panagiop/node.js-clean-architecture/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}