angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
308 stars 55 forks source link

Accessing library api from another library domain #113

Open Vevl opened 1 year ago

Vevl commented 1 year ago

Hello @manfredsteyer, at first thanks!! it was a big pleasure for me to study your materials.

Maybe I didn't understand it well but when I'm using default boundaries from the init generator there is a restriction that only type APP can access type API.

image

How then it should be possible to access API of one domain in another as mentioned in next img --

image

I can't find any information about this specific part of DDD.

Thanks.

PopePAF commented 1 year ago

I just found some Info about this here

So note that: "Access to APIs such as catalog-api must be explicitly granted to individual domains." and: "In addition, this example also shows the domain Ordering which, according to the context mapping, has access to the CatalogApi. For this, the example uses a name prefix to make sure that only selected libraries are allowed to access the api."

see: { "sourceTag": "name:ordering-feature", "onlyDependOnLibsWithTags": ["name:catalog-api"] }