RSS3 v0.1.0-alpha.0

Latest editor's draft:

Editors:

Reviewers

No one because this is the first version

Participate:

Abstract

Derived from the best out of RSS, RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.

This document describes the interfaces of RSS3 files.

Status of This Document

This is still a work in progress. The proposal is being incubated in the NaturalSelectionLabsopen in new window.

GitHub Discussionsopen in new window is preferred for discussion of this specification.

Future Compatibility

This version is an alpha version, so it is not guaranteed to be compatible with subsequent versions.

Concepts

  • Persona - a user, either as an individual or as a group
  • Editors - Persona who have permission to modify this file
  • Context - One type of interactive content for one RSS3Item
  • RSS3Item - An original item published by the current persona (root item) or an interactive item from other personas (context item)
  • RSS3Link - One type of relationship for one persona

Interfaces

Interfaces in TypeScript

type Address = string;

// Common attributes for each file
interface RSS3Base {
    id: Address;
    version: string;
    type: string;
    date_created: string;
    date_updated: string;
    editors?: {
        blocklist?: Address[]; // Link to RSS3Link files
        allowlist?: Address[]; // Link to RSS3Link files
    };
    items: any[];
    items_next?: Address; // T
}

// Entrance, RSS3Persona file
interface RSS3Persona extends RSS3Base {
    type: 'persona';
    editors: never;

    profile: {
        name?: string;
        avatar?: Address; // Link to a third party file
        bio?: string;
		tags?: string[];
    };

    links?: {
        id: Address; // Link to a RSS3Link file
        name: string;
        tags?: string[];
    }[];

    items: RSS3Item[];
    assets: {};
}

// RSS3Items file
interface RSS3Items extends RSS3Base {
    type: 'items';
    items: RSS3Item[];
}

// RSS3Link file
interface RSS3Link extends RSS3Base {
    type: 'relationship';
    items: RSS3OtherPersona[];
}

interface RSS3OtherPersona {
    id: Address; // Link to a RSS3Persona file
    verification?: string;
    name: string;
    avatar?: Address; // Link to a third party file
    bio?: string;
}

interface RSS3Item {
    id: string;
    authors?: RSS3OtherPersona[];
    title?: string;
    summary?: string;
    tags?: string[];
    date_published?: string;
    date_modified?: string;

    contents?: {
        id: Address; // Link to a third party file
        mime_type: string;
        name?: string;
        tags?: string[];
        size_in_bytes?: string;
        duration_in_seconds?: string;
    }[];

    contexts?: {
        id: Address; // Link to a RSS3Items file
        name?: string;
        tags?: string[];
    }[];
}

Examples

RSS3Persona file: persona:diygod - interface RSS3Persona

A persona DIYgod with a published item Never

{
    "id": "persona:diygod",
    "version": "rss3.io/version/v0.1.0-alpha.0",
    "type": "persona",
    "date_created": "2009-05-01T00:00:00.000Z",
    "date_updated": "2021-05-08T16:56:35.529Z",

    "profile": {
        "name": "DIYgod",
        "avatar": "dweb://diygod.jpg",
        "bio": "ๅ†™ไปฃ็ ๆ˜ฏ็ƒญ็ˆฑ๏ผŒๅ†™ๅˆฐไธ–็•Œๅ……ๆปก็ˆฑ๏ผ",
        "tags": ["demo", "lovely", "technology"]
    },

    "links": [{
        "id": "link:diygod:followings",
        "name": "Followings"
    }, {
        "id": "link:diygod:followers",
        "name": "Followers"
    }, {
        "id": "link:diygod:blocklist",
        "name": "Blocklist"
    }],

    "items": [{
        "id": "item:diygod:never",
        "authors": ["persona:diygod"],
        "title": "Never",
        "summary": "Never stop dreaming.",
        "date_published": "2021-05-08T16:56:35.529Z",
        "date_modified": "2021-05-08T16:56:35.529Z",

        "contents": [{
            "id": "dweb://never.html",
            "mime_type": "text/html"
        }, {
            "id": "dweb://never.jpg",
            "mime_type": "image/jpeg"
        }],

        "contexts": [{
            "id": "items:diygod:never:comments",
            "name": "Comments"
        }, {
            "id": "items:diygod:never:likes",
            "name": "Likes"
        }]
    }],
    "items_next": "items:diygod:index2"
}

RSS3Link file: link:diygod:followers - interface RSS3Link

