I’d like to make a proposal for adding a Collections schema for notes. We have multiple note taking apps, as well as several apps using notes as part of a larger set of data that they use. This collection would serve to provide a base-level for data portability within the Blockstack ecosystem, and any other platforms that may choose to adopt this model. App developers would still be able to add additional fields that are important for their own users, use cases, and/or differentiation.
{
"@type": "https://schema.org/DigitalDocument",
"headline": Text,
"text": Text,
"keywords": Array <Text>, // Tags
"dateCreated": Date or DateTIme,
"dateModified": Date or DateTime,
"encodingFormat": Text, // MIME format (text/plain, text/html, text/markdown, application/json),
"references": Array <URL> // URL to a DigitalDocument type audio, image, video, etc
"favorite": Boolean // indicate favorites
"archive": Boolean // indicate trash bin/archive
}
A good idea! For the actual structure of the data, I’d recommend following the existing Schema.orgDigitalDocument (or maybe the more specific NoteDigitalDocument or TextDigitalDocument) attribute naming. That would look something like:
{
"@type": "https://schema.org/DigitalDocument",
"headline": Text,
"text": Text,
"keywords": Text, // Tags
"dateCreated": Date or DateTIme,
"dateModified": Date or DateTime,
"encodingFormat" Text or URL, // MIME format
}
The concept of “favorite”, and “archived”/“trashed” aren’t in the Schema.org class, but working with an RDF class like that, they could be added in. Or, those could be implemented as specific tags added to the keywords attribute.
Thanks for bringing this up, we definitely want to try and stay in line with schema.org when possible. I like keywords, and think we should also add tags/favorite.
I presume a note can be shared between multiple users. In that case, each user should be able to have their own favorite notes, so favorite should not be a property of the note but rather be associated with the person or considered a relation between the person and the note.
Updates: @type - reference should be to Blockstack collections schemas
schemaVersion - allow apps to handle schema updates
version - add document version per @yukan
{
"@type": "https://github.com/blockstack/blockstack-collections",
"schemaVersion": "Text" // version of document collection schema
"headline": Text,
"text": Text,
"keywords": Array <Text>, // Tags
"dateCreated": Date or DateTime,
"dateModified": Date or DateTime,
"encodingFormat": Text, // MIME format (text/plain, text/html, text/markdown, application/json),
"references": Array <URL> // URL to a DigitalDocument type audio, image, video, etc
"favorite": Boolean // indicate favorites
"archive": Boolean // indicate trash bin/archive
"version": Text // document version
}