ArchDocs
Start free

Structured elements

When a box and a label leave out details readers need, choose a structured element for a table's columns or an endpoint's parameters. Its editor keeps those fields together on the canvas.

Editing these elements requires docs:write.

Choose an element

Press Shift+N and choose an entry under Diagram Elements.

ElementWhat it records
ERD Entity (table)A table name, columns, types and constraints.
REST endpointAn HTTP method and path, parameters, headers and body schema.
gRPC methodA service and method, streaming type, metadata and message names.
Sequence diagramParticipants and the messages between them.
Service cardA service's name, technology and description.

C4 cards also include Person card, External card, Container card, Component card, Database card and Queue card. In the + popover, Architecture card inserts a service card.

Open the editor

  1. Place the element and select it.
  2. Double-click it, or select the Edit pencil icon.
  3. Change its fields, then click outside the editor to finish.

ERD entities, endpoint cards and C4 cards size themselves from their content. They don't have the free resize handles of an ordinary rectangle.

Describe a table

In an ERD entity, change the title and select Add row for each column. Enter the column name and type, then set the flags that apply:

FlagMeaning
PKPrimary key
FKForeign key
NNNot null
UQUnique

Use the row icons to reorder or remove columns. Collapse the entity when you only need its title on screen.

Record an API contract

For REST endpoint, fill in HTTP method and Path, then add Path params, Query params or Headers as needed. Use Auth to describe authentication and Body schema for the body.

For gRPC method, fill in Service and Method. Streaming type has unary, server, client and bidi choices. Add Metadata, Request message and Reply message where needed.

Choose REST or gRPC when you insert the element. You can't switch its protocol in the editor.

Build a sequence

  1. Set Diagram title.
  2. Under Participants, select + participant and name each participant, such as Dispatch Service and Billing Service.
  3. Under Messages, select + message. Choose its sender, recipient and message type, then enter its label.

Message types are sync, async, return, self, create and destroy. Removing a participant also removes messages to or from it.

You can select an existing object for a participant to attach its object identity and icon.

Edit a C4 card

Set Name, Kind, Technology and Description in the card editor. Changing Kind lets you reuse the card as a person, service, database or another available C4 kind.

A service card is local to the diagram. Naming it Dispatch Service doesn't attach it to the Dispatch Service object. Use an object reference when you need that connection.