FINOS / Architecture as Code v1.0 GA Aug 2025 · Latest v1.2

The Common
Architecture Language Model.

CALM is an open-source, JSON-based meta-schema for defining system architectures as code — versioned, validatable, and composable alongside the implementations they describe.

  • LicenseOpen Source
  • StewardFINOS
  • Releasev1.2
  • ParadigmArchitecture as Code

TL;DR — Summary

CALM turns architecture into a versioned JSON document that travels with the code, validates in CI, and binds compliance controls to the relationships they govern.

  • One artefact. The architecture and its controls live in one architecture.calm.json, validated against its pattern and the shared meta-schema.
  • PR-time enforcement. calm validate runs next to your unit tests; non-conforming changes fail the build, not the next Architecture Review Board (ARB).
  • Regulator-ready. Controls map to DORA (EU), PCI DSS v4.0.1, MAS TRM (SG), APRA CPS 234 (AU), HKMA TM-G-1 (HK), and OSFI B-13 (CA) evidence requirements.
  • Tooling exists today. Install @finos/calm-cli from npm, render with a self-hosted CALM Hub, and ship a docs site with calm docify.
01 · Introduction

Architecture lives where code lives.

For three decades, architecture artefacts have lived in Visio files, Confluence pages, and PowerPoint decks. Implementation has lived in Git. The two have drifted apart at every release. CALM closes that gap by treating the model itself as a versioned JSON document that travels with the source.

The status quo: drift by design

Every Tier 1 institution has the same problem. A reference architecture is approved by a board, drawn in Visio, attached to an Architecture Decision Record (ADR), and within two sprints it no longer reflects the deployed estate. Reviews happen in meetings that produce no machine-checkable output. Compliance evidence becomes a forensic exercise — piecing together screenshots, change tickets, and runbook entries to satisfy DORA Art. 6, SOX ITGC, or MAS TRM.

The CALM answer: one document, one truth

A CALM architecture.calm.json is the contract. It binds three things: intent (the pattern), instantiation (the deployed system), and control (the compliance posture). You review it in a pull request, validate it in CI, render it as C4 (context/container) diagrams, and query it for drift — one artefact, several views. The same artefact answers what is the system?, does it meet our golden pattern?, and which controls apply?.

BEFORE / DRIFT visio.vsdx approved 2023-Q1 arch.pptx slides · ARB deck confluence rev. unknown main.repo drift > 18 months COMPLIANCE / FORENSIC DORA evidence: reconstructed manually Last sync: unknown CALM AFTER / IN SYNC architecture.calm.json $schema: calm/1.0 pattern repo CALM Hub code repo CI / validate DORA / MAS TRM: controls in model · auto-renderable
Fig. 01 — Disconnected artefacts (left) versus CALM as the single linking spec (right).
02 · Core Concepts

The vocabulary of the spec.

CALM has a small, deliberate set of primitives. Each is a typed JSON object with a unique identifier and a defined slot in the meta-schema. Learn these seven and you can read almost any CALM document — interfaces and evidence, defined in the glossary, complete the set.

Node

Typed system entity

A service, database, network, actor, deployment target, or other addressable element. Identified by a stable unique-id, and exposing interfaces — typed connection points such as a URL or host/port pair.

  • unique-idstring
  • node-typeenum
  • namestring
  • descriptionstring
Relationship

Typed edge

Connects two or more nodes. The relationship-type determines semantics: connects, deployed-in, composed-of, interacts, or options (a decision point in a pattern).

  • unique-idstring
  • relationship-typeobject
  • protocolenum
  • controlsobject
Metadata

Extensible key/value

The escape hatch. Anything that does not fit the core schema — cost centre, data classification, business owner — lives here as structured key/value pairs.

  • free-formobject[]
  • attached toany node
  • validated bypattern
Pattern

Reusable template

A pattern is a JSON Schema that describes a class of valid architectures — for example, a golden three-tier web app or an event-driven microservice topology. Patterns are the unit of reuse.

  • $schemameta/calm
  • definesnode + rel types
  • enforcescontrols
Architecture

Concrete instantiation

An architecture document is a specific, validated instance of a pattern. It contains the same nodes and relationships, populated with real names, owners, and runtime details.

  • validates againstpattern
  • populated byteam
  • deployed assystem
Control

Compliance / security check

