{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://manhdev.click/manhdev.schema.json",
  "title": "manhdev.json",
  "description": "Product manifest read by manhdev.click from the root of a product repository.",
  "type": "object",
  "required": ["tagline", "description"],
  "additionalProperties": false,
  "properties": {
    "$schema": { "type": "string" },
    "tagline": { "type": "string", "description": "One line under the product name." },
    "description": { "type": "string", "description": "A short paragraph shown on the home page and at the top of the project page." },
    "overview": { "type": "array", "items": { "type": "string" }, "description": "Longer paragraphs shown only on the project page." },
    "features": {
      "type": "array",
      "items": { "type": "object", "required": ["title", "body"], "additionalProperties": false, "properties": { "title": { "type": "string" }, "body": { "type": "string" } } }
    },
    "requirements": { "type": "string" },
    "price": { "type": "string", "description": "Price in the \"At a glance\" box. Defaults to \"Free\"." },
    "site": { "type": "string", "format": "uri", "description": "Product website. Defaults to the repository homepage on GitHub." },
    "links": { "type": "array", "items": { "$ref": "#/definitions/link" } },
    "screenshot": { "$ref": "#/definitions/image", "description": "Hero image." },
    "gallery": { "type": "array", "items": { "$ref": "#/definitions/image" } },
    "categories": { "type": "array", "items": { "type": "string" } },
    "downloadsHeading": { "type": "string", "description": "Heading of the downloads block, e.g. \"Use it now\". Defaults to \"Download\"." },
    "downloads": { "type": "array", "items": { "$ref": "#/definitions/download" } },
    "packageManagers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["platform", "label", "command"],
        "additionalProperties": false,
        "properties": { "platform": { "$ref": "#/definitions/platform" }, "label": { "type": "string" }, "command": { "type": "string" } }
      }
    },
    "docs": {
      "type": "array",
      "description": "Markdown pages to publish under the product. Defaults to PRIVACY.md and SUPPORT.md in the repository root when they exist.",
      "items": {
        "type": "object",
        "required": ["slug", "title", "file"],
        "additionalProperties": false,
        "properties": {
          "slug": { "type": "string", "pattern": "^[a-z0-9-]+$", "description": "URL segment, e.g. \"privacy\"." },
          "title": { "type": "string", "description": "Link label, e.g. \"Privacy policy\"." },
          "file": { "type": "string", "description": "Path in the repository, e.g. \"PRIVACY.md\"." }
        }
      }
    },
    "version": { "type": "string", "description": "Shown when the repository has no GitHub release." },
    "tagPrefix": { "type": "string", "description": "Prefix stripped from release tags when shown, e.g. \"ext-\"." }
  },
  "definitions": {
    "platform": { "type": "string", "enum": ["windows", "macos", "linux", "android", "ios", "tvos", "visionos", "web", "chrome"] },
    "link": {
      "type": "object",
      "required": ["label", "href"],
      "additionalProperties": false,
      "properties": { "label": { "type": "string" }, "href": { "type": "string" }, "external": { "type": "boolean" } }
    },
    "image": {
      "type": "object",
      "required": ["src", "alt"],
      "additionalProperties": false,
      "properties": {
        "src": { "type": "string", "description": "Path inside the repository (docs/img.png), a path on manhdev.click (/images/…) or an https URL." },
        "dark": { "type": "string", "description": "Variant shown in dark mode." },
        "alt": { "type": "string" },
        "width": { "type": "integer", "minimum": 1, "description": "Optional: measured from the file when omitted." },
        "height": { "type": "integer", "minimum": 1 },
        "caption": { "type": "string" },
        "chrome": { "type": "boolean", "description": "false when the image already shows OS window controls." }
      }
    },
    "download": {
      "type": "object",
      "required": ["platform", "label", "sub"],
      "additionalProperties": false,
      "properties": {
        "platform": { "$ref": "#/definitions/platform" },
        "label": { "type": "string" },
        "sub": { "type": "string" },
        "asset": { "type": "string", "description": "Regex matched against the latest release's asset names." },
        "file": { "type": "string", "description": "File name template with {tag} and {version}, used when the asset list is unavailable." },
        "href": { "type": "string", "description": "Static link (stores, web). Defaults to the latest release page." },
        "external": { "type": "boolean" },
        "disabled": { "type": "boolean", "description": "Render as a \"coming soon\" tile." }
      }
    }
  }
}
