damienbeaufils / nestjs-clean-architecture-demo

An example of clean architecture implementation with NestJS
190 stars 27 forks source link

nestjs-clean-architecture-demo

Build Status

An example of clean architecture with NestJS

Foreword

This application is designed using a Clean Architecture pattern (also known as Hexagonal Architecture). Therefore SOLID principles are used in code, especially the Dependency Inversion Principle (do not mix up with the classic dependency injection in NestJS for example).

Concretely, there are 3 main packages: domain, use_cases and infrastructure. These packages have to respect these rules:

Install

npm install

Test

npm test

Run

npm run typeorm:migration:run
npm run start:dev