Getting Started
TangleGuard is the place for you see all visualizations and where you can configure and document your architecture.
When opening TangleGuard for a specific codebase for the first time, it will create a configuration file. Add this file to your repository. It is supposed to be committed.
-
Define the Big Picture of your Codebase To be able to detect architecture erosion, TangleGuard needs to know about your target architecture. This can be done with the Desktop App - the so called Designer. The target architecture is stored in the configuration file within your repository. You have to define layer (group of components) and their allowed dependencies (rules).
-
Validate Then, Validate your Architecture regularly. TangleGuard traverses your source code and compares the actual dependencies against the allowed dependencies. Once a violation is found, you better fix it. Alternatively, you enforce the rules via your CI/CD pipeline and eliminate not-allowed dependencies from the beginning.
Configuration File
Section titled “Configuration File”All information and configurations associated to your architecture is stored in a file in the root of your project. If you run tangle-guard for the first time, it will create that file for you.
- src
- Cargo.toml
- tangleguard.json
The file is supposed to be included in Git. That way changes will be tracked over time and can be reviewed before merging like a normal code changes.
Below you see an example configuration.
{ "layers": [ { "name": "Interaction", "description": "", "packages": ["rest-api", "graphql-api"] } ], "packages": [ { "name": "rest-api", "dependencies": ["utils"], "focus": "technical" } ], "rules": [ { "from": "Interaction", "to": "Services" } ], "domains": [ { "name": "User Management", "dsl": ["OAuth", "Token", "Role"], "domain_type": "Generic" } ]}You can edit the file manually but it’s highly recommended to use the UI instead.