Skip to content
🤷

Forgive us! These docs are a work in progress. Some pages may be incomplete or describe features that aren't quite finished yet. Farkitect is in early development and we don't recommend using it for real work just yet. Feel free to explore — just be aware that things are still being built.

Diagram Model Reference

A diagram is a visual view of model elements.

FieldTypeDescription
nameStringDisplay name
descriptionStringOptional description
parentIdReferenceParent element (for child diagrams) or parent package
projectIdReferenceProject scope
notationPackageIdReferenceThe M2 metamodel providing notation
viewportObjectPan and zoom state
showStereotypesBooleanWhether stereotypes are visible
auditObjectTimestamps
FieldTypeDescription
panXNumberHorizontal pan offset
panYNumberVertical pan offset
zoomNumberZoom level (1.0 = 100%)

A visual representation of an element on a diagram.

FieldTypeDescription
diagramIdReferenceThe diagram this node belongs to
elementIdReferenceThe model element being displayed
xNumberHorizontal position (pixels)
yNumberVertical position (pixels)
widthNumberNode width (pixels)
heightNumberNode height (pixels)

When a node is nested inside a parent node, its position is relative to the parent. The parent auto-resizes to contain all children.

Nodes can carry per-diagram formatting overrides (fill colour, border colour, border width) that take precedence over the M2 notation defaults.

A visual representation of a relationship on a diagram.

FieldTypeDescription
diagramIdReferenceThe diagram this edge belongs to
sourceNodeIdReferenceThe source DiagramNode
targetNodeIdReferenceThe target DiagramNode
relationshipIdReferenceThe model relationship (optional for unlabeled edges)
labelStringOptional display label
waypointsArrayManual bend points

Waypoints are manually placed bend points that control edge routing.

FieldTypeDescription
xNumberHorizontal position
yNumberVertical position

Waypoints are stored as an ordered array. The edge routes from the source node through each waypoint in order to the target node.

  • Creation — diagrams are created in a package or as a child of an element
  • Editing — node positions, edge waypoints, and formatting are modified on the Canvas
  • Save — explicit save (Ctrl+S) persists layout changes. Model changes (element creation, property edits) are saved automatically.
  • Undo/Redo — layout changes within a diagram can be undone and redone until saved