๐๏ธ Applying the SOLID principles on a Node.js API
$ git clone https://github.com/gabrielsanttana/solid-node-api
$ cd solid-node-api
$ npm install
$ npm dev
# The API will start serving at localhost:3000
A class or function should have only a single responsability, such as creating a new user.
A software module (class or function) should be open for extension but closed for modification.
Objects in a program should be replaceable with instances of their subtypes without altering the correctness of the program.
Clients should not be forced to depend upon the interfaces that they do not use.
Program to an interface, not to an implementation.
Models of the domain entities.
Main application functionalities, mostly divided by endpoint.
Acts as an interface between the use cases and the database operations, such as inserts, deletes, and updates.
Outside layer that communicates with external services, such as other APIs.
Your contribution is always welcome!
Check out the contribution guideline.