Skip to content

The goal of this repository is to create an API with a well-defined and decoupled architecture

Notifications You must be signed in to change notification settings

matheusguermandi/clean-ts-api

Repository files navigation

Node JS - API

The goal of this repository is 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.

Use cases

  1. SingUp
  2. Login
  3. Add survey
  4. Load survey
  5. Answer survey
  6. Load survey 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

  • Clean Architecture
  • DDD (Domain driven design)
  • TDD (Test driven development)
  • 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
  • Supertest
  • Husky
  • Lint Staged
  • Eslint
  • Standard Javascript Style
  • Sucrase
  • Nodemon
  • Rimraf
  • In-Memory MongoDb Server
  • MockDate
  • Module-Alias
  • Copyfiles
  • Npm Check
  • Bson ObjectId

Node features

  • Swagger documentation
  • API Rest using Express
  • GraphQL using Apollo Server
  • Error logging
  • Security (Hashing, Encryption e Encoding)
  • CORS
  • Middlewares
  • Authorization levels (Admin, User e Anonymous)
  • Deploy no Heroku
  • Serve Static Files

GraphQL features

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

Git features

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

Typescript features

  • Object Oriented Programming
  • Interface
  • TypeAlias
  • Namespace
  • Utility Types
  • Paths Modularization
  • Build
  • Deploy

Test features

  • Unit tests
  • Integration tests
  • Test Doubles
  • Mocks
  • Stubs
  • Spies
  • Fakes

MongoDb features

  • Connect e Reconnect
  • Collections
  • InsertOne e InsertMany
  • 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

About

The goal of this repository is to create an API with a well-defined and decoupled architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published