Declarative requirements attached to nodes or relationships. Examples: “all relationships entering PCI scope must use mutual TLS (mTLS)”, “every persistent store must declare encryption at rest”.

  • control-idstring
  • requirementobject
  • evidencelink
Flow

Ordered sequence of interactions

A flow describes a business or data path across nodes — for example, the steps to register an attendee, settle a trade, or process an instant payment. Flows reference existing nodes and relationships in order, so they remain consistent with the structural model.

A minimal model, visualised

Three nodes, two relationships, one control. The same model is renderable as a C4 container diagram or as a Mermaid graph — CALM is the source, the diagrams are views.

PATTERN: three-tier-web-app v1.0-rc2 NODE / webclient web-app id: shop-web port: 443 NODE / service api id: shop-api port: 8080 NODE / database orders-db id: orders-store port: 5432 connects · HTTPS rel: web-to-api connects · JDBC rel: api-to-db CONTROL / C-001 mTLS + SPIFFE identity required
Fig. 02 — A minimal CALM model: three nodes, two relationships, one control. The dashed frame is the pattern; the populated boxes are the architecture.
03 · Why It Matters

For Tier 1 financial institutions, this is overdue.

FINOS members did not open-source CALM to make documentation prettier. They open-sourced it because regulators are asking the same questions in five jurisdictions, and there is no scalable way to answer them with PowerPoint.

Compliance

Controls become first-class

Attach DORA Art. 6, PCI DSS v4.0.1 Req. 4, and SWIFT CSCF 2.4A directly to the connections they constrain. Evidence is a query against the model, not a reconstruction from tickets and screenshots.

Drift

Reality vs. intent, diffed

A nightly job introspects the cluster (or Terraform state, or cloud APIs) and renders the live topology as CALM. Diff against the approved document → drift PR opened automatically.

Review

Architecture review = PR review

Architecture changes are GitHub pull requests on the CALM document. Reviewers see the JSON diff, the rendered C4 view, and the controls delta in the same place they review code.

Reuse

Golden patterns enforced at PR time

A new service must validate against the approved pattern before merge. The validation gate fails the build; by the time a system reaches production review, it has already been validated.

The CI/CD checkpoint

CALM validation runs on every pull request and blocks the merge on failure — the same gate that catches a failing unit test or SAST finding.

CI PIPELINE / on: pull_request commit push lint eslint · rufo unit tests jest · pytest calm validate pattern + controls NEW GATE sast semgrep · codeql build image + SBOM deploy argo / flux FAIL FAST: non-conforming patterns blocked at PR time, before image build.
Fig. 03 — calm validate sits alongside unit tests and SAST as a first-class CI gate.
04 · Installation

Install on Ubuntu 26.04 LTS.

