kgrzybek / modular-monolith-with-ddd

Full Modular Monolith application with Domain-Driven Design approach.
MIT License
10.82k stars 1.7k forks source link

Why does the Member Aggregate in the Meetings module need the login information? #310

Open bonjonrumi opened 6 months ago

bonjonrumi commented 6 months ago

I am wondering why it needs to have this information since it is nowhere used? Isn't it enough to have it in the Users Module whose responsibility it is to have this information and do things like authenticating etc.?

Elie-A-98 commented 3 months ago

In domain analysis, multiple domains can define their own model for the same real-world entity. This is to better achieve encapsulation and separation of concern. So the UserAccess module has a User model which contains the things releveant within the UserAccess bounded context, and some other modul might also define a User model which has the properties relevant to it's bounded context.

Reference: https://learn.microsoft.com/en-us/azure/architecture/microservices/model/domain-analysis

image

bonjonrumi commented 3 months ago

Yes but the data is not used in the meetings module. That module is not doing any kind of authentication or uses the login info in any form.