Skip to content

Instantly share code, notes, and snippets.

@nandanmen
Created December 22, 2020 21:42
Show Gist options
  • Save nandanmen/388edaec897e3985e923561f703a8556 to your computer and use it in GitHub Desktop.
Save nandanmen/388edaec897e3985e923561f703a8556 to your computer and use it in GitHub Desktop.
TYDE Circle of Support

CircleOfSupport

The CircleOfSupport acitivity is a TYDE activity that allows users to manage their closest connections and group them into communities.

Its data is split into three major pieces — connections, communities, and circles:

interface CircleOfSupport {
  id: string
  connections: Connection[]
  communities: Community[]
  circles: Circle[]
}

Connections

A Connection represents a single individual. A connection follows the following interface:

interface Connection {
  id: string
  name: string
  avatar: Emoji
  communities: string[] // Community ids
}

Communities

A Community represents a group of Connections with some commonality. A Community follows the following interface:

interface Community {
  id: string
  name: string
  icon: Emoji
  color: HexString
  connections: string[] // Connection ids
}

Circles

A Circle represents connections with equal "closeness" to the user. It is simply an object with a connections property:

interface Circle {
  connections: string[] // Connection ids
}

The "closeness" of the circle is determined by the Circle's index in the CircleOfSupport circles array, where a lower index means the circle represents a closer group of connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment