An open API service indexing awesome lists of open source software.

https://github.com/gftf2011/clean-node-todolist

Node.Js API built with Clean Architecture and Design Patterns that runs in REST and Graphql at the same time
https://github.com/gftf2011/clean-node-todolist

clean-architecture clean-code coveralls cqs design-patterns docker docker-compose dockerfile github-actions graphql javascript nodejs postgresql rest rest-api sonar sonarcloud test typescript

Last synced: 4 months ago
JSON representation

Node.Js API built with Clean Architecture and Design Patterns that runs in REST and Graphql at the same time

Awesome Lists containing this project

README

          


CLEAN Node.JS TODOLIST • :ledger: :computer:




Coverage Status
Quality Gate Status



About
Supported OS
Design Patterns
Principles
Business Rules
Required Tools
Running Project
Running Tests
License





## :page_facing_up: About

This a backend from a TODO LIST typescript project.

The objective from this project is to show how to create an API with a well-defined and decoupled architecture, using Clean Architecture concepts, dividing the layers responsibility and exploring the usage of several design patterns !


## :hammer_and_wrench: Supported OS

- [x] Mac OS
- [x] Linux
- [x] Windows - WSL


## :large_blue_diamond: Design Patterns

### Creational

- [Abstract Factory](https://refactoring.guru/design-patterns/abstract-factory)
- [Factory Method](https://refactoring.guru/design-patterns/factory-method)
- [Builder](https://refactoring.guru/design-patterns/builder)
- [Singleton](https://refactoring.guru/design-patterns/singleton)

### Structural

- [Adapter](https://refactoring.guru/design-patterns/adapter)
- [Composite](https://refactoring.guru/design-patterns/composite)
- [Decorator](https://refactoring.guru/design-patterns/decorator)
- [Proxy](https://refactoring.guru/design-patterns/proxy)

### Behavioral

- [Chain of responsability](https://refactoring.guru/design-patterns/chain-of-responsibility)
- [Command](https://refactoring.guru/design-patterns/command)
- [Mediator](https://refactoring.guru/design-patterns/mediator)
- [Strategy](https://refactoring.guru/design-patterns/strategy)
- [Template method](https://refactoring.guru/design-patterns/template-method)

### Non GOF - Gang of Four - Official

- [Monad Either](https://itnext.io/either-monad-a-functional-approach-to-error-handling-in-js-ffdc2917ab2)


## :blue_book: Principles

- [Single Responsibility Principle (SRP)](https://en.wikipedia.org/wiki/Single-responsibility_principle)
- [Open Closed Principle (OCP)](https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle)
- [Liskov Substitution Principle (LSP)](https://en.wikipedia.org/wiki/Liskov_substitution_principle)
- [Interface Segregation Principle (ISP)](https://en.wikipedia.org/wiki/Interface_segregation_principle)
- [Dependency Inversion Principle (DIP)](https://en.wikipedia.org/wiki/Dependency_inversion_principle)
- [Separation of Concerns (SOC)](https://en.wikipedia.org/wiki/Separation_of_concerns)
- [Don't Repeat Yourself (DRY)](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself)
- [You Aren't Gonna Need It (YAGNI)](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it)
- [Keep It Simple, Stupid (KISS)](https://en.wikipedia.org/wiki/KISS_principle)
- [Composition Over Inheritance](https://en.wikipedia.org/wiki/Composition_over_inheritance)


## :building_construction: Business Rules

- [Sign-Up](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/sign-up.md)
- [Sign-In](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/sign-in.md)
- [Find Note](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/find-note.md)
- [Find Note By User ID](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/find-notes-by-user-id.md)
- [Create Note](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/create-note.md)
- [Update Note](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/update-note.md)
- [Update Note Finishing Status](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/update-finished-note.md)
- [Delete Note](https://github.com/gftf2011/clean-node-todolist/tree/main/requirements/delete-note.md)


## :clipboard: Required Tools

- [x] Node - [https://nodejs.org/](https://nodejs.org/)
- Node version: 18.x.x
- npm version: 9.x.x
- [x] Docker - [https://www.docker.com/](https://www.docker.com/)


## :racing_car: Running Project
```sh
$ npm i
$ npm run start:dev
```

### OBS.: Ensure to install all dependencies in Required Tools


## :test_tube: Running Tests

> ### Unit Tests
```sh
$ npm run test:unit
```

> ### Integration Tests
```sh
$ npm run test:integration
```

> ### E2E Tests
```sh
$ npm run test:e2e
```

> ### Full Test Coverage Report
```sh
$ npm run test
```


## :memo: License

This project is under MIT license. See the [LICENSE](https://github.com/gftf2011/clean-node-todolist/blob/main/LICENSE) file for more details.

---

Made with lots of :heart: by [Gabriel Ferrari Tarallo Ferraz](https://www.linkedin.com/in/gabriel-ferrari-tarallo-ferraz/)