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.

Element Types Reference

All model content in Farkitect is stored as elements with a discriminated kind field. This page describes each element kind.

A container for organising other elements, diagrams, and catalogs.

FieldTypeRequiredDescription
nameStringYesDisplay name
layer”M3” / “M2” / “M1”YesMOF layer
packageKind”standard” / “common”NoPackage classification
isReadOnlyBooleanNoPrevents modification
importsString[]NoNames of imported M2 packages

Package roles (M2 only): elementTypes, elementTypeLayer, relationshipTypes, enumerations, views

The primary element kind — used for both M2 type definitions and M1 instances.

FieldTypeRequiredDescription
nameStringYesDisplay name
layer”M3” / “M2” / “M1”YesMOF layer
classifierIdReferenceM1 onlyPoints to the M2 element type
isAbstractBooleanNoM2 only — hides from Palette
superclassesReference[]NoM2 only — generalization
notationObjectM2 onlyVisual appearance definition
paletteObjectM2 onlyPalette entry configuration

At M2, a Class defines an element type with notation, properties, and constraints. At M1, a Class is an instance of an M2 type.

A typed field definition owned by a Class (at M2 level).

FieldTypeRequiredDescription
nameStringYesProperty name
propertyTypeStringYesData type — primitive name or enumeration $id
multiplicity[min, max]Yes[0,1] = optional, [1,1] = required
defaultValueStringNoDefault value for new instances
formatStringNoFormat hint: “multiline”, “url”, “email”

A primitive data type definition (at M3 level).

FieldTypeRequiredDescription
nameStringYesType name (String, Integer, etc.)
primitiveKindStringYesThe primitive kind identifier

A type with a fixed set of named literal values.

FieldTypeRequiredDescription
nameStringYesEnumeration name
literalsArrayYesList of {name, value} pairs

A directed connection between two elements.

FieldTypeRequiredDescription
nameStringYesDisplay name / label
sourceIdReferenceYesSource element
targetIdReferenceYesTarget element
classifierIdReferenceM1 onlyPoints to M2 relationship type

At M2, a Relationship with kind.type = "Relationship" defines a relationship type. At M1, relationships are instances classified by M2 types.

FieldTypeDescription
nameStringDisplay name
layer”M3” / “M2” / “M1”MOF layer
packageIdReferenceParent package
ownerIdReferenceOwner element (for owned/subordinate elements)
projectIdReferenceProject scope (undefined for system M2/M3)
audit{createdAt, updatedAt}Timestamps