Specification
In the specification, you define your notation.
Element kind
Section titled “Element kind”Defines element kinds that are used in the model:
specification { // Define whatever you want element user element cloud element system element application element component element controller element microservice element queue element restapi element graphqlMutation element repository element database element pgTable}You’ll learn later that element kinds may have properties and define styles:
specification { element queue { title 'Kafka' description 'Kafka queue' technology 'kafka topic' notation 'Kafka Topic' style { shape queue } }}Relationship
Section titled “Relationship”Relationship kinds may define tags, properties (title, description, technology, notation, links) and visual styles:
specification { relationship async { #tcp title 'Asynchronous' description 'Communication over a message broker' technology 'Kafka' notation 'Async' link https://example.com/async multiple true line dotted color amber } relationship subscribes relationship is-downstream-of
tag tcp}These properties are inherited by every relationship of that kind, unless the relationship overrides them (tags are merged):
model { // inherits the title and style defined for the 'async' kind ui .async backend
// overrides the title, keeps the inherited style ui .async db 'reads from'}More in the relationships
Tags can be used to mark, group, or filter elements/relationships/views, or to add additional semantics, like #deprecated, #epic-123, or #team2.
specification { tag deprecated tag epic-123 tag team2}You can assign colors:
specification { tag deprecated { color #FF0000 // or `rgb(255 0 0)` see below }}You can add tags to element kinds:
specification { // Now every kafka-topic will be marked with the infra and data-lake tags element kafka-topic { #infra #data-lake } tag infra tag data-lake}Custom colors can be defined to extend built-in themes. Once defined in the specification, they can be used alongside the theme colors.
specification { color custom-color1 #F00 color custom-color2 #AABBCC color custom-color3 rgb(255, 0, 0) color custom-color4 rgb(100 150 200) color custom-color5 rgba(44, 8, 128, 0.9) color custom-color6 rgba(255, 200, 100, 50%)
element person { style { color custom-color1 } }}