I'm having trouble understanding from this post how you've kept database dependencies out of the Domain layer. If UserEntity is in the Domain layer, and extends the Mongo Document type, doesn't that bring an external dependency on Mongo into the Domain?
Would love to browse a repository to take a look at how this is set up in full, I'm working on a project now where we're trying to do something very similar following DDD in NestJS.
I'm having trouble understanding from this post how you've kept database dependencies out of the Domain layer. If UserEntity is in the Domain layer, and extends the Mongo Document type, doesn't that bring an external dependency on Mongo into the Domain?
Would love to browse a repository to take a look at how this is set up in full, I'm working on a project now where we're trying to do something very similar following DDD in NestJS.
Apologies, still getting used to this blogging malarkey! I have some spare time tomorrow will get something up for you to look at, Max.