Walkthrough

Lets say we're designing a snazzy new home audio system. We might start off by picturing it in the home, and the systems it might talk to:

arch 0xc000207c50 app 0xc000207230 sound-system 0xc000207c50->0xc000207230 control 0xc000207200 user 0xc000207230->0xc000207200 sound 0xc000207200->0xc000207c50 0xc000207200->0xc000207230 press

Happy in the knowledge that we know what our system will talk to, we open it up and define the innards:

arch cluster_0xc00038b2c0 sound-system 0xc00038bc80 app 0xc00038b710 amplifier 0xc00038bc80->0xc00038b710 control 0xc00038b380 speaker 0xc00038b710->0xc00038b380 0xc00038b290 user 0xc00038b380->0xc00038b290 sound 0xc00038b290->0xc00038b710 press

Now what's going on in that amplifier?

arch cluster_0xc000370030 sound-system cluster_0xc000370480 amplifier 0xc0003709f0 app 0xc000370540 electronic bluetooth receiver 0xc0003709f0->0xc000370540 control 0xc0003705a0 electronic ac-dc converter 0xc000370660 electronic amplifier 0xc0003705a0->0xc000370660 0xc0003705a0->0xc000370540 0xc0003704e0 electronic connector 0xc000370660->0xc0003704e0 0xc000370540->0xc000370660 0xc0003700f0 speaker 0xc0003704e0->0xc0003700f0 0xc000370600 electronic mixer 0xc000370600->0xc000370660 0xc0003706c0 electronic mechanical power button 0xc0003706c0->0xc0003705a0 0xc000370000 user 0xc000370000->0xc0003706c0 press

Notice how there is no connection between 'speaker' and 'user'? The amplifier doesn't care about that, it just cares about its inputs and outputs, so that is removed from the diagram. Don't try to say too much!

All of those diagrams, and more, are enabled by the existence of a single model file:

config:
  writer: graphviz
model:
  elements:
    - name: user
      kind: actor
    - name: sound-system
      children:
        - name: speaker
          children:
            - name: enclosure
              tags: [mechanical]
            - name: driver
              tags: [electronic, mechanical]
            - connector
            - cable
          associations:
            - source: cable
              destination: connector
            - source: connector
              destination: driver
            - source: driver
              destination: enclosure
        - name: amplifier
          children:
            - name: connector
              tags: [electronic]
            - name: bluetooth receiver
              tags: [electronic]
            - name: ac-dc converter
              tags: [electronic]
            - name: mixer
              tags: [electronic]
            - name: amplifier
              tags: [electronic]
            - name: power button
              tags: [electronic, mechanical]
          associations:
            - source: bluetooth receiver
              destination: amplifier
            - source: ac-dc converter
              destination: bluetooth receiver
            - source: mixer
              destination: amplifier
            - source: ac-dc converter
              destination: amplifier
            - source: amplifier
              destination: connector
            - source: power button
              destination: ac-dc converter
      associations:
        - source: amplifier/connector
          destination: speaker/cable
    - name: app
      children:
      - bluetooth driver
      - spotify client
      - ui
      associations:
      - source: ui
        destination: spotify client
      - source: spotify client
        destination: bluetooth driver
  associations:
    # Sound system
    - source: sound-system/speaker/driver
      destination: user
      tags: [sound]
    - source: user
      destination: sound-system/amplifier/power button
      tags: [press]
    # App
    - source: user
      destination: app/ui
    - source: app/bluetooth driver
      destination: sound-system/amplifier/bluetooth receiver
      tags: [control]
Installation