DEV Community

Discussion on: Applying Domain-Driven Design principles to a Nest.js project

Collapse
 
bendix profile image
Harry

Hey Max. When we started this process we looked into interface injection but we came up short. For us to have any communication with our persistence layer we had to introduce the user repository dependency into the UserModule.

We decided that our domain layer would:

  1. Be free of all third-party code
  2. Would only accept the relevant domain model as a param or a return type from the persistence layer

We figured this was adequate for our needs.

Do let me know how you get on and if you are able to overcome this.