Some time ago I read a brilliant article, “Tactical Domain-Driven Design with Angular and Monorepos?” by Manfred Steyer. I was delighted with the content I found there, and as a big fan, I would like to translate this knowledge to NestJS ground.
Despite Angular and Nest being comparable frameworks, the environments they run on are very different. This article addresses this difference by explaining how to apply the aforementioned concepts in a server-side setting.
In the NestJS documentation, we can find the following sentence:
“Nest provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications.”
Let’s test this statement by checking if Nest allows us to easily follow one of the SOLID principles: the Dependency Inversion Principle.
Nest is highly inspired by Angular, so all recipes in this article work in Angular as well.
For a quick reminder, the principle states: