# space.dailygame.profile

> Published by [dailygame.space](https://lexicon.garden/identity/did:plc:ai5s6bbqotd4wbimmawo32zo)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ai5s6bbqotd4wbimmawo32zo/space.dailygame.profile)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ai5s6bbqotd4wbimmawo32zo/space.dailygame.profile/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ai5s6bbqotd4wbimmawo32zo/space.dailygame.profile/examples)

## Definitions

### `space.dailygame.profile`

**Type**: `record`

A user's daily-games profile. Singleton per repo (rkey = 'self').

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `games` | `array` | No | Game ids from the app catalog that the user plays. |
| `badges` | `array` | No | Badges the user has earned. Once earned, a badge stays earned. |
| `timezone` | `string` | No | IANA timezone name used to compute daily resets for this user. |
| `createdAt` | `string` (datetime) | Yes | When this profile record was first created. |
| `favorites` | `array` | No | Game ids that the user has favorited. Shown in a dedicated group on the home page. |
| `displayName` | `string` | No | Optional override of the user's Bluesky display name for this app. |
| `displayOrder` | `array` | No | Optional user-preferred ordering of game ids. |

### `space.dailygame.profile#badge`

**Type**: `object`

A user accomplishment. `id` is a stable identifier from the app's badge catalog; `earnedAt` is the date the user first met the criteria.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Badge id. Known values cover the app's published badge catalog; unknown values are accepted for forward compatibility. |
| `category` | `string` | No | Grouping used by the app UI. |
| `earnedAt` | `string` (datetime) | Yes | When the badge was first earned (date of earliest play that satisfied the criteria). |

## Examples

The following examples demonstrate valid data for this lexicon. [View all examples](https://lexicon.garden/lexicon/did:plc:ai5s6bbqotd4wbimmawo32zo/space.dailygame.profile/examples)

### Example 1 (`#main`)

**Description**: A populated profile singleton (rkey is always `self`). `games` is the set of game ids the user opts in to seeing on the home grid; `favorites` is the subset pinned to the top; `displayOrder` is an optional explicit ordering. `timezone` is an IANA name used to compute daily resets, and `badges` is the user's append-only achievement log — each entry references the inline `#badge` def with a stable id, an optional UI category, and the timestamp the criteria were first met.

```json
{
  "$type": "space.dailygame.profile",
  "games": [
    "wordle",
    "connections",
    "strands",
    "globle",
    "queens",
    "puzzmo-crossword"
  ],
  "badges": [
    {
      "id": "streak-10",
      "category": "streak",
      "earnedAt": "2026-04-15T07:30:00.000Z"
    },
    {
      "id": "category-expert-word",
      "category": "category-expert",
      "earnedAt": "2026-04-22T07:30:00.000Z"
    }
  ],
  "timezone": "America/Los_Angeles",
  "createdAt": "2026-03-01T18:00:00.000Z",
  "favorites": [
    "wordle",
    "connections"
  ],
  "displayName": "Daily Puzzler",
  "displayOrder": [
    "wordle",
    "connections",
    "strands",
    "globle",
    "queens",
    "puzzmo-crossword"
  ]
}
```

## Raw Schema

```json
{
  "id": "space.dailygame.profile",
  "defs": {
    "main": {
      "key": "literal:self",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "createdAt"
        ],
        "properties": {
          "games": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxLength": 256,
            "description": "Game ids from the app catalog that the user plays."
          },
          "badges": {
            "type": "array",
            "items": {
              "ref": "#badge",
              "type": "ref"
            },
            "maxLength": 256,
            "description": "Badges the user has earned. Once earned, a badge stays earned."
          },
          "timezone": {
            "type": "string",
            "maxLength": 128,
            "description": "IANA timezone name used to compute daily resets for this user."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this profile record was first created."
          },
          "favorites": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxLength": 256,
            "description": "Game ids that the user has favorited. Shown in a dedicated group on the home page."
          },
          "displayName": {
            "type": "string",
            "maxLength": 640,
            "description": "Optional override of the user's Bluesky display name for this app.",
            "maxGraphemes": 64
          },
          "displayOrder": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "maxLength": 256,
            "description": "Optional user-preferred ordering of game ids."
          }
        }
      },
      "description": "A user's daily-games profile. Singleton per repo (rkey = 'self')."
    },
    "badge": {
      "type": "object",
      "required": [
        "id",
        "earnedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 64,
          "description": "Badge id. Known values cover the app's published badge catalog; unknown values are accepted for forward compatibility.",
          "knownValues": [
            "streak-10",
            "streak-25",
            "streak-50",
            "streak-100",
            "streak-250",
            "streak-365",
            "games-10",
            "games-15",
            "games-20",
            "games-30",
            "games-50",
            "5x5",
            "10x10",
            "category-expert-word",
            "category-expert-logic",
            "category-expert-geography",
            "category-expert-trivia"
          ]
        },
        "category": {
          "type": "string",
          "description": "Grouping used by the app UI.",
          "knownValues": [
            "streak",
            "variety",
            "breadth",
            "category-expert"
          ]
        },
        "earnedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the badge was first earned (date of earliest play that satisfied the criteria)."
        }
      },
      "description": "A user accomplishment. `id` is a stable identifier from the app's badge catalog; `earnedAt` is the date the user first met the criteria."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
