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.
Define a new layer
Section titled “Define a new layer”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.
The new layer will appear in the list.
Add packages to a layer
Section titled “Add packages to a layer”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.
Define dependency rules between layers
Section titled “Define dependency rules between layers”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.
You can view all the existing rules on the rules page.
Use Templates
Section titled “Use Templates”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.
Rename a layer
Section titled “Rename a layer”You can edit the name of the layer just by changing the name of the input field.