Skip to content

gabrielsanttana/solid-node-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

solid-node-api

๐Ÿ›๏ธ Applying the SOLID principles on a Node.js API

GitHub license PRs Welcome

๐Ÿ› ๏ธ Technologies

โš™๏ธ Requirements

๐Ÿš€ Installation

$ 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 

๐Ÿ›๏ธ SOLID Principles

Single Responsability

A class or function should have only a single responsability, such as creating a new user.

Open Closed

A software module (class or function) should be open for extension but closed for modification.

Liskov's Substitution

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of the program.

Interface Segregation

Clients should not be forced to depend upon the interfaces that they do not use.

Dependecy Inversion

Program to an interface, not to an implementation.

๐Ÿงฑ Architectural Concepts

Entities

Models of the domain entities.

Use Cases

Main application functionalities, mostly divided by endpoint.

Repositories

Acts as an interface between the use cases and the database operations, such as inserts, deletes, and updates.

Providers

Outside layer that communicates with external services, such as other APIs.

๐Ÿ’๐Ÿฝ Contribute

Your contribution is always welcome!

Check out the contribution guideline.

โš–๏ธ License

MIT License

Releases

No releases published

Packages

No packages published