nostr-protocol / nips

Nostr Implementation Possibilities
2.38k stars 576 forks source link

Food Recipe Event Specification #1571

Open Anderson-Juhasc opened 10 hours ago

Anderson-Juhasc commented 10 hours ago

Summary

This proposal defines a new event kind for Nostr to represent and share food recipe metadata. It aims to provide a standardized format for storing and transmitting information about food recipe within the Nostr network.

Kind: XXXX

Event Structure

The event structure follows the standard Nostr event format, customized for food recipe using tags to store metadata.

{
  "id": "<event_id>",
  "pubkey": "<author_pubkey>",
  "created_at": <unix_timestamp>,
  "kind": XXXX,
  "tags": [
    ["title", "<recipe_title>"],
    ["summary", "<recipe_summary>"],
    ["author", "<recipe_author>"],
    ["cuisine", "<style_or_region_of_cuisine>"],
    ["category", "<category>"],
    ["ingredients", "<ingredients_description>"],
    ["image", "<image_url>"], // can be used more than one

    // Optional Tags
    ["prep_time", "<prep_time>"],
    ["cook_time", "<cook_time>"],
    ["servings", "<servings_number>"],
    ["difficulty", "<difficulty>"],
    ["nutrition", "<calories_per_serving>"],
    ["tags", "<comma_separated_tags>"],
    ["allergens", "<comma_separated_allergens>"],
    ["content_warning", "<content_warning_description>"],
  ],
  "content": "<description_instructions_and_notes_content>",
  "sig": "<signature>"
}

Tag Descriptions

Optional Tags
fiatjaf commented 9 hours ago

Looks good, but I would remove notes and instructions and leave that for the body of the event, as Markdown probably, to be written in any style or manner is desired. And also take some of these other tags, like nutrition, allergens, cook_time and servings and place them separatedly to make sure they are strictly optional.