CALM ships as an npm CLI. The only hard prerequisite is Node.js 20+ — the floor documented in the official getting-started guide. Java 21 and Maven are needed only if you build CALM Hub from source; the published Docker image and the CLI itself need neither. Start with the preflight check — if a binary already shows ok, skip the step that installs it.

  1. Preflight — check what is already installed

    Run the loop below once. It probes every binary the rest of this section installs and prints ok with a version or missing. Each subsequent step is safe to skip if its binary reports ok at a recent enough version (Node 20+, Java 21+ for CALM Hub).

    bash
    # report which prerequisites are present on this machine
    for cmd in curl gpg make git node npm calm java mvn; do
      if command -v "$cmd" >/dev/null 2>&1; then
        ver=$("$cmd" --version 2>/dev/null | head -n1)
        printf "  ok       %-6s  %s\n" "$cmd" "$ver"
      else
        printf "  missing  %-6s  -\n"   "$cmd"
      fi
    done

    Typical output on a fresh Ubuntu 26.04 box:

    output
      ok       curl    curl 8.18.0 (x86_64-pc-linux-gnu)
      ok       gpg     gpg (GnuPG) 2.4.8
      missing  make    -
      ok       git     git version 2.53.0
      missing  node    -
      missing  npm     -
      missing  calm    -
      missing  java    -
      missing  mvn     -
  2. Update apt and install prerequisites

    Refresh the package index and install the small set of tools you need to bootstrap Node. Skip this step if the preflight reported ok for curl, gpg, make, and gitca-certificates is preinstalled on Ubuntu Server images.

    bash
    # refresh index, install build essentials and curl
    sudo apt update
    sudo apt install -y curl ca-certificates gnupg build-essential git
  3. Install Node.js 22 from NodeSource

    Ubuntu 26.04 ships a recent Node in apt, but it tracks Debian’s snapshot and can drift from the active LTS. Use the NodeSource repository to pin Node 22.x — the CLI’s documented floor is Node 20+, and Node 22 is a maintenance LTS line supported until April 2027 (Node 20 reached end-of-life in April 2026; Node 24 is the current active LTS if you prefer it). Skip this step if the preflight reported ok for both node and npm at v20 or newer.

    bash
    # add NodeSource repo and install Node 22
    curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
    sudo apt install -y nodejs
  4. Verify Node and npm

    Confirm both binaries are on PATH and reporting a version on the 22.x line.

    bash
    node --version
    v22.14.0
    npm --version
    10.9.2
  5. Install the CALM CLI globally

    Pull the official package from npm. The binary is exposed as calm. Skip if the preflight already reported ok for calm — re-run only to upgrade.

    bash
    npm install -g @finos/calm-cli
  6. Verify the CLI

    Print the version and the top-level command list.

    bash
    calm --version
    calm --help
    
    Commands:
      generate [options]   Generate an architecture from a CALM pattern file.
      validate [options]   Validate that an architecture conforms to a given CALM pattern.
      diff [options]       Compare two CALM documents (architectures or patterns) and report what changed.
      template [options]   Generate files from a CALM model using a Handlebars template bundle.
      docify [options]     Generate a documentation website off your CALM model.
      init-ai [options]    Augment a git repository with AI assistance for CALM.
      help [command]       display help for command
  7. Optional — install Java 21 and Maven for CALM Hub

    Only required if you build the CALM Hub registry/visualisation server from source. It is a Quarkus application needing Java 21+ and Maven 3.8.6+ — to skip Java entirely, run the published Docker image instead (see the tutorial). Skip this step if the preflight reported ok for both java (21 or newer) and mvn.

    bash
    sudo apt install -y openjdk-21-jdk maven
    java --version
    mvn --version
  8. Optional — clone the reference repo for example patterns

    The FINOS monorepo carries the spec, reference patterns, and the conference-signup tutorial used below.

    bash
    git clone https://github.com/finos/architecture-as-code.git
    cd architecture-as-code/calm/getting-started
    ls -1 *.json
    conference-signup.pattern.json

Common installation issues

05 · Hands-On Tutorial

Conference signup, end to end.

Take the official getting-started pattern, instantiate it as an architecture, validate, visualise, and render a documentation site. Five steps — locate, generate, validate, visualise, docify — the same loop you will run in CI.

  1. Locate the pattern

    The FINOS monorepo bundles a reference pattern for a simple attendee-registration system. The pattern is a JSON Schema describing the shape of a valid architecture.

    bash
    cd architecture-as-code/calm/getting-started
    ls -1
    README.md
    conference-signup.pattern.json
    controls
    img
  2. Generate a concrete architecture

    calm generate walks the pattern and produces a stub architecture document — five nodes and four relationships for this pattern. The stub contains placeholders ([[ HOST ]], -1) that you replace with real values.

    bash
    calm generate \
      --pattern ./conference-signup.pattern.json \
      --output  ./conference-signup.arch.json
    
    info [file-system-document-loader]:     ./conference-signup.pattern.json exists, loading as file...
    info [calm-generate]:     Generating a CALM architecture...
    info [calm-generate]:     Successfully generated architecture to [./conference-signup.arch.json]
  3. Validate

    calm validate checks the architecture against the pattern (schema conformance) and against any attached controls. The exit code is non-zero only on errors; add --strict to fail on warnings too — that combination is the CI gate. Warnings on a fresh stub are expected: they point at the placeholder values you have not filled in yet.

    bash
    calm validate \
      --pattern      ./conference-signup.pattern.json \
      --architecture ./conference-signup.arch.json
    
    info [calm-validate]:     Formatting output as json
    {
      "jsonSchemaValidationOutputs": [],
      "spectralSchemaValidationOutputs": [
        { "code": "architecture-has-no-placeholder-properties-string",
          "severity": "warning",
          "message": "String placeholder detected in architecture.",
          "path": "/nodes/conference-website/interfaces/conference-website-url/url", … },
        … six more placeholder warnings …
      ],
      "hasErrors": false,
      "hasWarnings": true
    }
  4. Visualise with CALM Hub

    CALM Hub is the self-hostable registry and visualisation server for CALM documents. Upload the architecture to your instance and you get a rendered topology and a shareable URL. The quickest route is the published Docker image; building from source needs Java 21 + Maven.

    bash
    # quickest: published Docker image (no Java required)
    cd architecture-as-code/calm-hub/deploy
    docker compose up
    
    # or: dev mode from source, standalone storage (no MongoDB required)
    cd architecture-as-code
    ./mvnw -pl calm-hub quarkus:dev -Dcalm.database.mode=standalone
      calm-hub on JVM (powered by Quarkus 3.x) started. Listening on: http://localhost:8080
  5. Render a documentation site

    calm docify generates a static site from an architecture — nodes, relationships, controls, and embedded diagrams. The output is a folder you can publish to GitHub Pages.

    bash
    calm docify \
      --architecture ./conference-signup.arch.json \
      --output       ./website
    
    # writes a static documentation site into ./website

