Skip to content

Manage Layers

Layers can be managed in the configuration file directly, but it’s recommended to use the web UI for that. This way no typo can be made and only a valid configuration will be saved. You can also see a visual preview of your architecture while configuring. Open the UI as follows:

tangle-guard ui

On the side navigation, click on layers.

Packaes to layers

The visual editor lets architects create new layers . architectural models on a canvas by adding elements like layers, packages, and arrows to define allowed dependencies.

Here’s a mockup showing a classic layered architecture — with two horizontal layers and one vertical layer for shared components.

Creating a layer

The new layer will appear in the list.

Once a layer is created, it is empty. Next, you’ll need to add packages to the layers. One the right, there is a list with all packages which are not associated with a layer yet. Click on on the package, and select the layer in which the packages belongs out of the dropdown list.

Within the same page, click on the New rule button. A modal appears where you can select from which to which layer a dependency is allowed. Rules for layers

You can view all the existing rules on the rules page.

Choose from a list of templates for common architectures like horizontal layered architecture or clean architecture. For each template, layers get created as well as rules.

You can edit the name of the layer just by changing the name of the input field.

Renaming a layer