Data model

This is the internal, portable format for custom webs. External sources are converted into this.

Core entities

Web

A self-contained knowledge web.

Required:

Optional:

Node

A thing in the web: person, place, event, object, concept.

Required:

Optional:

Link

A relationship between two nodes.

Required:

Optional:

Trail

A recorded journey.

Required:

Optional:

Time

Time is modeled as a flexible range:

{
  "start": "1800-01-01",
  "end": "1899-12-31",
  "label": "19th century",
  "precision": "year|month|day|range|circa"
}

For “century” nodes, time can be the century span.

Location

{
  "lat": 57.7089,
  "lon": 11.9746,
  "label": "Göteborg, Sweden"
}

Rich text body

Avoid raw HTML in the stored model. Use blocks:

Example:

{
  "type": "paragraph",
  "text": "This connects to [[node:abc123]] and also to https://example.com"
}

The renderer turns [[node:...]] into internal links.

Web package format (export/import)

A “web package” is a folder or zip containing:

See ./persistence.md for details.

Example web.json (minimal)

{
  "version": 1,
  "web": {
    "id": "demo",
    "title": "Demo Web",
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-01-01T00:00:00Z"
  },
  "nodes": [
    { "id": "a", "title": "Node A", "kind": "concept", "summary": "A thing." },
    { "id": "b", "title": "Node B", "kind": "concept", "summary": "Another thing." }
  ],
  "links": [
    { "id": "l1", "from": "a", "to": "b", "type": "relates-to", "label": "relates to" }
  ],
  "trails": []
}

Definition of done (data model)