https://github.com/danielaraldi/clean-node-api
API of surveys in NodeJs using Typescript, TDD, Clean Architecture, Design Patterns and SOLID principles. @rmanguinho 👨💻
https://github.com/danielaraldi/clean-node-api
bcrypt clean-architecture clean-code coveralls ddd-architecture docker eslint expressjs git-commit-message-linter heroku husky jest jsonwebtoken mongodb nodejs nodemon npm swagger typescript validatorjs
Last synced: 4 months ago
JSON representation
API of surveys in NodeJs using Typescript, TDD, Clean Architecture, Design Patterns and SOLID principles. @rmanguinho 👨💻
- Host: GitHub
- URL: https://github.com/danielaraldi/clean-node-api
- Owner: DanielAraldi
- License: mit
- Created: 2021-02-09T23:29:27.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-06T22:12:20.000Z (almost 2 years ago)
- Last Synced: 2024-03-07T19:24:02.370Z (almost 2 years ago)
- Topics: bcrypt, clean-architecture, clean-code, coveralls, ddd-architecture, docker, eslint, expressjs, git-commit-message-linter, heroku, husky, jest, jsonwebtoken, mongodb, nodejs, nodemon, npm, swagger, typescript, validatorjs
- Language: TypeScript
- Homepage: https://ds-clean-node-api.onrender.com/api/docs/
- Size: 4.37 MB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://coveralls.io/github/DanielAraldi/clean-node-api?branch=main)
[](https://wakatime.com/badge/user/920a7e43-2969-4212-82ff-1b375685ff58/project/aa2b6b4a-f3d6-4ae6-a2e3-8eeb25e31f91)
# **Clean Node API**
[](https://www.udemy.com/course/tdd-com-mango/?referralCode=B53CE5CA2B9AFA5A6FA1)
This API makes part of training of the teacher [Rodrigo Manguinho (Mango)](https://github.com/rmanguinho) on Udemy.
The objective of the training is show to create an API with a defined architecture well and uncoupled, using TDD (Test Drive Development) such as work methodology. Clean Architecture to do responsibility distribution in layer, always following the SOLID principles and, whenever possible, applying Design Patterns to solve some common problems.
> ## APIs:
1. [Sign Up](./requirements/signup.md)
1. [Login](./requirements/login.md)
1. [Add survey](./requirements/add-survey.md)
1. [List surveys](./requirements/load-surveys.md)
1. [Answer survey](./requirements/save-survey-result.md)
1. [Load survey result](./requirements/load-survey-result.md)
> ## Additional APIs:
1. [Refresh token](./requirements/refresh-token.md)
1. [Edit user data](./requirements/edit-user-data.md)
> ## Principles applied:
- Single Responsibility Principle (SRP)
- Open Closed Principle (OCP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)
- Don't Repeat Yourself (DRY)
- Composition Over Inheritance
- Small Commits
> ## Design Patterns applied:
- Factory
- Adapter
- Composite
- Decorator
- Dependency Injection
- Abstract Server
- Composition Root
> ## Dethodology/designs used:
- TDD
- Clean Architecture
- DDD
- Conventional Commits
- GitFlow
- Modular Design
- Dependency Diagrams
- Use Cases
> ## Libraries e tools used:
- [NPM](https://www.npmjs.com/)
- [TypeScript](https://www.typescriptlang.org/)
- [Git](https://git-scm.com/)
- [Docker](https://www.docker.com/)
- [Jest](https://jestjs.io/)
- [MongoDB](https://www.mongodb.com/)
- Bcrypt
- [JsonWebToken](https://jwt.io/)
- [Faker](https://fakerjs.dev/)
- [Coveralls](https://coveralls.io/)
- Validator
- [Express](https://expressjs.com/pt-br/)
- Supertest
- [Husky](https://typicode.github.io/husky/#/)
- Lint Staged
- [Eslint](https://eslint.org/)
- [Standard Javascript Style](https://standardjs.com/)
- [Nodemon](https://nodemon.io/)
- Rimraf
- In-Memory MongoDb Server
- MockDate
- Module-Alias
> ## Features taught:
- Git alias
- Log error
- Security (Hashing, Encryption e Encoding)
- CORS
- Middlewares
- Integration tests
- Unit tests
- Coverage of tests
- Test Doubles
- Mocks
- Stubs
- Spies
- Deploy with Typescript
- Deploy on Render
- Use breakpoints on Typescript
- Use correct tags on Git
- Fakes
> ## MongoDB's Features
- Connect e Reconnect
- Collections
- InsertOne e InserMany
- Find, FindOne e FindOneAndUpdate
- DeleteMany
- UpdateOne
- Aggregation (Match, Group, Unwind, Lookup, AddFields, Project, Sort)
- ObjectId
- Upsert e ReturnOriginal
- Push, Divide, Multiply, ArrayElemAt, Cond, Sum
- Filter, Map, Reduce, MergeObjects, ConcatArrays