https://github.com/unitvectory-labs/yamltecture
Lightweight CLI tool for generating outputs, including Mermaid diagrams, from YAML-defined system architectures.
https://github.com/unitvectory-labs/yamltecture
architecture diagram
Last synced: 21 days ago
JSON representation
Lightweight CLI tool for generating outputs, including Mermaid diagrams, from YAML-defined system architectures.
- Host: GitHub
- URL: https://github.com/unitvectory-labs/yamltecture
- Owner: UnitVectorY-Labs
- License: mit
- Created: 2024-12-12T01:58:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-02T21:52:06.000Z (about 1 year ago)
- Last Synced: 2025-04-02T22:29:52.188Z (about 1 year ago)
- Topics: architecture, diagram
- Language: Go
- Homepage: https://yamltecture.unitvectorylabs.com/
- Size: 190 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/UnitVectorY-Labs/YAMLtecture/releases/latest) [](https://opensource.org/licenses/MIT) [](https://guide.unitvectorylabs.com/bestpractices/status/#active) [](https://codecov.io/gh/UnitVectorY-Labs/YAMLtecture) [](https://goreportcard.com/report/github.com/UnitVectorY-Labs/YAMLtecture)
# YAMLtecture
A lightweight CLI tool for generating outputs, including Mermaid diagrams, from YAML-defined system architectures.
## Overview
YAMLtecture is an open-source CLI tool designed for application architects who need a simple yet powerful way to define and visualize system architectures. Using modular YAML files, YAMLtecture helps you map out components, hierarchies, and interactions while keeping everything easy to manage in version control. It allows you to define a comprehensive system configuration and then use queries to extract specific subsets for various use cases. With YAMLtecture, you can transform YAML definitions into diagrams (including Mermaid), keeping your architecture clear, version-controlled, and up to date.
## Releases
All official versions of **YAMLtecture** are published on [GitHub Releases](https://github.com/UnitVectorY-Labs/YAMLtecture/releases). Since this application is written in Go, each release provides pre-compiled executables for macOS, Linux, and Windows—ready to download and run.
Alternatively, if you have Go installed, you can install **YAMLtecture** directly from source using the following command:
```bash
go install github.com/UnitVectorY-Labs/YAMLtecture@latest
```
## Configuration
At the core of YAMLtecture are YAML configuration files that define your system architecture. These files are split into two main sections: nodes and links. The nodes section describes the individual components of your system, while the links section defines how those components interact.
```yaml
nodes:
- id: cluster
type: Infrastructure
attributes:
name: "Container Hosting"
- id: service_foo
type: Microservice
parent: cluster
attributes:
name: "Foo Service"
language: "Java"
- id: service_bar
type: Microservice
parent: cluster
attributes:
name: "Bar Service"
language: "Go"
links:
- source: service_foo
target: service_bar
type: "API"
attributes:
payload: "example"
```
The key concept here is that each node has a unique `id`. The `type` field is flexible and can be set to whatever suits your architecture—common examples include Microservice, Database, Queue, etc. The `parent` field is optional and defines hierarchical links between nodes. These links are validated to form an acyclic tree, but not every node needs to be part of the same hierarchy.
The `attributes` field is a dictionary of key-value pairs that can store additional metadata about a node, useful for filtering and querying.
Links tie nodes together with the `source` and `target` fields. Each link is one-way, so for a bidirectional connection, you’ll need to define two separate links. Like nodes, links have a `type` field to classify the interaction (e.g., API, MessageQueue), and `attributes` can store metadata about the link, such as protocols, payloads, or endpoints.