Actions & Action Tokens

An Action Token represents a user action within Cloudillo. It can contain a post, comment, like, or other interaction. Each Action Token is:

  • Cryptographically signed by it’s creator.
  • Time-stamped with an issue time.
  • Structured with relevant metadata about the action.

Action Token Fields

Field Type Required Description
iss identity * The identity of the creator of the Action Token.
aud identity The audience of the Action Token.
sub identity The subject of the Action Token.
iat timestamp * The time when the Action Token was issued.
exp timestamp The time when the Action Token will expire.
k string * The ID of the key the identity used to sign the Token.
t string * The type of the Action Token.
c string / object The content of the Action Token (specific to the token type).
p string The ID of the parent token (if any).
a string[] The IDs of the attachments (if any).

Attachment and Token IDs

Attachment and token IDs are derived using SHA256 hashes of their content, ensuring immutable references to external objects.

Overriding Action Tokens

  • Each token type is linked to a database key, allowing previous tokens to be overridden where applicable.
  • The database key always contains the “iss” (issuer) field and may include other relevant fields.
  • Example: A REACT token (representing a reaction to a post) uses a key composed of “iss” and “p” (parent post ID). If a user reacts to the same post multiple times, the latest reaction replaces the previous one.

Action Token Types

User relationships

CONN: Connect
Represents one side of a connection between two profiles. A connection is established when both parties issued a connection token to each other
FLLW: Follow
Represents a follow relationship (a profile follows another profile).

Content

POST: Post
Represents a post created by a profile.
ACK: Acknowledge
Represents an acknowledge of a token issued to an other profile. It is issued by the audience of the original token.
CMNT: Comment
Represents a comment, attached to some other token.
REACT: React
Represents a reaction (like, dislike, etc.) to some other token, issued by a user.
RESP: Response (TODO)
Represents a response to a question
can be a response to a POST:VOTE, or POST:EVENT type token
STAT: Statistics
Represents statistics about some other token (number of reactions, comments, votes, etc.)
Repost / share action (TODO)
Represents the reposting of an other content to a different profile

File sharing

FSHR: File share
Represents a file share issued to a profile

Communication

CONV: Conversation (TODO)
Represents a conversation between several profiles (group chat)
INV: Invitation (TODO)
Represents an invitation for a profile to join a conversation
JOIN: Join (TODO)
Represents that a profile joined a conversation
MSG: Message
Represents a message sent by one profile to an other

TODO

Permissions

  • Public
  • Followers
  • Connections
  • Tags

Flags

  • Can react
  • Can comment
  • With permissions?

Tokens

Review
Represents a review post with a rating, attached to something
Patch
Represents a patch of a token (modify the content, or flags for example)
Resource
Represents a resource that can be booked (e.g. a conference room)
Book
Represents a booking of a resource.