Eraser is a documentation and diagram platform for engineering teams. It uses a unique notation to create visually expressive documents. This guide explains Eraser's notation in detail and demonstrates how to use it with various examples.
Eraser's notation uses a concise syntax similar to YAML. The basic syntax is written as follows:
// Node definition
NodeName [Attributes] {
// Subnode definition
SubNodeName [Attributes]
}
// Relationship definition
Node1 > Node2: [Label]
Explanation:
//
indicates a comment.NodeName
is the name of the element (node) in the diagram.Attributes
specify the shape, color, icon, text, etc., of the node.SubNodeName
is the name of an element nested within a node.Node1 > Node2
indicates a relationship from Node1 to Node2.[Label]
is an optional label to add a description to the relationship.
Nodes represent elements of the diagram. In a node definition, you specify the NodeName
, Attributes
, and Subnodes
.
Node attributes are specified within []
. The following attributes can be used:
shape
: Specifies the shape of the node.oval
: Ovalrectangle
: Rectanglediamond
: Diamondrounded_rectangle
: Rounded Rectanglecylinder
: Cylinderhexagon
: Hexagontriangle
: Triangleparallelogram
: Parallelogramcloud
: Cloudstar
: Stardatabase
: Database
icon
: Specifies the icon displayed on the node.file-text
: Filebug
: Bugcopy
: Copyrepeat
: Repeatzap
: Lightningcheck-square
: Checkboxpackage
: Packagesend
: Senduser
: Userusers
: Multiple Usershome
: Homefolder
: Foldermessage-circle
: Messagemail
: Mailclock
: Clocklist
: Listkey
: Keygrid
: Gridlink
: Linkcalendar
: Calendaroracle
: Oracletwitter
: Twitterfacebook
: Facebookaws-api-gateway
: AWS API Gatewayaws-lambda
: AWS Lambdaaws-simple-storage-service
: AWS S3aws-ec2
: AWS EC2aws-rds
: AWS RDSaws-auto-scaling
: AWS Auto Scalingaws-redshift
: AWS Redshiftkafka
: Kafkagcp-pubsub
: GCP Pub/Subgcp-cloud-logging
: GCP Cloud Logginggcp-dataflow
: GCP Dataflowgcp-cloud-storage
: GCP Cloud Storagegcp-datastore
: GCP Datastoregcp-bigtable
: GCP Bigtablegcp-bigquery
: GCP BigQuerygcp-app-engine
: GCP App Enginegcp-container-registry
: GCP Container Registrygcp-compute-engine
: GCP Compute Engineazure-active-directory
: Azure Active Directoryazure-load-balancers
: Azure Load Balancersazure-virtual-networks
: Azure Virtual Networksazure-network-security-groups
: Azure Network Security Groupsazure-virtual-machine
: Azure Virtual Machinek8s-control-plane
: Kubernetes Control Planek8s-api
: Kubernetes APIk8s-sched
: Kubernetes Schedulerk8s-c-c-m
: Kubernetes Controller Managerk8s-c-m
: Kubernetes Cloud Controller Managerk8s-etcd
: Kubernetes etcdk8s-node
: Kubernetes Nodek8s-kubelet
: Kubernetes Kubeletk8s-k-proxy
: Kubernetes KProxydatabricks
: Databrickssnowflake
: Snowflakeslack
: Slacktensorflow
: TensorFlowtableau
: Tableaulayout
: Web Appdatabase
: Databasefunction
: Cloud Functioncloud-cog
: Cloud Settingssettings
: Settingsaws
: AWSgoogle-cloud
: Google Cloudazure
: Azuregoogle
: Googlemicrosoft
: Microsoft
color
: Specifies the color of the node.red
: Redgreen
: Greenblue
: Blueyellow
: Yellowpurple
: Purpleorange
: Orangegrey
: Greysilver
: Silver
text
: Specifies the text displayed on the node.style
: Specifies the style of the node.dashed
: Dasheddotted
: Dottedbold
: Bolditalic
: Italic
Subnodes represent elements nested within a node. The syntax to define subnodes is similar to that of nodes.
# Node definition
NodeName [Attributes] {
# Subnode definition
SubNodeName [Attributes]
}
Subnodes can be nested across multiple levels.
Groups are a feature used to cluster related nodes together. Groups are defined within {}
. Nodes within a group can specify color with the [color]
attribute.
# Group definition
GroupName [color] {
# Node definition within group
NodeName [Attributes]
}
Relationships represent connections between nodes. The definition of a relationship uses the syntax Node1 > Node2
.
Labels for relationships are specified after :
. They are used to add descriptions or annotations to the relationship.
# Relationship definition
Node1 > Node2: [Label]
In Eraser, the following types of relationships can be used:
>
: Directed relationship (from Node1 to Node2)<
: Directed relationship (from Node2 to Node1)<>
: Bidirectional relationship (between Node1 and Node2)
# Nodes and Groups
Issue type? [shape: oval, icon: file-text]
BugPath [color: red] {
Bug [icon: bug, color: red]
Duplicate? [shape: diamond, icon: copy]
Mark duplicate [shape: oval, icon: copy]
Has repro? [shape: diamond, icon: repeat]
Ask for repro [shape: oval, icon: repeat]
}
FeaturePath [color: green] {
Feature [icon: zap, color: green]
Well specced? [shape: diamond, icon: check-square]
Can be package? [shape: diamond, icon: package]
Define as package [shape: oval, icon: package]
}
Issue ready to claim [shape: oval, icon: send]
# Relationships
Issue type? > Bug
Bug > Duplicate?
Duplicate? > Mark duplicate: Yes
Duplicate? > Has repro?: No
Has repro? > Issue ready to claim: Yes
Has repro? > Ask for repro: No
Issue type? > Feature
Feature > Can be package?
Can be package? > Well specced?: No
Can be package? > Define as package: Yes
Well specced? > Issue ready to claim: Yes
# Define nodes and relationships "A > B"
Start [shape: oval, icon: flag] > Read keywords from Excel [icon: excel]
Read keywords from Excel > Establish Amazon API connection [icon: amazon]
Establish Amazon API connection > Wait for user input [shape: diamond, icon: user]
Wait for user input > Search for keyword on Amazon[icon: search]: User selects keyword
Search for keyword on Amazon > Retrieve item price [icon: dollar-sign]
Retrieve item price > Output result to Excel [icon: excel]
Output result to Excel > End
Wait for user input > Close modal [icon: x]: User clicks cancel
Close modal > End [shape: oval, icon: check]
# Define group
For each keyword in the list [icon: repeat] {
Search for keyword on Amazon
Retrieve item price
Output result to Excel
}
Eraser's notation is designed to create documents that are visually expressive. Its simple syntax, rich attributes, and various types of relationships allow for the easy creation of diverse diagrams. Use this guide to effectively utilize Eraser's notation to create more effective documents.