Kevalin - Content Model

Documents

A document combines the content of a document with a variety of metadata used to identify and verify the document.

  • Document type
  • Version
  • Author
  • Document signature
  • Permissions granted by the author to other users
  • Relationships to other documents

An author is identified by public key, and may also optionally publish a profile document signed by that key to provide information about them to other users.

The canonical identity of the document is determined by generating the tree hash of the document contents on a node by node basis, including the metadata. This means that other documents can embed a portion of the source document as a quote and also provide a tree proof attesting the authorship of that node without the need to also share the original document.

The document identity is then signed by the author’s private key to provide a valid Kevalin document which can then be published to the network.

Collections

Collections are special types of document which contain metadata describing their relationship to other documents.

The creator of a collection can grant permission for other authors to sign documents which will be considered part of the collection.

Documents indicate they are part of a collection by including a reference to the parent collection document and must meet the authorship requirements identified in the collection.

Collections can model a variety of interaction forms:

  • Blog/Microblog - single/few author signs documents in collection
  • Replies - document identifies a sub-collection to which anyone can publish if the document identifies itself as a reply to the parent document
  • Forum - an open or limited-membership collection to which multiple authors can publish
  • Site - collection of structured documents which are organised into a hierarchy of sub-collections
  • Directory/Database - a collection to which documents conforming to a given schema are published, e.g. links to video files or photos

Collections are the fundamental unit for subscriptions and replication of content in Kevalin, and as such shouldn’t grow too large. Participating nodes will most likely only fetch the most recent documents for a collection if it grows larger than is feasible to quickly sync to a single node. As such ‘open’ collections such as comments or replies to a single-author document are likely to become less usable if they become very popular.