Skip to content

mikemajesty/nestjs-monorepo-v2

Repository files navigation

Nestjs boilerplate Monorepo API

node version

In this monorepo I used the best architecture concepts: Onion Architecture, DDD and Ports and Adapters.

Statements Branches Functions Lines
Statements Branches Functions Lines

Building and Running the application

  • install dependencies
    yarn install:dev
    
  • up infra
    yarn infra
    
  • run migrations
    yarn migration:run
    

Apps running

  • auth

    yarn start:auth
    
  • user

    yarn start:user
    
  • cat

    yarn start:cat
    

Postgres migrations

  • create

    $ yarn migration-postgres:create
    
  • run

    $ yarn migration-postgres:run
    

Mongo migrations

  • create

    $ yarn migration-mongo:create
    
  • run

    $ yarn migration-mongo:run
    

Test

  • run
    $ yarn test
    
  • coverage
    $ yarn test:cov
    

Lint

  • lint
    $ yarn lint
    
  • prettier
    $ yarn prettier
    

snippets

usecase
apitest
docs

Architecture diagram

alt text

Architecture documentation

User diagram

alt text

Microservice architecture.

  • I18n
  • Docker
  • Observability
    • tracing
    • logs
    • metrics
  • Lint-staged + Husky
  • Commitlint
  • Secrets Service
  • HTTP Service
  • Logger Service
    • mongodb transport
  • Authentication
    • Login
    • Logout
    • Forgot Password
    • Refresh Token
  • Authorization
    • Role-based access
    • Endpoint Permissions
  • Error Handler
  • Libs Structure
  • Dependency Inversion Pattern
  • Usecase Pattern
  • Interface Adapter Pattern
  • Generic Repository Pattern
    • Mongo Repository (mongoose)
    • Postgres Repository (TypeORM)
  • Swagger Documentation
  • Cache Service
    • Redis
    • NodeCache
  • Database
    • mongo
      • Migrations
    • postgres
      • Migrations
  • Tests
    • unit
    • 100% coverage

The following is a list of all the people that have contributed Nestjs monorepo boilerplate. Thanks for your contributions!

mikemajesty

License

It is available under the MIT license. License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published