nodeslate

Diagram source

Formats and diagram types

How Nodeslate reads the source you send: Mermaid, SQL or plain lines, for each of the seven diagram types. Layout, colours and icons are automatic.

Send only structure and words; Nodeslate lays the diagram out. Keep box text short. Set type whenever you know it: with lines, auto draws a flowchart.

Which format

  • mermaid: flowchart/graph, mindmap, erDiagram, sequenceDiagram, journey. Best for flowcharts with several branches.
  • sql: CREATE TABLE statements (Postgres, MySQL, SQLite, SQL Server) become an Entity Relationship diagram with keys and relationships.
  • lines: plain lines, the way people type in Nodeslate. The rules depend on the type, below.

Mermaid

  • Shapes: A[Step], A(Rounded), A([Start]), A{Paid?} decision, A[(Orders)] database, A[/Upload/] input or output, A[[Billing run]] sub-process, A{{Prepare}}, A((Merge)), and Mermaid 11's A@{ shape: doc, label: "Invoice" }.
  • Links: A --> B, A -->|Yes| B or A -- Yes --> B, dashed A -.-> B, both ways A <--> B, fan out A --> B & C. Label every way out of a decision.
  • subgraph Billing … end makes a group; groups can nest.
  • Styling (classDef, style, click) and comments are ignored. With type architecture, a flowchart becomes an architecture diagram.
flowchart TD
  A([Cart]) --> B{Paid?}
  B -->|Yes| C[Order placed]
  B -->|No| D[Retry payment]
  C --> E[(Orders)]

Lines, by type

Flowchart

Two styles; one -> anywhere switches the whole source to the arrow style.

  • Typed (no arrows): the first line is the start, each line follows the one before. A line ending in ? or starting with If is a decision; plain lines after it go down its Yes path. No: Retry payment adds one step on the No path of the nearest decision and doesn't move you. If payment fails, show an error makes “Payment OK?” with the error on No. Start, End, note: text, and shapes db:, doc:, ip: (input), op: (output), circle:, queue:, cache:, external:.
  • Arrows: A -> B: label links boxes by name. Write each way out of a decision as its own arrow: Paid? -> Retry payment: No. Use Mermaid when you need shapes and many branches.
Checkout
Paid?
Order placed
No: Retry payment
Ship order
End

Architecture

  • Web app -> API: calls adds both boxes and a labelled line; API -> Orders, Billing: create order draws one to each; --> is dashed, <-> two-way.
  • Kinds before a name: db:, queue:, cache:, external:, doc:, service:. In API -> db: Orders, “Orders” is the database's name, not the label.
  • group: Billing: Invoices, Payments puts boxes in a group. End a line with #checkout to tag it as part of a named flow.
  • Icons are automatic: name boxes after the real service (SQS, S3, Lambda, Postgres, Redis, Stripe). AWS service names get AWS's own icons; others get a matching plain icon.
Web app -> API: REST
API -> db: Orders
API --> queue: Jobs
API -> external: Stripe
group: Payments: API, Stripe

Entity Relationship

Prefer sql or Mermaid erDiagram. In lines, start every table with table: table users: id pk, email text unique, org_id -> orgs.id, or table users then one column per line. Flags: pk, unique, null, fk. Relationships: orders > users many-to-one, <, 1-1, 1-n, n-1, <> many-to-many, with : label.

Org chart, mind map and journey

An indented outline, two spaces per level; the first line is the top. Org chart lines are Name, title. A journey has stages, then steps ending in : 1 to : 5 for how they feel.

Ordering groceries
  Order
    Fill the basket: 4
    Pay at checkout: 2
  Receive
    Unpack the bag: 5

Sequence

One message per line, in order: App -> Auth: Sign in; a reply is Auth --> App: Token. A line with only a name adds that participant, so list them first to fix their order.

Stuck, or missing something? Contact us.