# fyi.opensocial.site

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.site)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.site/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.site/examples)

## Definitions

### `fyi.opensocial.site#appview`

**Type**: `object`

An app server a tab reads for the viewer: what its methods' names start with, and the service, by DID and id.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `prefix` | `string` | Yes | social.grain |
| `service` | `string` | Yes | did:web:grain.social#grain_appview |

### `fyi.opensocial.site#channel`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `front` | `boolean` | No | The site's front page, drawn across the whole window with nothing around it, at every path at the group's address but the channels' (/c/<channel>/<tab>). Members land in the channels at the address itself, and see it at any other of its paths. One tab at most, and one anyone may see. |
| `members` | `boolean` | No | Shown to members only. |
| `name` | `string` | No |  |
| `roles` | `array` | No | Shown only to members with one of these roles, by the group's role ids: a channel for those who run part of the group. Implies members. |
| `slug` | `string` | Yes | Lowercase letters, digits and dashes; its address within the site. |
| `tabs` | `array` | Yes |  |

### `fyi.opensocial.site#file`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `file` | `blob` | Yes |  |
| `path` | `string` | Yes |  |

### `fyi.opensocial.site`

**Type**: `record`

A group's site, in its members space: channels of tabs, shown one at a time, each a whole HTML document drawn in a sandboxed frame. Authored by the group DID; written through putSite by whoever holds group.configure. Anyone else is handed only its public part, by the host. A group without one is shown the starter.

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channels` | `array` | Yes |  |
| `files` | `array` | Yes | Everything the site is made of, by path. A tab's page is `<channel>/<tab>.html`, or `<channel>/<tab>/index.html` with what it uses beside it; `site.css` is put in front of every tab. |
| `theme` | `ref` → `#theme` | No |  |
| `updatedAt` | `string` (datetime) | Yes |  |

### `fyi.opensocial.site#tab`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `about` | `string` | No | The one thing it is for, which its page shows: an event's or a chat room's URI in one of the group's spaces, a board's space, or a member's DID. Its tab comes and goes with it. |
| `appviews` | `array` | No | The app servers it reads for the viewer, by the start of their methods' names. Bluesky's, for app.bsky, needs no naming. |
| `asGroup` | `array` | No | What it writes as the group rather than as the viewer, and the kind of space each goes in. |
| `calls` | `array` | No | The methods it may call for the viewer: the host's, and an app server's, like Bluesky's. |
| `cid` | `string` (cid) | No | With a template URI: that version only. |
| `labels` | `array` | No | Its words for what it lets people do, by record kind or method. |
| `members` | `boolean` | No | Shown to members only. |
| `network` | `array` | No | Collections it reads from everyone on the network who writes them, not only the group and its members: the host keeps each one whole from when the site is saved, and won't save one more accounts write than it can keep. |
| `page` | `string` | No | One of the site's files to show, which tabs alike share (every event's tab, say). Read before the tab's own file and its template. |
| `reads` | `array` | No | The collections it may read from the group, its members and its spaces. |
| `roles` | `array` | No | For members with one of these roles, by the group's role ids. Others don't see it, or its tab. Members only. |
| `slug` | `string` | Yes |  |
| `template` | `string` | No | Drawn from a template when the site has no page of its own for it: a bundled one by name, a fyi.opensocial.template by URI, or a member's fyi.opensocial.page by its URI in the group's space for members' work. A member's page is only ever drawn for members. |
| `title` | `string` | No |  |
| `writes` | `array` | No | The collections it may write for the viewer, in their account or one of the group's spaces. |

### `fyi.opensocial.site#theme`

**Type**: `object`

