Introduction
The Fabriqo Block protocol is a structured, yet flexible format to manage your data. It was developed with the idea that structuring data should be a community driven resposibility. To encourage the use of best practices whenever possible, but still enable anybody to make their own exceptions and additions or build it up from scratch.
Components
Block
The most basic component in the Block protocol is the block itself. The only requirement for an object to be concidered a Block is for it to have a contextually unique _id
attribute, preferrable in the format of a UUID. Without an explicity _type
attribute, it is inferred that the object is in fact of the base type "block"
.
The _type
attribute is a reference to a Schema that explains how to interpretate the block content.
Schema
A Schema is in fact also a Block and is handled exactly the same way. What makes a Schema special is that it has a fields
attribute which is an array of field definitions. In other words, a Schema is just a block that explains how other blocks are structured.
Identity
An Identity is another type of Block but is meant to present an entity that can perform actions. For example, the _owner
and _writer
attributes that is a part of the base Block definition, are references to Identity block instances. Typically users and organisations are represented by Identity blocks or other blocks using a Schema that extends the base Identity block.
This creates an implementation or platform agnostic approach where the account management does not matter. Some implementations might choose to let a user account use an Identity Schema, whilst other might simple let the account management be handled separately and associate an Identity with it, separating the security concerns from the data structures.
On the Fabriqo Platform, we have opted for the second approach. Each account has a primary identity linked to it.