# garden.goals.goal

> Published by [goals.garden](https://lexicon.garden/identity/did:plc:r4suwlt5zl7sexnfgmi3jctw)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:r4suwlt5zl7sexnfgmi3jctw/garden.goals.goal)
- [Documentation](https://lexicon.garden/lexicon/did:plc:r4suwlt5zl7sexnfgmi3jctw/garden.goals.goal/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:r4suwlt5zl7sexnfgmi3jctw/garden.goals.goal/examples)

## Definitions

### `garden.goals.goal`

**Type**: `record`

A goal to track daily completions for a year.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Display name of the goal |
| `year` | `integer` | Yes | Year this goal is tracked for |
| `piece` | `string` | No | Shape name or emoji for incomplete state |
| `goalId` | `string` | Yes | Unique identifier for the goal (UUID) |
| `pieceUrl` | `string` (uri) | No | Favicon URL for incomplete state |
| `createdAt` | `string` (datetime) | Yes | Timestamp when the goal was created |
| `pieceBlob` | `blob` | No | Uploaded image for incomplete state |
| `categories` | `array` | No | Array of category UUIDs this goal belongs to |
| `accentColor` | `string` | No | Preset name or hex color for incomplete state |
| `description` | `string` | No | Optional description of the goal |
| `targetCount` | `integer` | No | Target count for countable goals |
| `completedPiece` | `string` | No | Shape name or emoji for complete state |
| `completedPieceUrl` | `string` (uri) | No | Favicon URL for complete state |
| `completedPieceBlob` | `blob` | No | Uploaded image for complete state |
| `completedAccentColor` | `string` | No | Preset name or hex color for complete state |

## Raw Schema

```json
{
  "id": "garden.goals.goal",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "goalId",
          "name",
          "year",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Display name of the goal"
          },
          "year": {
            "type": "integer",
            "minimum": 1970,
            "description": "Year this goal is tracked for"
          },
          "piece": {
            "type": "string",
            "maxLength": 100,
            "description": "Shape name or emoji for incomplete state"
          },
          "goalId": {
            "type": "string",
            "maxLength": 64,
            "description": "Unique identifier for the goal (UUID)"
          },
          "pieceUrl": {
            "type": "string",
            "format": "uri",
            "description": "Favicon URL for incomplete state"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when the goal was created"
          },
          "pieceBlob": {
            "type": "blob",
            "accept": [
              "image/*"
            ],
            "maxSize": 1000000,
            "description": "Uploaded image for incomplete state"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Array of category UUIDs this goal belongs to"
          },
          "accentColor": {
            "type": "string",
            "maxLength": 50,
            "description": "Preset name or hex color for incomplete state"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Optional description of the goal"
          },
          "targetCount": {
            "type": "integer",
            "minimum": 1,
            "description": "Target count for countable goals"
          },
          "completedPiece": {
            "type": "string",
            "maxLength": 100,
            "description": "Shape name or emoji for complete state"
          },
          "completedPieceUrl": {
            "type": "string",
            "format": "uri",
            "description": "Favicon URL for complete state"
          },
          "completedPieceBlob": {
            "type": "blob",
            "accept": [
              "image/*"
            ],
            "maxSize": 1000000,
            "description": "Uploaded image for complete state"
          },
          "completedAccentColor": {
            "type": "string",
            "maxLength": 50,
            "description": "Preset name or hex color for complete state"
          }
        }
      },
      "description": "A goal to track daily completions for a year."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