What the architecture document looks like

Truncated for clarity — two nodes and two relationships are elided, and the full document also carries metadata and controls. Note the interfaces on each node: typed connection points whose placeholder values ([[ HOST ]], -1) you fill in, and exactly what the first-run validate warnings point at. The $schema URL records which pattern the document instantiates.

conference-signup.arch.json
{
  "$schema": "https://calm.finos.org/getting-started/conference-signup.pattern.json",
  "nodes": [
    {
      "unique-id":   "conference-website",
      "node-type":   "webclient",
      "name":        "Conference Website",
      "description": "Website to sign up for a conference",
      "interfaces":  [{ "unique-id": "conference-website-url", "url": "[[ URL ]]" }]
    },
    {
      "unique-id":   "load-balancer",
      "node-type":   "network",
      "name":        "Load Balancer",
      "interfaces":  [{ "unique-id": "load-balancer-host-port", "host": "[[ HOST ]]", "port": -1 }]
    },
    /* … "attendees" (service) and "attendees-store" (database), each with image + port interfaces … */
    {
      "unique-id":   "k8s-cluster",
      "node-type":   "system",
      "name":        "Kubernetes Cluster",
      "description": "Kubernetes Cluster with network policy rules enabled"
    }
  ],
  "relationships": [
    {
      "unique-id": "conference-website-load-balancer",
      "protocol":  "HTTPS",
      "relationship-type": {
        "connects": {
          "source":      { "node": "conference-website" },
          "destination": { "node": "load-balancer" }
        }
      }
    },
    /* … "load-balancer-attendees" (mTLS) and "attendees-attendees-store" (JDBC) … */
    {
      "unique-id": "deployed-in-k8s-cluster",
      "relationship-type": {
        "deployed-in": {
          "container": "k8s-cluster",
          "nodes": [ "load-balancer", "attendees", "attendees-store" ]
        }
      }
    }
  ]
}

Beyond the tutorial: controls on a richer topology

ILLUSTRATIVE ARCHITECTURE · not the tutorial output attendee actor NODE / idp Identity Provider OIDC / FAPI 2.0 NODE / webclient Conference Web UI id: conference-web port: 443 / TLS 1.3 NODE / service Conference API id: conference-api port: 8080 / mTLS NODE / database Attendee Store id: attendee-store port: 5432 / TLS HTTPS REST JDBC OIDC CONTROLS / illustrative examples C-001 mTLS east-west · C-002 OIDC + FAPI 2.0 north-south · C-003 encryption at rest
Fig. 04 — An illustrative extension, not the tutorial output: actor, IdP, web UI, API, and database with controls attached. The real conference-signup pattern is simpler — five nodes including a load balancer and a Kubernetes cluster, with a micro-segmentation control.
06 · Glossary

Terms, defined.

A reference list of CALM-adjacent terms. Skim if you are already fluent; bookmark if you are not.

