DEV Community

Discussion on: Semantic Grouping Folders with Nx

Collapse
 
srleecode profile image
srleecode

we have expanded the scope dimension in two, application and bounded context (bc).

Wouldn't this lead to issues as your bounded context tag is not unique. Let's say your project has two banking related applications. One for advisers and one for users. Both these applications could have their own bounded context called cash-account. How would you use the application and bounded context tags to add a dependency to only the cash-account bounded context in a specific application.

Collapse
 
naxodev profile image
Nacho Vazquez

Bounded Context tags are there to help you enforce restrictions over the horizontal and vertical layers. In a scenario like the one described by you, the solution could be simple as making a differentiation between the tags for the cash-account bc.

You could for example prefix the application. Although that doesn't mean that you won't also add the application tag.

Unfortunately, Nx tags at this moment don't allow for more complex validations but you can add some flexibility to your tags when (rare) situations like this occur.