trustbit / Contexture

Wizard for the Bounded-Context-Canvas
MIT License
129 stars 12 forks source link

Add the option to limit nesting depth of Domain/Sub-domains #40

Open Nagelfar opened 3 years ago

Nagelfar commented 3 years ago

In the current version of Contexture it is possible to nest Domain/Sub-Domains without any restriction. But for a lot of systems it's enough to have domains and sub-domains as the only way to structure their bounded contexts.

To reduce complexity for the users either 1) limit the nesting depth to domains/sub-domains 2) introduce a configuration to limit nesting depth to a certain level (e.g. 2 levels - domains/sub-domain/sub-domain)

Option 1) will be easier to implement, document and maintain. But it could limit the usefulness of Contexture for some users.

indika-dev commented 3 months ago

Hi! :wave:

It looks like, that option 2 is implemented, but I can't change the default configuration. I think, limiting the nesting depth is a good idea, but the default value of 1 is quite low. Therefore, I tried to change it to 2, but the changed configuration value is not recognized by contexture.

Content of my env file:

VITE_CONTEXTURE_MAX_SUBDOMAINS_NESTING_LEVEL=2 VUE_CONTEXTURE_MAX_SUBDOMAINS_NESTING_LEVEL=2 CONTEXTURE_MAX_SUBDOMAINS_NESTING_LEVEL=2

(I made the different prefixes to be sure, that I'm not missing something)

K-Dud commented 2 months ago

Hi @indika-dev

I believe that variables defined in .env are build time dependencies used by vite. As it is right now you'd probably need to build docker image yourself.

Also note that this nesting limit is only implemented by the fronted pull/138 - it's not enforced by the backend in any way