Architecture as Code AasC
A practice in which architecture artefacts are stored as version-controlled, machine-readable documents alongside the code they describe. CALM is its FINOS-stewarded reference specification.
CALM noun
Common Architecture Language Model. A FINOS open-source meta-schema (JSON) for describing systems as nodes, interfaces, relationships, metadata, controls, and flows. v1.0 released August 2025; release 1.2 is current (January 2026).
FINOS org
The Fintech Open Source Foundation, a Linux Foundation project that stewards open-source software for financial services. Host of CALM and many other capital-markets projects.
AasC Community group
The FINOS working group that develops CALM, formed within the FINOS DevOps Automation SIG; CALM was onboarded as a FINOS project in December 2024. Morgan Stanley is a lead contributor that open-sourced its internal architecture-as-code tooling through the group.
Node primitive
A typed entity in the model — service, database, network, actor, deployment target, or other. Identified by a stable unique-id.
Interface primitive
A typed connection point exposed by a node — a URL, a host/port pair, a container image. Relationships attach between nodes via their interfaces; the generated tutorial architecture is full of them.
Relationship primitive
A typed edge between nodes. Sub-types: connects, deployed-in, composed-of, interacts, and options (pattern decision points).
Metadata primitive
Free-form key/value extension data attached to any node or relationship. The intended home for cost-centre, data-classification, and similar enterprise concerns.
Pattern noun
A reusable JSON Schema describing a class of valid architectures. The unit of reuse in CALM — e.g. a golden three-tier web app or event-driven microservice topology.
Architecture instance
A concrete JSON document that validates against a pattern and populates it with real ids, names, owners, and runtime detail. The deployable contract.
Control primitive
A declarative compliance or security requirement attached to a node or relationship. Examples: mTLS required, encryption at rest mandatory, data residency constraints.
Flow primitive
An ordered sequence of node interactions representing a business or data path — trade settlement, payment authorisation, attendee registration.
Meta-schema JSON Meta Schema
The CALM specification itself, expressed as a JSON Schema document. Every CALM pattern and architecture validates against it.
CALM CLI tool
The command-line interface (@finos/calm-cli on npm) for generating, validating, diffing, templating, and documenting CALM documents.
CALM Hub service
The FINOS-developed registry and visualisation server for CALM patterns and architectures. A Quarkus application; self-host it from the published Docker images or run it from source.
diff command
CLI sub-command that compares two CALM documents (architectures or patterns) and reports what was added, removed, modified, or renamed.
docify command
CLI sub-command that renders a CALM architecture into a static documentation website.
generate command
CLI sub-command that walks a pattern and produces a stub architecture document ready to be populated.
validate command
CLI sub-command that checks an architecture against its pattern and any attached controls. The CI gate.
init-ai command
CLI sub-command that drops AI-assistant configuration (GitHub Copilot, Claude Code, AWS Kiro, or Codex) into a repo, so editors can author CALM documents with model assistance.
Drift detection practice
Periodically rendering the live system as CALM and diffing it against the approved CALM document. Surfaces unintended divergence as a PR.
SPIFFE cross-ref
Secure Production Identity Framework For Everyone. A workload identity standard frequently referenced from CALM controls when describing east-west authentication.
mTLS acronym
Mutual TLS — both client and server present certificates. The workhorse control for east-west (service-to-service) authentication, often paired with SPIFFE identities.
C4 model
Simon Brown’s diagramming model (Context, Container, Component, Code). CALM tooling renders C4-style views from the model — CALM is the source, C4 is a view.
ARB acronym
Architecture Review Board. The governance meeting where architectures are traditionally approved — the checkpoint CALM moves into the pull request.
ADR acronym
Architecture Decision Record. A short document capturing one architectural decision and its rationale, usually stored alongside the code.
DORA regulation
The EU Digital Operational Resilience Act (Regulation (EU) 2022/2554). Article 6 requires an ICT risk-management framework — the evidence anchor cited on this page.
07 · Takeaways

Six things to remember.

If you take nothing else from this page, take these. Each one shifts how architecture is practised — not what is drawn.

01

Architecture is now code.

Diagrams are derived views. The CALM document is the source. If they disagree, the JSON wins — rebuild the picture from the data.

02

The meta-schema is the heart.

Everything — patterns, architectures, controls — validates against one meta-schema. The schema is the only thing you need to learn deeply.

03

Patterns enable reuse.

One golden pattern, dozens of architectures. The pattern enforces what is non-negotiable; the architecture fills in the rest.

04

Validate in CI/CD.

calm validate sits next to your unit tests. A non-conforming architecture fails the build — not the next architecture review board.

05

Controls bake in compliance.

Attach DORA, PCI DSS, SOX, and MAS TRM requirements to the relationships they govern. Evidence is queryable, not forensic.

06

Visualise with CALM Hub.

Self-host the registry from the published Docker image or run the Quarkus service from source. Diagrams render automatically from the model — no hand-drawn topology to maintain.

08 · Further Reading

Further reading: where to go next.

The authoritative sources. Pin these in your bookmarks bar.