# ca.verworn.recipe

> Published by [daedalus.verworn.ca](https://lexicon.garden/identity/did:plc:pkukcba7utvxumdybkcocfhb)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pkukcba7utvxumdybkcocfhb/ca.verworn.recipe)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pkukcba7utvxumdybkcocfhb/ca.verworn.recipe/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pkukcba7utvxumdybkcocfhb/ca.verworn.recipe/examples)

## Definitions

### `ca.verworn.recipe`

**Type**: `record`

A cooking recipe stored in the author's repository.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tags` | `array` | No | Free-form tags for the author's own organization. |
| `image` | `blob` | No | Photo of the finished dish. |
| `notes` | `string` | No | Additional remarks, substitutions, or variations. |
| `title` | `string` | Yes | Name of the recipe; can not be empty. |
| `yield` | `string` | No | Free-form yield, for recipes not measured in servings (eg, '24 cookies'). |
| `course` | `string` | No | Which part of a meal the recipe is for. |
| `rating` | `integer` | No | The author's own rating of the recipe, from 1 to 5 stars. |
| `source` | `ref` → `#source` | No | Where the recipe came from, if it is not original. |
| `cuisine` | `string` | No | Culinary tradition the recipe belongs to (eg, 'Japanese'). |
| `cookTime` | `integer` | No | Active cooking time, in minutes. |
| `prepTime` | `integer` | No | Hands-on preparation time, in minutes. |
| `servings` | `integer` | No | Number of servings the recipe yields. |
| `createdAt` | `string` (datetime) | Yes | Client-declared timestamp when this recipe was first created. |
| `totalTime` | `integer` | No | Total time from start to finish, in minutes. May exceed prepTime plus cookTime when the recipe includes resting or marinating. |
| `updatedAt` | `string` (datetime) | No | Client-declared timestamp when this recipe was last edited. |
| `difficulty` | `string` | No | How demanding the recipe is to make. |
| `description` | `string` | No | Short summary or blurb about the recipe. |
| `ingredients` | `array` | Yes | Ingredients required, in the order they are used. |
| `instructions` | `array` | Yes | Ordered preparation steps. |
| `dietaryLabels` | `array` | No | Dietary properties of the finished dish. |

### `ca.verworn.recipe#source`

**Type**: `object`

Attribution for a recipe adapted from elsewhere.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (uri) | No | Link to the original recipe. |
| `name` | `string` | No | Who or what the recipe came from (eg, a cookbook or person). |

### `ca.verworn.recipe#ingredient`

**Type**: `object`

A single ingredient line.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The ingredient itself (eg, 'all-purpose flour'). |
| `note` | `string` | No | Preparation note for this ingredient (eg, 'finely chopped'). |
| `unit` | `string` | No | Unit of measure for the amount (eg, 'cup', 'g', 'tbsp'). |
| `group` | `string` | No | Optional heading grouping related ingredients (eg, 'For the sauce'). |
| `amount` | `string` | No | Quantity as written, kept as a string to allow fractions and ranges (eg, '1 1/2', '2-3'). |
| `optional` | `boolean` | No | Whether this ingredient can be left out. |

### `ca.verworn.recipe#instructionStep`

**Type**: `object`

A single step in the preparation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `text` | `string` | Yes | What to do in this step. |
| `group` | `string` | No | Optional heading grouping related steps (eg, 'Make the dough'). |

## Raw Schema

```json
{
  "id": "ca.verworn.recipe",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "title",
          "ingredients",
          "instructions",
          "createdAt"
        ],
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 640,
              "maxGraphemes": 64
            },
            "maxLength": 20,
            "description": "Free-form tags for the author's own organization."
          },
          "image": {
            "type": "blob",
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ],
            "maxSize": 2000000,
            "description": "Photo of the finished dish."
          },
          "notes": {
            "type": "string",
            "maxLength": 15000,
            "description": "Additional remarks, substitutions, or variations.",
            "maxGraphemes": 1500
          },
          "title": {
            "type": "string",
            "maxLength": 1200,
            "minLength": 1,
            "description": "Name of the recipe; can not be empty.",
            "maxGraphemes": 120
          },
          "yield": {
            "type": "string",
            "maxLength": 640,
            "description": "Free-form yield, for recipes not measured in servings (eg, '24 cookies').",
            "maxGraphemes": 64
          },
          "course": {
            "type": "string",
            "maxLength": 64,
            "description": "Which part of a meal the recipe is for.",
            "knownValues": [
              "appetizer",
              "breakfast",
              "brunch",
              "lunch",
              "dinner",
              "side",
              "salad",
              "soup",
              "dessert",
              "snack",
              "drink",
              "sauce",
              "bread"
            ]
          },
          "rating": {
            "type": "integer",
            "maximum": 5,
            "minimum": 1,
            "description": "The author's own rating of the recipe, from 1 to 5 stars."
          },
          "source": {
            "ref": "#source",
            "type": "ref",
            "description": "Where the recipe came from, if it is not original."
          },
          "cuisine": {
            "type": "string",
            "maxLength": 640,
            "description": "Culinary tradition the recipe belongs to (eg, 'Japanese').",
            "maxGraphemes": 64
          },
          "cookTime": {
            "type": "integer",
            "minimum": 0,
            "description": "Active cooking time, in minutes."
          },
          "prepTime": {
            "type": "integer",
            "minimum": 0,
            "description": "Hands-on preparation time, in minutes."
          },
          "servings": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of servings the recipe yields."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Client-declared timestamp when this recipe was first created."
          },
          "totalTime": {
            "type": "integer",
            "minimum": 0,
            "description": "Total time from start to finish, in minutes. May exceed prepTime plus cookTime when the recipe includes resting or marinating."
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Client-declared timestamp when this recipe was last edited."
          },
          "difficulty": {
            "type": "string",
            "maxLength": 64,
            "description": "How demanding the recipe is to make.",
            "knownValues": [
              "easy",
              "medium",
              "hard"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "description": "Short summary or blurb about the recipe.",
            "maxGraphemes": 500
          },
          "ingredients": {
            "type": "array",
            "items": {
              "ref": "#ingredient",
              "type": "ref"
            },
            "maxLength": 200,
            "minLength": 1,
            "description": "Ingredients required, in the order they are used."
          },
          "instructions": {
            "type": "array",
            "items": {
              "ref": "#instructionStep",
              "type": "ref"
            },
            "maxLength": 100,
            "minLength": 1,
            "description": "Ordered preparation steps."
          },
          "dietaryLabels": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64,
              "knownValues": [
                "vegetarian",
                "vegan",
                "gluten-free",
                "dairy-free",
                "nut-free",
                "egg-free",
                "halal",
                "kosher",
                "low-carb",
                "keto",
                "paleo"
              ]
            },
            "maxLength": 20,
            "description": "Dietary properties of the finished dish."
          }
        }
      },
      "description": "A cooking recipe stored in the author's repository."
    },
    "source": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "Link to the original recipe."
        },
        "name": {
          "type": "string",
          "maxLength": 2000,
          "description": "Who or what the recipe came from (eg, a cookbook or person).",
          "maxGraphemes": 200
        }
      },
      "description": "Attribution for a recipe adapted from elsewhere."
    },
    "ingredient": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 1000,
          "minLength": 1,
          "description": "The ingredient itself (eg, 'all-purpose flour').",
          "maxGraphemes": 100
        },
        "note": {
          "type": "string",
          "maxLength": 1000,
          "description": "Preparation note for this ingredient (eg, 'finely chopped').",
          "maxGraphemes": 100
        },
        "unit": {
          "type": "string",
          "maxLength": 320,
          "description": "Unit of measure for the amount (eg, 'cup', 'g', 'tbsp').",
          "maxGraphemes": 32
        },
        "group": {
          "type": "string",
          "maxLength": 640,
          "description": "Optional heading grouping related ingredients (eg, 'For the sauce').",
          "maxGraphemes": 64
        },
        "amount": {
          "type": "string",
          "maxLength": 320,
          "description": "Quantity as written, kept as a string to allow fractions and ranges (eg, '1 1/2', '2-3').",
          "maxGraphemes": 32
        },
        "optional": {
          "type": "boolean",
          "description": "Whether this ingredient can be left out."
        }
      },
      "description": "A single ingredient line."
    },
    "instructionStep": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 10000,
          "minLength": 1,
          "description": "What to do in this step.",
          "maxGraphemes": 1000
        },
        "group": {
          "type": "string",
          "maxLength": 640,
          "description": "Optional heading grouping related steps (eg, 'Make the dough').",
          "maxGraphemes": 64
        }
      },
      "description": "A single step in the preparation."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
