{"id":"3c0a37c5a9433f61594812c119a41a62c9c7e90327de79a443aceff57e18231a","pubkey":"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1","created_at":1788018412,"kind":30817,"tags":[["d","nkbip-01"],["title","Curated Publications"],["summary","Specification for Nostr ebooks, magazines, and other curated publications."],["k","30040"],["k","30041"],["t","publication"],["t","ebook"],["t","magazines"],["client","imwald"]],"content":"# NKBIP-01: Curated Publications\n\nThis NIP defines the minimum specification for curated publications—ordered, optionally hierarchical assemblies of Nostr events. Publications provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles.\n\n## Event Kinds\n\nThis NIP defines two primary event kinds:\n\n- **30040:** Publication Index\n- **30041:** Publication Content\n\n## KIND 30040: Publication Index\n\nA publication index defines the structure and metadata of a publication. It serves as a table of contents that references the actual content sections.\n\n### Requirements\n\n- The `content` field MUST be empty\n- MUST include a `title` tag containing the full title of the publication\n- MUST be uniquely identifiable by the combination of:\n  - `d` tag (normalized to lowercase letters, numbers, and hyphens, analogous to NIP-54)\n  - `pubkey`\n  - `kind`\n- Any included `a` tags MUST be listed in desired display order (a 30040 with no `a` tags is a valid stub index)\n  - Format:\n\n```json\n[\"a\", \"<kind:pubkey:dtag>\", \"<relay hint>\", \"<event id>\"]\n```\n\n  - The optional event ID field enables version tracking while maintaining updatable references\n  - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices\n  - Additional event kinds MAY be supported, especially 30817, 30818, and 30023\n- For derivative works:\n  - MUST include a `p` tag identifying the original author\n  - MUST include a `E` tag referencing the original event immediately after the `p` tag\n- MAY contain the tag `author`, containing the full name of the author. It may also add the role the author took (for books with multiple authors).\n- MAY contain the tag `s` (formerly `source`), which defines a URL that contains the location of the original text, and/or an `i` tag.\n- MAY contain the tag `version`, which describes the edition.\n- MAY contain the tag `T`, which is the title-tag text, normalized like a d-tag\n- MAY contain the tag `N`, which is the author-tag text, normalized like a d-tag\n- MAY contain the tag `type`, which indicates how the publication should be displayed in the viewer/reader. Some suggested types are:\n  - `book` (default)\n  - `illustrated`\n  - `magazine`\n  - `documentation`\n  - `academic`\n  - `blog`\n\n### Example Index\n\n```json\n{\n  \"id\": \"<event_id>\",\n  \"pubkey\": \"<event_originator_pubkey>\",\n  \"created_at\": 1725087283,\n  \"kind\": 30040,\n  \"tags\": [\n    [\"d\", \"aesops-fables-by-aesop\"],\n    [\"title\", \"Aesop's Fables\"],\n    [\"T\", \"aesops-fables\"],\n    [\"author\", \"Aesop\", \"author\"],\n    [\"author\", \"James Black\", \"translator\"],\n    [\"N\", \"aesop\"],\n    [\"N\", \"james-black\"],\n    [\"i\", \"isbn:9780765382030\"],\n    [\"i\", \"openlibrary:OL45883W\"],\n    [\"i\", \"wikidata:Q188371\"],\n    [\"i\", \"overdrive:550e8400-e29b-41d4-a716-446655440000\"],\n    [\"i\", \"wikipedia:en:Aesop's_Fables\"],\n    [\"i\", \"gutenberg:130\"],\n    [\"t\", \"fables\"],\n    [\"t\", \"classical\"],\n    [\"t\", \"literature\"],\n    [\"s\", \"https://www.gutenberg.org/ebooks/130a\"],\n    [\"type\", \"book\"],\n    [\"version\", \"3rd edition\"],\n    [\"published_on\", \"2003-05-13\"],\n    [\"published_by\", \"public domain\"],\n    [\"image\", \"https://imageserver.com/piclink.jpg\"],\n    [\"summary\", \"Collection of selected fables from the ancient Greek philosopher, known as Aesop.\"],\n    [\"a\", \"<kind:pubkey:dtag>\", \"<relay hint>\", \"<event id>\"],\n    [\"a\", \"<kind:pubkey:dtag>\", \"<relay hint>\", \"<event id>\"],\n    [\"p\", \"<pubkey_0>\"],\n    [\"E\", \"<original_event_id>\", \"<relay_url>\", \"<pubkey>\"]\n  ],\n  \"sig\": \"<event_signature>\"\n}\n```\n\n## KIND 30041: Publication Content\n\nAlso known as sections, zettels, episodes, or chapters — these contain the actual content that makes up a publication.\n\n### Requirements\n\n- MUST include a `d` tag\n- MUST include a `title` tag describing the section (e.g., \"Introduction\", \"Chapter 1\", etc.)\n- MAY include a `T` tag, containing the title tag text, normalized like a d-tag\n- The `content` field:\n  - MUST contain text meant for display to the end user\n  - MAY contain AsciiDoc markup\n  - MAY contain wikilinks (denoted by double brackets)\n\n### Example Section\n\n```json\n{\n  \"id\": \"<event_id>\",\n  \"pubkey\": \"8ae74c618a4713f32129...\",\n  \"created_at\": 1708083476,\n  \"kind\": 30041,\n  \"tags\": [\n    [\"title\", \"The Farmer and The Snake\"],\n    [\"T\", \"the-farmer-and-the-snake\"],\n    [\"d\", \"aesops-fables-by-aesop-the-farmer-and-the-snake\"]\n  ],\n  \"content\": \"The Farmer and The Snake\\nA fable, by [[Aesop]].\\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. 'Oh,' cried the Farmer with his last breath, 'I am rightly served for pitying a scoundrel.'\\nThe greatest kindness will not bind the ungrateful.\",\n  \"sig\": \"49cab8c75fb35cec71d07258...\"\n}\n```\n\n## Extensions\n\nPublications are flexible and can be extended for different types of content. Examples include:\n\n- Books\n- Academic journals\n- Course materials\n- Documentation\n- Blogs/Magazines, including those from different npubs. These utilize kind 30023 as leaves, rather than kind 30041.\n\nAdditional tags relevant to the specific content type MAY be included in both index and section events.\n\n### Books\n\nA collection of publication e-books can be stored together using a \"bookshelf\" directory (kind `30045` from [[NKBIP-04]]). The default/top-level directory should have the d-tag \"my-book-collection\", with any additional directory folders nested within that one.\n\nBooks can be labeled with kind `1985` from [[NIP-32]], with the default label being \"booklist\".","sig":"cff6ba4887a5a329a9dd9e13720394866ac0a8092ad39ee10b182d3241ce66b48a4fc1598c81a01d72996dbe4842d1e1fb15a84671d999803543e1f00376cb70"}