{
    "id": "link:diygod:followers",
    "version": "rss3.io/version/v0.1.0-alpha.0",
    "type": "link",
    "date_created": "2009-05-01T00:00:00.000Z",
    "date_updated": "2021-05-08T16:56:35.529Z",
    "editors": {
        "blocklist": "link:diygod:blocklist"
    },

    "items": ["persona:joshua", "persona:atlas", "persona:tuzi", "persona:zuia"]
}

RSS3Items file: items:diygod:never:comments - interface RSS3Items

{
    "id": "items:diygod:never:comments",
    "version": "rss3.io/version/v0.1.0-alpha.0",
    "type": "items",
    "date_created": "2009-05-01T00:00:00.000Z",
    "date_updated": "2021-05-08T16:56:35.529Z",
    "editors": {
        "allowlist": "link:diygod:followings"
    },

    "items": [{
        "id": "items:diygod:never:comments:0",
        "authors": [{
            "id": "persona:joshua",
            "verification": "xxxxx",
            "name": "Joshua",
            "avatar": "dweb://joshua.jpg"
        }],
        "title": "DIYgod is the best!",
        "date_published": "2021-05-08T16:56:35.529Z",
        "date_modified": "2021-05-08T16:56:35.529Z",

        "contents": [{
            "id": "dweb://best.jpg",
            "mime_type": "image/jpeg"
        }],

        "contexts": [{
            "id": "items:diygod:never:comments:0:sub-comments",
            "name": "Sub-Comments"
        }]
    }]
}

Fields

RSS3Base: Common attributes for each file

  • id: Unique indicate for current file. It is also used to verify permissions. Its format requires further discussion
  • version: Proposal version for current file. It should be like rss3.io/version/v1.0.0
  • type: File type. The values persona link items are currently available
  • date_created: Specifies the created date in RFC 3339 format
  • date_updated: Specifies the updated date in RFC 3339 format
  • editors: Persona who have permission to modify this file other than root persona. Default to { allowlist: [] }. This field can only be changed by root persona
    • blocklist: Persona here are not allowed to modify
    • allowlist: Persona here are allowed to modify. If its value is set, the blocklist is invalid
  • items: A list. Its type and meaning depend on the type of current file. It is explained separately below.
  • items_next: Next page of items

RSS3Persona: RSS3Persona file, indicating a persona

  • type: Must be persona
  • editors: This field is not available for this type of file. This file can only be changed by root persona
  • profile: Profile of current persona
    • name: Name of current persona
    • avatar: Avatar of current persona. It is an address that links to a third party file
    • bio: Bio of current persona
    • tags: Tags of current persona
  • links: Relationships for this persona, for example, followings followers blocklist
    • id: It is an ID that links to an RSS3Link file
    • name: Relationship name
    • tags: The meaning is clear
  • items: Partial RSS3Items published by current persona. Its quantitative cap requires further discussion
  • assets: Assets for current persona. Its interface requires further discussion

RSS3Items: RSS3Items file, indicating a bunch of RSS3Item. They can be root items or context items

  • type: Must be items
  • items: List of root item or context item

RSS3Link: RSS3Link file, indicating one type of relationship for one persona

  • type: Must be link
  • items: List of RSS3OtherPersona

RSS3OtherPersona: indicating other personas, used in RSS3Link and RSS3Item

  • id: It is an ID that links to an RSS3Persona file
  • verification: It is a key signed by this persona. It is used to indicate that the operation is approved by this persona, similar to GPG for git. Its implementation requires further discussion
  • name: Name of this persona
  • avatar: Avatar of this persona. It is an address that links to a third party file
  • bio: Bio of this persona

RSS3Item: indicating content posted by a persona or a context

  • id: Unique ID of the current item
  • authors: Authors of the current item. It is a list of RSSOtherPersona
  • title: Title of the current item
  • summary: Content summary of the current item
  • tags: Tags of the current item
  • date_published: Specifies the published date in RFC 3339 format
  • date_modified: Specifies the modified date in RFC 3339 format
  • contents: Contents of the current item, possibly multiple different types of content
    • id: Actual content. It is an address that links to a third party file
    • mime_type: MIME typeopen in new window of the current content
    • name: Name of the current content
    • tags: Tags of the current content
    • size_in_bytes: Size of the current content in bytes
    • duration_in_seconds: Duration of the current content in seconds. Mainly for audio and video use
  • contexts: Interactive items from other personas
    • id: It is an ID that links to an RSS3Items file
    • name: Name of the current context
    • tags: Tags of the current context

Extensions

Custom objects can be used in RSS3. Names must start with an _ character followed by a letter. Custom objects can appear anywhere in a feed.