angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
313 stars 56 forks source link

Help me decide: Notifications, Email they should be lib? domain? shared(dumb)? feature? #63

Closed jon9090 closed 2 years ago

jon9090 commented 3 years ago

Help me decide please.

Notification should be domain or dumb shared or just a lib or a feature? I need to load all notifications from the server and use setTimeout to trigger them. I can add notification/delete and show all the notifications. I have entities in the app such products and they can be add notification with there extra metadata.

Email should be domain or dumb shared or just a lib or a feature? most of my entities (such products, reports and so on) need sometimes to send a email. I can use within the products or other entity but if I use it more than once I think about to have it as a lib. the question is it should be domain or shared or lib or a feature belong to domain?

Thanks

manfredsteyer commented 2 years ago

There is always a gray zone. IMHO, in your case, both could be a combination domain + feature.