I'm trying to rewrite monolith app onto a modular monolith using DDD and hexagonal architecture. Tried to extract three modules (aggregates) at first: "Shared", "User" and "Article".
As I understood it correctly, no dependency should be created between "User" and "Article". However, both of them can use stuff from the "Shared" module.
So here's the thing...
The "Article" module have Article entity which is in relation to the User entity. It's the creator of a particular article, from a DDD perspective. There will be even more modules like that having relation to the User entity as being an author or an owner of a resource.
How should it be implemented? Should it be moved to the "Shared"? Unfortunately, couldn't find any particular resource. Github mostly contains projects with a single aggregate and without such things as User entity.
I have been seeing different ways to solving these kind of problems. You can create a Shared aggregate, no one can say it is wrong. But, I consider the best solution is you create a Person (or People) aggregate where you can have an PersonEntity (or AuthorEntity) that is related to ArticleEntity, no problem have relations between Aggregates but I suggest you try to create relations only between aggregate roots.
It's the Eric Evans blue book's sample
Note that Voyage is a AggregateRoot from the Aggregate Voyage and it have a relation with the AggregateRoot Location of the Location aggregate.