30817:app-stacks

App Stacks

Zapstore

published
2026-10-03

NIP-A5

App Stacks

draft optional

This NIP defines kind 30267 for creating named collections of software applications. App stacks allow users to organize Software Application events (kind 32267) into curated groups such as "Developer Tools", "Social Apps", or "Games".

App stacks are addressable events that support both public and private app references, following the encryption patterns established in NIP-51.

Event Format

{
  "kind": 30267,
  "content": "<optional encrypted JSON array of private app references>",
  "tags": [
    // REQUIRED
    // Unique identifier for this app stack
    ["d", "<identifier>"],

    // REQUIRED
    // Human-readable name for the app stack
    ["name", "<app-stack-name>"],

    // OPTIONAL
    // Plain text description (no markdown)
    ["description", "<description>"],

    // REQUIRED
    // Platform this app stack is curated for
    // See NIP-82 Appendix A for platform identifiers
    ["f", "<platform-identifier>"],

    // OPTIONAL, MULTIPLE
    // Public app references (addressable event coordinates)
    // Must reference kind 32267 Software Application events
    ["a", "32267:<pubkey>:<app-id>", "<relay-url-hint>"],

    // ...additional "a" tags for more public apps
  ]
}

Public vs Private App References

Public Apps

Public app references are stored in "a" tags in the event's tags array. Each "a" tag MUST reference a kind 32267 Software Application event using the addressable event coordinate format:

32267:<32-bytes lowercase hex pubkey>:<d-tag-value>

Private Apps

Private app references are stored in the event's content field as an encrypted JSON array of addressable event coordinates. The encryption follows NIP-44 using self-encryption (the shared key is computed using the author's own public and private key).

Before encryption, the content is a JSON array of strings:

["32267:pubkey1:app-id-1", "32267:pubkey2:app-id-2"]

This allows users to maintain private collections of apps that are not visible to others.

Tags

Tag Required Description
d Yes Unique identifier for the app stack
name Yes Human-readable display name
description No Plain text description of the app stack
f Yes Platform identifier (e.g., android-arm64-v8a, darwin-arm64)
a No Public app reference (kind 32267 coordinate)

The f tag specifies the platform this app stack is curated for. Clients MUST use it to filter and display apps appropriate for the user's platform. See NIP-82 Appendix A for standard platform identifiers.

Examples

Basic App Stack

A collection of Android development tools:

{
  "id": "789abc...",
  "pubkey": "def456...",
  "created_at": 1706644800,
  "kind": 30267,
  "tags": [
    ["d", "android-dev-tools"],
    ["name", "Android Developer Tools"],
    ["description", "Essential tools for Android development"],
    ["f", "android-arm64-v8a"],
    ["a", "32267:aabbcc...:com.example.android-studio"],
    ["a", "32267:ddeeff...:com.example.logcat-reader"]
  ],
  "content": "",
  "sig": "..."
}

App Stack with Private Apps

An app stack with both public and encrypted private app references:

{
  "id": "456def...",
  "pubkey": "abc123...",
  "created_at": 1706644800,
  "kind": 30267,
  "tags": [
    ["d", "my-apps"],
    ["name", "My Apps"],
    ["f", "darwin-arm64"],
    ["a", "32267:pubkey1:public-app-1"],
    ["a", "32267:pubkey2:public-app-2"]
  ],
  "content": "<NIP-44 encrypted JSON array>",
  "sig": "..."
}

The decrypted content would be:

["32267:pubkey3:private-app-1", "32267:pubkey4:private-app-2"]

Encryption Details

Private app references are encrypted using NIP-44 with self-encryption:

  • The encryption key is derived from the author's own keypair
  • The plaintext is a JSON-encoded array of addressable event coordinates
  • Only the author can decrypt their private app references

For backward compatibility with earlier implementations that may have used NIP-04, clients can detect the encryption scheme by checking for "iv" in the ciphertext and decrypting accordingly.

Relation to NIP-51

App stacks (kind 30267) are a specialized form of the sets defined in NIP-51. While NIP-51 defines the general concept of "App curation sets", this NIP provides the detailed specification for their structure and behavior, particularly around:

  • Required and optional tags
  • Mandatory platform targeting via the f tag
  • Private app references with self-encryption
  • Client implementation guidelines

Relation to NIP-82

App stacks reference Software Application events (kind 32267). Each "a" tag in an app stack points to a software application defined according to NIP-82. Clients displaying app stacks SHOULD resolve these references to show app metadata such as name, icon, and description.

Discussion

Connect a key to comment.