/clean-api-ts

API in Node.js using TDD, Clean Architecture, Design Patterns and SOLID principles.

Primary LanguageTypeScript

Build Status Coverage Status Known Vulnerabilities js-standard-style GPLv3 License Open Source

Clean Node API

Clique aqui para ver a versão em Português.

This API is part of Professor Rodrigo Manguinho's (Mango) training course on Udemy.

An API with a well-defined and decoupled architecture, using TDD (Test-Driven Development) as a working methodology, Clean Architecture to distribute responsibilities into layers, always following SOLID principles, and applying Design Patterns whenever possible to solve common problems.

APIs built in the training

Sign Up

Principles

  • 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)
  • 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
  • Apollo Server Express
  • GraphQL
  • GraphQL ISO Date
  • 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
  • Error Logging
  • Security (Hashing, Encryption, and Encoding)
  • Middlewares

Testing Features

  • Unit Tests
  • Integration Tests (REST API & GraphQL)
  • Test Coverage
  • Test Doubles
  • Mocks
  • Stubs
  • Spies
  • Fakes