Colours, fonts and corners as CSS values, and what sits behind the tabs.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `accent` | `string` | No |  |
| `accentInk` | `string` | No |  |
| `bg` | `string` | No |  |
| `fontBody` | `string` | No |  |
| `fontDisplay` | `string` | No |  |
| `ink` | `string` | No |  |
| `line` | `string` | No |  |
| `muted` | `string` | No |  |
| `radius` | `string` | No |  |
| `surface` | `string` | No |  |
| `wallpaper` | `string` | No | A built-in wallpaper by name, `banner` for the group's banner, or the path of an image in the site's files. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "appview": {
      "description": "An app server a tab reads for the viewer: what its methods' names start with, and the service, by DID and id.",
      "properties": {
        "prefix": {
          "description": "social.grain",
          "maxLength": 253,
          "type": "string"
        },
        "service": {
          "description": "did:web:grain.social#grain_appview",
          "maxLength": 2048,
          "type": "string"
        }
      },
      "required": [
        "prefix",
        "service"
      ],
      "type": "object"
    },
    "channel": {
      "properties": {
        "front": {
          "description": "The site's front page, drawn across the whole window with nothing around it, at every path at the group's address but the channels' (/c/<channel>/<tab>). Members land in the channels at the address itself, and see it at any other of its paths. One tab at most, and one anyone may see.",
          "type": "boolean"
        },
        "members": {
          "description": "Shown to members only.",
          "type": "boolean"
        },
        "name": {
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "roles": {
          "description": "Shown only to members with one of these roles, by the group's role ids: a channel for those who run part of the group. Implies members.",
          "items": {
            "maxLength": 128,
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        },
        "slug": {
          "description": "Lowercase letters, digits and dashes; its address within the site.",
          "maxLength": 64,
          "type": "string"
        },
        "tabs": {
          "items": {
            "ref": "#tab",
            "type": "ref"
          },
          "maxLength": 50,
          "type": "array"
        }
      },
      "required": [
        "slug",
        "tabs"
      ],
      "type": "object"
    },
    "file": {
      "properties": {
        "file": {
          "maxSize": 5000000,
          "type": "blob"
        },
        "path": {
          "maxLength": 512,
          "type": "string"
        }
      },
      "required": [
        "path",
        "file"
      ],
      "type": "object"
    },
    "main": {
      "description": "A group's site, in its members space: channels of tabs, shown one at a time, each a whole HTML document drawn in a sandboxed frame. Authored by the group DID; written through putSite by whoever holds group.configure. Anyone else is handed only its public part, by the host. A group without one is shown the starter.",
      "key": "literal:self",
      "record": {
        "properties": {
          "channels": {
            "items": {
              "ref": "#channel",
              "type": "ref"
            },
            "maxLength": 50,
            "type": "array"
          },
          "files": {
            "description": "Everything the site is made of, by path. A tab's page is `<channel>/<tab>.html`, or `<channel>/<tab>/index.html` with what it uses beside it; `site.css` is put in front of every tab.",
            "items": {
              "ref": "#file",
              "type": "ref"
            },
            "maxLength": 500,
            "type": "array"
          },
          "theme": {
            "ref": "#theme",
            "type": "ref"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "channels",
          "files",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "tab": {
      "properties": {
        "about": {
          "description": "The one thing it is for, which its page shows: an event's or a chat room's URI in one of the group's spaces, a board's space, or a member's DID. Its tab comes and goes with it.",
          "maxLength": 512,
          "type": "string"
        },
        "appviews": {
          "description": "The app servers it reads for the viewer, by the start of their methods' names. Bluesky's, for app.bsky, needs no naming.",
          "items": {
            "ref": "fyi.opensocial.site#appview",
            "type": "ref"
          },
          "maxLength": 10,
          "type": "array"
        },
        "asGroup": {
          "description": "What it writes as the group rather than as the viewer, and the kind of space each goes in.",
          "items": {
            "ref": "fyi.opensocial.template#asGroup",
            "type": "ref"
          },
          "type": "array"
        },
        "calls": {
          "description": "The methods it may call for the viewer: the host's, and an app server's, like Bluesky's.",
          "items": {
            "format": "nsid",
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        },
        "cid": {
          "description": "With a template URI: that version only.",
          "format": "cid",
          "type": "string"
        },
        "labels": {
          "description": "Its words for what it lets people do, by record kind or method.",
          "items": {
            "ref": "fyi.opensocial.template#label",
            "type": "ref"
          },
          "type": "array"
        },
        "members": {
          "description": "Shown to members only.",
          "type": "boolean"
        },
        "network": {
          "description": "Collections it reads from everyone on the network who writes them, not only the group and its members: the host keeps each one whole from when the site is saved, and won't save one more accounts write than it can keep.",
          "items": {
            "format": "nsid",
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        },
        "page": {
          "description": "One of the site's files to show, which tabs alike share (every event's tab, say). Read before the tab's own file and its template.",
          "maxLength": 256,
          "type": "string"
        },
        "reads": {
          "description": "The collections it may read from the group, its members and its spaces.",
          "items": {
            "format": "nsid",
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        },
        "roles": {
          "description": "For members with one of these roles, by the group's role ids. Others don't see it, or its tab. Members only.",
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        },
        "slug": {
          "maxLength": 64,
          "type": "string"
        },
        "template": {
          "description": "Drawn from a template when the site has no page of its own for it: a bundled one by name, a fyi.opensocial.template by URI, or a member's fyi.opensocial.page by its URI in the group's space for members' work. A member's page is only ever drawn for members.",
          "maxLength": 512,
          "type": "string"
        },
        "title": {
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "writes": {
          "description": "The collections it may write for the viewer, in their account or one of the group's spaces.",
          "items": {
            "format": "nsid",
            "type": "string"
          },
          "maxLength": 50,
          "type": "array"
        }
      },
      "required": [
        "slug"
      ],
      "type": "object"
    },
    "theme": {
      "description": "Colours, fonts and corners as CSS values, and what sits behind the tabs.",
      "properties": {
        "accent": {
          "maxLength": 200,
          "type": "string"
        },
        "accentInk": {
          "maxLength": 200,
          "type": "string"
        },
        "bg": {
          "maxLength": 200,
          "type": "string"
        },
        "fontBody": {
          "maxLength": 200,
          "type": "string"
        },
        "fontDisplay": {
          "maxLength": 200,
          "type": "string"
        },
        "ink": {
          "maxLength": 200,
          "type": "string"
        },
        "line": {
          "maxLength": 200,
          "type": "string"
        },
        "muted": {
          "maxLength": 200,
          "type": "string"
        },
        "radius": {
          "maxLength": 200,
          "type": "string"
        },
        "surface": {
          "maxLength": 200,
          "type": "string"
        },
        "wallpaper": {
          "description": "A built-in wallpaper by name, `banner` for the group's banner, or the path of an image in the site's files.",
          "maxLength": 512,
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "id": "fyi.opensocial.site",
  "lexicon": 1
}
```
