ArchDocs
Start free

Worked example: Cadence

Every other page here shows one construct. This shows a whole document.

apiVersion: archdocs/v1
title: Cadence Platform Overview
layout:
  algorithm: layered
  direction: right
nodes:
  - id: customer
    type: c4-node
    kind: person
    label: Customer Success Rep
    description: Builds sequences and enrolls contacts.
  - id: publicApi
    type: reference
    referenceType: object
    targetId: <objectId>
    label: Public REST API v1
  - id: engagementApi
    type: reference
    referenceType: object
    targetId: <objectId>
    label: Engagement API
  - id: sequencer
    type: reference
    referenceType: object
    targetId: <objectId>
    label: Sequencer
  - id: sendRequests
    type: reference
    referenceType: object
    targetId: <objectId>
    label: send-requests
  - id: deliveryWorker
    type: reference
    referenceType: object
    targetId: <objectId>
    label: Delivery Worker
  - id: deliveryEvents
    type: reference
    referenceType: object
    targetId: <objectId>
    label: delivery-events
  - id: cadenceDb
    type: reference
    referenceType: object
    targetId: <objectId>
    label: Cadence Postgres
  - id: eventStore
    type: reference
    referenceType: object
    targetId: <objectId>
    label: Event Store
  - id: sendgrid
    type: reference
    referenceType: object
    targetId: <objectId>
    label: SendGrid
relationships:
  - { from: customer, to: publicApi, label: Builds sequences }
  - { from: publicApi, to: engagementApi, label: Routes to }
  - { from: engagementApi, to: cadenceDb, label: Reads and writes }
  - { from: sequencer, to: cadenceDb, label: Reads enrollments }
  - { from: sequencer, to: sendRequests, label: Publishes due steps }
  - { from: sendRequests, to: deliveryWorker, label: Consumed by }
  - { from: deliveryWorker, to: sendgrid, label: Sends via, style: dashed }
  - { from: deliveryWorker, to: deliveryEvents, label: Emits outcomes }
  - { from: deliveryEvents, to: eventStore, label: Archived to }

What to notice

  • reference nodes carry no visual detail. The label is a convenience; the object supplies the name, kind, icon and fields. Rename the object and every document that references it follows.
  • Relationships connect references like any other node. The arrows between them are what the dependency graph is derived from, so an arrow drawn here shows up in impact analysis.
  • layout is a hint, not a position. Nodes have no coordinates. The compiler lays them out and records positions in a lockfile so a later recompile does not reshuffle the diagram.

The other six documents in the sample workspace cover the remaining constructs: core-schema (ERD), send-a-sequence-step (sequence diagram), public-api-v1 (REST and gRPC endpoints), and three more reference-and-relationship documents.