English

Admin guide Operations

Reference library

Manage the reference architectures that people open as new canvases.

On this page

The reference library holds complete canvases that a workshop can start from. Opening an entry creates a brand-new canvas, so every workshop gets its own copy to rearrange.

Where the library lives

The library is a folder of JSON files, one per entry. The default is server/library. Set ARCHIPELEGO_LIBRARY to use another folder.

The server reads the folder on every request. A new or changed file appears without a restart.

The repository ships one entry, agentic-insurer.json: the six-layer agentic universal insurer. It covers P&C, health, life, wealth and asset management. The user guide describes it.

Entry format

An entry is one JSON object:

json
{
  "id": "my-reference",
  "title": "My reference architecture",
  "description": "One sentence that says what this architecture is for.",
  "tags": ["payments", "reference architecture"],
  "canvas": {
    "format": "archipelego",
    "version": 1,
    "title": "My reference architecture",
    "layers": [{ "id": "experience", "name": "Experience", "height": 288 }],
    "blocks": [],
    "links": [],
    "notes": []
  }
}
Field Rule
id Lowercase letters, digits and hyphens, at most 64 characters. The file name must be <id>.json.
title Shown in the library dialog.
description Optional. Shown under the title.
tags Optional. A list of words.
canvas.title The title of the new canvas.
canvas.layers Optional. The layer set, each with an id, a name and a height in pixels.
canvas.blocks Required. A list of blocks, each with an id.
canvas.links Required. A list of connections, each with an id.
canvas.notes Optional. A list of post-its.

The server skips a file that is not valid JSON or has no canvas.blocks list. The block, link and note fields are those of an exported canvas. See Library format.

What opening does

When someone selects Open as new canvas, the app calls POST /api/library/<id>/open. The server then:

  1. creates a new canvas id: 32 random bytes in URL-safe base64, 43 characters,
  2. writes a new <canvas id>.yjs file in the data folder, with the entry's title, layers, blocks, links and post-its,
  3. sets the version to 1.0.0 and records the entry id as the canvas source,
  4. answers with the new id, and the browser opens it.

The library entry itself never changes.

Add your own entry

  1. Build the architecture on a canvas.
  2. Open Save & export, then Export JSON. You get a file named after the canvas title, ending in .archipelego.json.
  3. Wrap the exported object in an entry: add id, title, description and tags, and put the export under canvas.
  4. Save the file as <id>.json in the library folder.
  5. Open the library in the app. The entry appears, sorted by title.

To check the list from the command line:

bash
curl http://localhost:1234/api/library

Rebuild the insurer

agentic-insurer.json is generated from the research file docs/research/agentic-insurer-reference.json. After you edit the research file, rebuild the entry:

bash
npm run library

The command runs node scripts/build-library.mjs. It lays the six layers out as bands, with one dashed zone per business line, and writes server/library/agentic-insurer.json. It prints the number of layers, blocks, zones, links and post-its, and the height of each layer.

Recipes

The library is also the curated part of the cookbook of recipes that work in production. An entry may carry a recipe object, which turns it into a recipe: a problem first, variants and a method. Entries without one still appear, with their description as the problem and a single variant "As drawn".

json
"recipe": {
  "problem": "Deliver one post to millions of followers' timelines within seconds",
  "pattern": "Fan-out on write",
  "solution": "One paragraph that explains how it works.",
  "category": "scale",
  "whenToUse": ["Feeds read far more often than they are written"],
  "whenNot": ["Writes are as frequent as reads"],
  "tradeoffs": { "pro": ["Reading a timeline is one cache lookup"], "con": ["Write amplification"] },
  "tags": ["timeline", "feed"],
  "featureId": "f_…",
  "variants": [
    { "id": "aws", "name": "AWS", "constraints": ["aws", "single"], "stack": { "<block id>": "Kinesis Data Streams" }, "deploy": ["Create the stream", "…"], "iac": "https://…" }
  ]
}
Field Rule
category One of scale, events, data, ai, resilience, security, delivery
constraints Any of sovereign, open-source, gcp, aws, azure, multi, single, onprem
stack A technology label per block id of canvas.blocks, at most 60 characters
featureId The feature of canvas.features whose first scenario is the recipe's method; the first feature when left out

The repository ships four seed recipes: fan-out on write, LLM council, RAG with guardrails and transactional outbox. server/scripts/seed-recipes.ts generates them, placing the blocks with the same rules as the app. Seed recipes carry no proofs.

Community recipes, proofs and discussion

People publish their own recipes from their boards. These and the community data live in the data folder, under recipes/<recipe id>/:

  • recipe.json: the recipe;
  • proofs.json: the proofs;
  • files/: the evidence documents;
  • votes.json: the votes;
  • comments.json: the discussion.

Curated recipes keep their community files there too.

Rule
Publishing, proofs, comments Signed-in accounts with a verified email
Votes and reports Signed-in accounts
Evidence documents PDF, PNG, JPEG or WebP, checked by their content, up to 5 MB, served as downloads
Moderation The author hides proofs on their recipe; three reports hide a proof or a comment. To remove content, edit or delete the JSON files
Limits per account and hour 5 publications, 10 proofs, 10 uploads, 60 comments, 30 reports

ARCHIPELEGO_RECIPES controls the community features:

  • on (the default) turns everything on.
  • read keeps reading, votes and cooking, but stops publishing, proofs and comments.
  • off also turns off votes.