Skip to content

Latest commit

 

History

History
176 lines (149 loc) · 3.26 KB

File metadata and controls

176 lines (149 loc) · 3.26 KB

Clean Node API

clean

This API is part of the training of professor Rodrigo Manguinho (Mango) at Udemy.

The objective of the training is to show how to create an API with a well-defined and decoupled architecture, using TDD (test-oriented programming) as a working methodology, Clean Architecture to distribute responsibilities in layers, always following the principles of SOLID and, whenever possible, applying Design Patterns to solve some common problems.

APIs built into training

  1. Register
  2. Login
  3. Create poll
  4. List poll
  5. Answer poll
  6. Poll result

Principles

  • Single Responsibility Principle (SRP)
  • Open Closed Principle (OCP)
  • Liskov Substitution Principle (LSP)
  • Interface Segregation Principle (ISP)
  • Dependency Inversion Principle (DIP)
  • Separation of Concerns (SOC)
  • Don't Repeat Yourself (DRY)
  • You Aren't Gonna Need It (YAGNI)
  • Keep It Simple, Silly (KISS)
  • Composition Over Inheritance
  • Small Commits

Design Patterns

  • Factory
  • Adapter
  • Composite
  • Decorator
  • Proxy
  • Dependency Injection
  • Abstract Server
  • Composition Root
  • Builder
  • Singleton

Methodologies and Designs

  • TDD
  • Clean Architecture
  • DDD
  • Conventional Commits
  • GitFlow
  • Modular Design
  • Dependency Diagrams
  • Use Cases
  • Continuous Integration
  • Continuous Delivery
  • Continuous Deployment

Libraries and Tools

  • NPM
  • Typescript
  • Git
  • Docker
  • Jest
  • MongoDb
  • Travis CI
  • Swagger
  • Bcrypt
  • JsonWebToken
  • Faker
  • Coveralls
  • Validator
  • Express
  • Apollo Server Express
  • Graphql
  • Graphql ISO Date
  • Graphql Scalars
  • Graphql Tools
  • Supertest
  • Husky
  • Lint Staged
  • Eslint
  • Standard Javascript Style
  • Sucrase
  • Nodemon
  • Rimraf
  • In-Memory MongoDb Server
  • MockDate
  • Module-Alias
  • Copyfiles
  • Npm Check
  • Bson ObjectId
  • Apollo Server Integration Testing

Node Features

  • API documentation with Swagger
  • Rest API with Express
  • GraphQL with Apollo Server
  • Error Log
  • Security (Hashing, Encryption and Anonymous)
  • CORS
  • Middlewares
  • Access Level on Routes (Admin, User and Anonymous)
  • Deploy on Heroku
  • Serving Static Files

GraphQL Features

  • Types
  • Queries
  • Mutations
  • Resolvers
  • Directives
  • Scalars
  • Plugins

Git Features

  • Alias
  • Custom Log
  • Branch
  • Reset
  • Amend
  • Tag
  • Stash
  • Rebase
  • Merge

Typescript Features

  • Advanced POO
  • Interface
  • TypeAlias
  • Namespace
  • Utility Types
  • Path Modularization
  • Configurations
  • Build
  • Deploy
  • Uso de Breakpoints

GraphQL Features

  • Resolvers
  • Type Definitions
  • Directives
  • Scalars
  • Plugins
  • Error Handling

Test Features

  • Unit tests
  • Integration tests (API Rest & GraphQL)
  • Test covers
  • Test Doubles
  • Mocks
  • Stubs
  • Spies
  • Fakes

MongoDB Features

  • Connect and 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