# app.studynext.socialProfile

> A user's StudyNext social profile and optional public activity summary. One record per user at rkey=self. PDS repository records are publicly readable; rankingOptIn is a product preference, not an access-control boundary.

- Kind: record
- Record key: literal:self
- Authority: studynext.app
- Lexicon: 1
- Published by [studynext.app](https://lexicon.garden/identity/did:plc:nstib2qjcu3tyun7cxz4dxcm), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.socialProfile)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.socialProfile/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.socialProfile/analytics)

## Record (`app.studynext.socialProfile`)

Type: record · key literal:self

### Properties

- `activity` (ref)
  - Reference: `#activity`
- `appearance` (ref, required)
  - Reference: `#appearance`
- `availability` (string, required)
  - Constraints: maxLength: 640
- `claimedQuests` (array, required)
  - Constraints: maxLength: 100
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 100
- `purpose` (string, required)
  - Constraints: maxLength: 1200
- `rankingOptIn` (boolean, required): Whether the user opts into StudyNext ranking and activity display. This flag does not make the PDS record private.
- `rankingUpdatedAt` (string · datetime)
- `subjects` (array, required)
  - Constraints: maxLength: 12
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 160
- `updatedAt` (string · datetime, required)
- `version` (integer, required)
  - Constraints: minimum: 1, maximum: 1

## #activity (`app.studynext.socialProfile#activity`)

Type: object

### Properties

- `completed` (integer, required)
  - Constraints: minimum: 0
- `date` (string, required): Calendar date in the user's local study timezone, formatted as YYYY-MM-DD; not a timestamp.
- `monthMinutes` (integer, required): Total minutes; each source study record is rounded to an integer minute before aggregation.
  - Constraints: minimum: 0
- `monthStart` (string, required): Local calendar date at the start of the summarized month, formatted as YYYY-MM-DD; not a timestamp.
- `planned` (integer, required)
  - Constraints: minimum: 0
- `streak` (integer, required)
  - Constraints: minimum: 0
- `weekMinutes` (integer, required): Total minutes; each source study record is rounded to an integer minute before aggregation.
  - Constraints: minimum: 0
- `weekStart` (string, required): Local calendar date at the start of the summarized week, formatted as YYYY-MM-DD; not a timestamp.

## #appearance (`app.studynext.socialProfile#appearance`)

Type: object

### Properties

- `badge` (string)
  - Constraints: maxLength: 100
- `frame` (string)
  - Constraints: maxLength: 100
- `title` (string)
  - Constraints: maxLength: 100

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "activity": {
      "properties": {
        "completed": {
          "minimum": 0,
          "type": "integer"
        },
        "date": {
          "description": "Calendar date in the user's local study timezone, formatted as YYYY-MM-DD; not a timestamp.",
          "type": "string"
        },
        "monthMinutes": {
          "description": "Total minutes; each source study record is rounded to an integer minute before aggregation.",
          "minimum": 0,
          "type": "integer"
        },
        "monthStart": {
          "description": "Local calendar date at the start of the summarized month, formatted as YYYY-MM-DD; not a timestamp.",
          "type": "string"
        },
        "planned": {
          "minimum": 0,
          "type": "integer"
        },
        "streak": {
          "minimum": 0,
          "type": "integer"
        },
        "weekMinutes": {
          "description": "Total minutes; each source study record is rounded to an integer minute before aggregation.",
          "minimum": 0,
          "type": "integer"
        },
        "weekStart": {
          "description": "Local calendar date at the start of the summarized week, formatted as YYYY-MM-DD; not a timestamp.",
          "type": "string"
        }
      },
      "required": [
        "date",
        "weekStart",
        "monthStart",
        "weekMinutes",
        "monthMinutes",
        "streak",
        "completed",
        "planned"
      ],
      "type": "object"
    },
    "appearance": {
      "properties": {
        "badge": {
          "maxLength": 100,
          "type": "string"
        },
        "frame": {
          "maxLength": 100,
          "type": "string"
        },
        "title": {
          "maxLength": 100,
          "type": "string"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "A user's StudyNext social profile and optional public activity summary. One record per user at rkey=self. PDS repository records are publicly readable; rankingOptIn is a product preference, not an access-control boundary.",
      "key": "literal:self",
      "record": {
        "properties": {
          "activity": {
            "ref": "#activity",
            "type": "ref"
          },
          "appearance": {
            "ref": "#appearance",
            "type": "ref"
          },
          "availability": {
            "maxLength": 640,
            "type": "string"
          },
          "claimedQuests": {
            "items": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            },
            "maxLength": 100,
            "type": "array"
          },
          "purpose": {
            "maxLength": 1200,
            "type": "string"
          },
          "rankingOptIn": {
            "description": "Whether the user opts into StudyNext ranking and activity display. This flag does not make the PDS record private.",
            "type": "boolean"
          },
          "rankingUpdatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "subjects": {
            "items": {
              "maxLength": 160,
              "minLength": 1,
              "type": "string"
            },
            "maxLength": 12,
            "type": "array"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "version": {
            "maximum": 1,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "version",
          "subjects",
          "availability",
          "purpose",
          "claimedQuests",
          "appearance",
          "rankingOptIn",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.socialProfile",
  "lexicon": 1
}
```
