{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rk9live.com/content/rk9live-content-1.schema.json",
  "title": "rk9live-content/1",
  "description": "Standardisiertes Inhaltsmodell von rk9live.com. Dieselbe Form liefert die statische Datei content/content.json und die API (GET /api/v1/export). Texte sind zweisprachig (de/en). Jede Entität hat eine unveränderliche ID mit Präfix, einen Status und eine Sichtbarkeit.",
  "type": "object",
  "required": [
    "schema",
    "updatedAt",
    "site",
    "profile",
    "channels",
    "items",
    "apps",
    "news",
    "merch",
    "partners",
    "collaborations",
    "events"
  ],
  "additionalProperties": false,
  "properties": {
    "schema": {
      "const": "rk9live-content/1"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "site": {
      "type": "object",
      "required": [
        "name",
        "domain",
        "defaultLang",
        "languages"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "defaultLang": {
          "$ref": "#/$defs/lang"
        },
        "languages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/lang"
          },
          "minItems": 1
        },
        "showPlaceholders": {
          "type": "boolean"
        },
        "api": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "profile": {
      "type": "object",
      "required": [
        "id",
        "name",
        "role",
        "tagline",
        "bio",
        "genres",
        "contact",
        "status",
        "visibility"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/idPRF"
        },
        "name": {
          "type": "string"
        },
        "person": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/i18n"
        },
        "tagline": {
          "$ref": "#/$defs/i18n"
        },
        "bio": {
          "$ref": "#/$defs/i18n"
        },
        "genres": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "location": {
          "$ref": "#/$defs/i18n"
        },
        "setup": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/i18n"
          }
        },
        "contact": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "email",
              "status"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "status": {
                "$ref": "#/$defs/status"
              },
              "note": {
                "$ref": "#/$defs/i18n"
              }
            }
          }
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "visibility": {
          "$ref": "#/$defs/visibility"
        }
      }
    },
    "channels": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "platform",
          "label",
          "url",
          "status",
          "visibility"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^CH-[a-z0-9-]+$"
          },
          "platform": {
            "$ref": "#/$defs/platform"
          },
          "label": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "purpose": {
            "$ref": "#/$defs/i18n"
          },
          "status": {
            "$ref": "#/$defs/status"
          },
          "visibility": {
            "$ref": "#/$defs/visibility"
          },
          "order": {
            "type": "integer"
          }
        }
      }
    },
    "items": {
      "type": "array",
      "description": "Veröffentlichter oder geplanter Content: Videos, Shorts, Posts, Tracks, Mixe, Sets, Releases, Artikel.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "type",
          "platform",
          "title",
          "status",
          "visibility"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/idCNT"
          },
          "type": {
            "enum": [
              "video",
              "short",
              "post",
              "track",
              "mix",
              "set",
              "release",
              "article",
              "stream"
            ]
          },
          "platform": {
            "$ref": "#/$defs/platform"
          },
          "title": {
            "$ref": "#/$defs/i18n"
          },
          "summary": {
            "$ref": "#/$defs/i18n"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "type": [
              "string",
              "null"
            ]
          },
          "series": {
            "type": [
              "string",
              "null"
            ]
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationSec": {
            "type": [
              "integer",
              "null"
            ]
          },
          "bpm": {
            "type": [
              "number",
              "null"
            ]
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/$defs/status"
          },
          "visibility": {
            "$ref": "#/$defs/visibility"
          },
          "source": {
            "type": "object",
            "description": "Herkunft, z. B. Creator-ERP-Variante: { \"creatorVariant\": \"VAR-000001\" }"
          }
        }
      }
    },
    "apps": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "version",
          "summary",
          "status",
          "visibility"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^APP-[a-z0-9-]+$"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "$ref": "#/$defs/i18n"
          },
          "repo": {
            "type": "string"
          },
          "status": {
            "$ref": "#/$defs/status"
          },
          "visibility": {
            "$ref": "#/$defs/visibility"
          }
        }
      }
    },
    "news": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "date",
          "title",
          "body",
          "status",
          "visibility"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/idNWS"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "$ref": "#/$defs/i18n"
          },
          "body": {
            "$ref": "#/$defs/i18n"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/$defs/status"
          },
          "visibility": {
            "$ref": "#/$defs/visibility"
          }
        }
      }
    },
    "merch": {
      "type": "object",
      "required": [
        "stores",
        "products"
      ],
      "properties": {
        "stores": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "name",
              "provider",
              "status",
              "visibility"
            ],
            "properties": {
              "id": {
                "$ref": "#/$defs/idMST"
              },
              "name": {
                "type": "string"
              },
              "provider": {
                "type": "string",
                "description": "z. B. placeholder, shopify, spreadshirt, printful, bandcamp"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "regions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "fulfilment": {
                "enum": [
                  "print-on-demand",
                  "stock",
                  "digital",
                  "dropship",
                  "other"
                ]
              },
              "summary": {
                "$ref": "#/$defs/i18n"
              },
              "status": {
                "$ref": "#/$defs/status"
              },
              "visibility": {
                "$ref": "#/$defs/visibility"
              }
            }
          }
        },
        "products": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "storeId",
              "name",
              "category",
              "price",
              "status",
              "visibility"
            ],
            "properties": {
              "id": {
                "$ref": "#/$defs/idMRP"
              },
              "storeId": {
                "$ref": "#/$defs/idMST"
              },
              "name": {
                "$ref": "#/$defs/i18n"
              },
              "category": {
                "enum": [
                  "apparel",
                  "accessory",
                  "print",
                  "digital",
                  "music",
                  "bundle",
                  "other"
                ]
              },
              "subcategory": {
                "type": "string"
              },
              "price": {
                "type": "object",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  }
                }
              },
              "sizes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "colors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "$ref": "#/$defs/status"
              },
              "visibility": {
                "$ref": "#/$defs/visibility"
              }
            }
          }
        }
      }
    },
    "partners": {
      "type": "object",
      "required": [
        "mediaKit",
        "types",
        "partners"
      ],
      "properties": {
        "mediaKit": {
          "type": "object",
          "required": [
            "id",
            "updatedAt",
            "audience",
            "reach",
            "formats",
            "pricing",
            "contact",
            "status",
            "visibility"
          ],
          "properties": {
            "id": {
              "type": "string",
              "pattern": "^MDK-[0-9]{6}$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date"
            },
            "audience": {
              "$ref": "#/$defs/i18n"
            },
            "reach": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "platform",
                  "followers",
                  "monthlyViews",
                  "asOf",
                  "status"
                ],
                "properties": {
                  "platform": {
                    "$ref": "#/$defs/platform"
                  },
                  "followers": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "monthlyViews": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "asOf": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "$ref": "#/$defs/status"
                  }
                }
              }
            },
            "formats": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "name",
                  "channels",
                  "status"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^FMT-[a-z0-9-]+$"
                  },
                  "name": {
                    "$ref": "#/$defs/i18n"
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "$ref": "#/$defs/status"
                  }
                }
              }
            },
            "pricing": {
              "type": "object",
              "required": [
                "model"
              ],
              "properties": {
                "model": {
                  "enum": [
                    "on-request",
                    "rate-card",
                    "revenue-share",
                    "free"
                  ]
                },
                "note": {
                  "$ref": "#/$defs/i18n"
                }
              }
            },
            "rules": {
              "$ref": "#/$defs/i18n"
            },
            "contact": {
              "type": "string",
              "format": "email"
            },
            "status": {
              "$ref": "#/$defs/status"
            },
            "visibility": {
              "$ref": "#/$defs/visibility"
            },
            "scope": {
              "$ref": "#/$defs/i18n",
              "description": "Geltung: allgemeine Konditionen; Verweis auf partnerspezifische Einträge"
            }
          }
        },
        "types": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^PRT-type-[a-z0-9-]+$"
              },
              "name": {
                "$ref": "#/$defs/i18n"
              },
              "description": {
                "$ref": "#/$defs/i18n"
              }
            }
          }
        },
        "partners": {
          "type": "array",
          "description": "Konkrete Partner (nur mit Zustimmung öffentlich).",
          "items": {
            "type": "object",
            "required": [
              "id",
              "name",
              "typeId",
              "status",
              "visibility"
            ],
            "properties": {
              "id": {
                "$ref": "#/$defs/idPRT"
              },
              "name": {
                "type": "string"
              },
              "typeId": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "since": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "summary": {
                "$ref": "#/$defs/i18n"
              },
              "status": {
                "$ref": "#/$defs/status"
              },
              "visibility": {
                "$ref": "#/$defs/visibility"
              },
              "conditions": {
                "$ref": "#/$defs/i18n",
                "description": "spezifische Konditionen dieses Partners (ergänzt das allgemeine Mediakit)"
              },
              "portal": {
                "type": "object",
                "description": "Partner-Portal: Link, über den der Partner Status-Updates und Nachrichten einstellt (WEB-0002, geplant)",
                "required": [
                  "status"
                ],
                "properties": {
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "$ref": "#/$defs/status"
                  },
                  "keyId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID des Partner-Schlüssels (nie der Schlüssel selbst)"
                  }
                }
              },
              "contact": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "collaborations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "partner",
          "title",
          "status",
          "visibility"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/idCOL"
          },
          "kind": {
            "enum": [
              "track",
              "remix",
              "set",
              "video",
              "stream",
              "event",
              "product",
              "other"
            ]
          },
          "partner": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "title": {
            "$ref": "#/$defs/i18n"
          },
          "summary": {
            "$ref": "#/$defs/i18n"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/$defs/status"
          },
          "visibility": {
            "$ref": "#/$defs/visibility"
          }
        }
      }
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "title",
          "date",
          "status",
          "visibility"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/idEVT"
          },
          "title": {
            "$ref": "#/$defs/i18n"
          },
          "date": {
            "type": "string"
          },
          "venue": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "enum": [
              "club",
              "festival",
              "stream",
              "release-party",
              "other"
            ]
          },
          "status": {
            "$ref": "#/$defs/status"
          },
          "visibility": {
            "$ref": "#/$defs/visibility"
          }
        }
      }
    }
  },
  "$defs": {
    "lang": {
      "enum": [
        "de",
        "en"
      ]
    },
    "i18n": {
      "type": "object",
      "required": [
        "de",
        "en"
      ],
      "properties": {
        "de": {
          "type": "string"
        },
        "en": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "enum": [
        "placeholder",
        "planned",
        "draft",
        "published",
        "archived"
      ],
      "description": "placeholder = Beispiel/Struktur; planned = vorgesehen; draft = in Arbeit; published = live; archived = nicht mehr aktiv"
    },
    "visibility": {
      "enum": [
        "public",
        "partners",
        "private"
      ],
      "description": "public = Seite und API; partners = nur mit Partner-Schlüssel; private = nie ausgeliefert"
    },
    "platform": {
      "enum": [
        "youtube",
        "tiktok",
        "instagram",
        "soundcloud",
        "spotify",
        "bandcamp",
        "twitch",
        "apple-music",
        "beatport",
        "shop",
        "site",
        "other"
      ]
    },
    "idPRF": {
      "type": "string",
      "pattern": "^PRF-[0-9]{6}$"
    },
    "idCNT": {
      "type": "string",
      "pattern": "^CNT-[0-9]{6}$"
    },
    "idNWS": {
      "type": "string",
      "pattern": "^NWS-[0-9]{6}$"
    },
    "idMST": {
      "type": "string",
      "pattern": "^MST-[0-9]{6}$"
    },
    "idMRP": {
      "type": "string",
      "pattern": "^MRP-[0-9]{6}$"
    },
    "idPRT": {
      "type": "string",
      "pattern": "^PRT-[0-9]{6}$"
    },
    "idCOL": {
      "type": "string",
      "pattern": "^COL-[0-9]{6}$"
    },
    "idEVT": {
      "type": "string",
      "pattern": "^EVT-[0-9]{6}$"
    }
  }
}
