Skip to documentation content

Documentation · Structure

Architecture diagram

Place components roughly inside zones, then connect them. Generate aligns nearby rows and columns, spaces them apart and sizes the zones. Afterwards edit freely on the sheet.

When to use it

Map systems, services, stores and infrastructure regions, including custom component images.

Source coordinates suggest the first layout, not a fixed pin. Generate leaves routing space and grows zones; later manual moves stay where you put them.

Working example

Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.

Tingraph source
architecture "Recipe Search Platform" {
  zone APP "Recipe Search Platform" at 40 40 size 960 700
  zone SEARCH "Search & discovery" at 270 100 size 290 210
  zone DATA "Recipe management" at 620 100 size 310 320
  zone ACCOUNT "Accounts" at 270 480 size 290 190
  zone MEDIA "Media & files" at 620 480 size 310 190
  client USER "Mobile app" at 70 270
  service FIND "Search engine" at 330 170
  service RECIPE "Recipe service" at 690 160
  database CATALOG "Recipes" at 690 290
  service PROFILE "User profile" at 330 540
  storage FILES "Image storage" at 690 540
  USER -> FIND -> RECIPE -> CATALOG
  USER -> PROFILE
  PROFILE -> FILES
  RECIPE -> FILES
}

Syntax reference

The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.

Components

SyntaxMeaning
architecture "Title" {open an architecture diagram; close with }
zone REGION "Name"outlined region that grows to fit components centred inside it
client ID "Name"place a client component
service ID "Name"place a service component
database ID "Name"place a database component
storage ID "Name"place a storage component
queue ID "Name"place a queue component
cloud ID "Name"place a cloud component
external ID "Name"place a external component
at 120 200optional starting position; nearby nodes align when generated
size 300 180component size, or the minimum size of a zone

Connections

SyntaxMeaning
A -> Bdirected data flow; chain as A -> B -> C
A -.-> Bdashed event or async flow
A [request] -> Bcaption on a connection

Language rules

  • The file is one architecture "Title" { ... } block.
  • Declare components with unique IDs. Optional at x y and size width height may follow the label in either order. at suggests a starting row or column; Generate may move it to leave space.
  • Declare zones before their contents; they are independent outlined backdrops, not nested blocks. A component belongs to the smallest original zone containing its centre. With one zone, unplaced components belong to it too. The zone grows or, when unsized, fits its contents.
  • Declare all nodes before their connections. -> is a solid flow; -.-> is a dashed event.
  • Uploaded images belong to the saved sheet, not the source text.

Edit on the canvas

  • Select a component to change its type, name, image, position or size. Add and label flows through the architecture controls.
  • Move and resize zones independently; they are backdrops, not containers that drag their components.

Generate replaces the drawing from source. Save before generating again if you want to preserve manual finishing touches.

Read Saving & exporting

Write it with an assistant

Tingraph AI already knows this notation. For another assistant, copy the tutorial below, describe your diagram under MY DIAGRAM, then paste the returned source into the editor. This prompt includes every syntax row, rule and working example above.

Read the complete prompt
You are writing Tingraph source. Tingraph is a small text language that draws a software architecture diagram. Answer with Tingraph source only.

SYNTAX
Components
  architecture "Title" {      open an architecture diagram; close with }
  zone REGION "Name"          outlined region that grows to fit components centred inside it
  client ID "Name"            place a client component
  service ID "Name"           place a service component
  database ID "Name"          place a database component
  storage ID "Name"           place a storage component
  queue ID "Name"             place a queue component
  cloud ID "Name"             place a cloud component
  external ID "Name"          place a external component
  at 120 200                  optional starting position; nearby nodes align when generated
  size 300 180                component size, or the minimum size of a zone

Connections
  A -> B                      directed data flow; chain as A -> B -> C
  A -.-> B                    dashed event or async flow
  A [request] -> B            caption on a connection

RULES
- The file is one `architecture "Title" { ... }` block.
- Declare components with unique IDs. Optional `at x y` and `size width height` may follow the label in either order. `at` suggests a starting row or column; Generate may move it to leave space.
- Declare zones before their contents; they are independent outlined backdrops, not nested blocks. A component belongs to the smallest original zone containing its centre. With one zone, unplaced components belong to it too. The zone grows or, when unsized, fits its contents.
- Declare all nodes before their connections. `->` is a solid flow; `-.->` is a dashed event.
- Uploaded images belong to the saved sheet, not the source text.

WORKED EXAMPLE
architecture "Recipe Search Platform" {
  zone APP "Recipe Search Platform" at 40 40 size 960 700
  zone SEARCH "Search & discovery" at 270 100 size 290 210
  zone DATA "Recipe management" at 620 100 size 310 320
  zone ACCOUNT "Accounts" at 270 480 size 290 190
  zone MEDIA "Media & files" at 620 480 size 310 190
  client USER "Mobile app" at 70 270
  service FIND "Search engine" at 330 170
  service RECIPE "Recipe service" at 690 160
  database CATALOG "Recipes" at 690 290
  service PROFILE "User profile" at 330 540
  storage FILES "Image storage" at 690 540
  USER -> FIND -> RECIPE -> CATALOG
  USER -> PROFILE
  PROFILE -> FILES
  RECIPE -> FILES
}

OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `architecture "…" {` and ends with `}`.
- Do not invent keywords: use only the ones listed above.
- Keep labels short enough to read inside a box, and keep every ID unique.

MY DIAGRAM
Describe what you want here, then send this message.
How AI requests, attachments and privacy work

Something unclear? Contact support or read the Privacy Policy.