{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awesome-minimax-h3-cases.zzskysilent.com/schemas/tutorial-guide.json",
  "title": "MiniMax H3 Tutorial Guide",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "guideType",
    "contentType",
    "category",
    "title",
    "outcome",
    "audience",
    "hardware",
    "prerequisites",
    "steps",
    "commands",
    "caveats",
    "posterUrl",
    "tags",
    "relatedResourceIds",
    "source",
    "verifiedAt",
    "addedAt",
    "learningTrack",
    "depth",
    "evidence"
  ],
  "properties": {
    "guideType": {
      "enum": ["setup", "project", "reference"]
    },
    "contribution": {
      "type": "object",
      "additionalProperties": false,
      "required": ["issueUrl", "authorUrl"],
      "properties": {
        "issueUrl": { "type": "string", "format": "uri", "pattern": "^https://github\\.com/SkyNotSilent/awesome-[Mm]ini[Mm]ax-[Hh]3-cases/issues/[0-9]+$" },
        "authorUrl": { "type": "string", "format": "uri" }
      }
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "contentType": {
      "enum": [
        "foundation",
        "community"
      ]
    },
    "category": {
      "enum": [
        "getting-started",
        "comfyui",
        "prompt",
        "acceleration",
        "long-video",
        "audio",
        "training"
      ]
    },
    "title": {
      "$ref": "#/$defs/localizedText"
    },
    "outcome": {
      "$ref": "#/$defs/localizedText"
    },
    "audience": {
      "$ref": "#/$defs/localizedText"
    },
    "hardware": {
      "$ref": "#/$defs/localizedText"
    },
    "prerequisites": {
      "$ref": "#/$defs/localizedList"
    },
    "steps": {
      "$ref": "#/$defs/localizedList"
    },
    "commands": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "commandItems": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["kind", "value"],
        "properties": {
          "kind": { "enum": ["command", "path"] },
          "value": { "type": "string", "minLength": 1 },
          "platform": { "enum": ["shell", "windows", "macos", "linux"] },
          "cwd": { "type": "string" }
        }
      }
    },
    "checks": {
      "$ref": "#/$defs/localizedList"
    },
    "caveats": {
      "$ref": "#/$defs/localizedList"
    },
    "posterUrl": {
      "type": "string",
      "pattern": "^/tutorial-posters/"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "relatedResourceIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "platform",
        "url",
        "author",
        "originalLanguage"
      ],
      "properties": {
        "platform": {
          "enum": [
            "x",
            "youtube",
            "reddit",
            "github",
            "huggingface",
            "docs"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "author": {
          "type": "string",
          "minLength": 1
        },
        "authorProfileUrl": { "type": "string", "format": "uri" },
        "handle": {
          "type": "string"
        },
        "publishedAt": {
          "type": "string",
          "format": "date"
        },
        "originalLanguage": {
          "enum": [
            "zh",
            "en",
            "ja",
            "other"
          ]
        }
      }
    },
    "engagement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "snapshotAt"
      ],
      "properties": {
        "replies": {
          "type": "integer",
          "minimum": 0
        },
        "reposts": {
          "type": "integer",
          "minimum": 0
        },
        "likes": {
          "type": "integer",
          "minimum": 0
        },
        "views": {
          "type": "integer",
          "minimum": 0
        },
        "snapshotAt": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "verifiedAt": {
      "type": "string",
      "format": "date"
    },
    "flagship": {
      "type": "boolean"
    },
    "difficulty": {
      "enum": [
        "beginner",
        "intermediate",
        "advanced"
      ]
    },
    "estimatedMinutes": {
      "type": "integer",
      "minimum": 1
    },
    "hardwareProfiles": {
      "type": "array",
      "items": {
        "enum": [
          "apple-silicon",
          "vram-8",
          "vram-12",
          "vram-16",
          "vram-24-plus",
          "cloud-gpu"
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "testedVersions": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1
    },
    "expectedResult": {
      "$ref": "#/$defs/localizedText"
    },
    "troubleshooting": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "problem",
          "solution"
        ],
        "properties": {
          "problem": {
            "$ref": "#/$defs/localizedText"
          },
          "solution": {
            "$ref": "#/$defs/localizedText"
          }
        }
      }
    },
    "uninstall": {
      "$ref": "#/$defs/localizedList"
    },
    "original": {
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "capturedAt"],
      "properties": {
        "kind": { "enum": ["x-article", "x-thread", "markdown"] },
        "capturedAt": { "type": "string", "format": "date-time" }
      }
    },
    "sourceRefs": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "url"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "addedAt": {
      "type": "string",
      "format": "date-time"
    },
    "learningTrack": {
      "enum": [
        "run",
        "create"
      ]
    },
    "depth": {
      "enum": [
        "deep",
        "guide"
      ]
    },
    "recommendation": {
      "$ref": "#/$defs/localizedText"
    },
    "cost": {
      "$ref": "#/$defs/localizedText"
    },
    "applicableVersions": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "materialsNote": {
      "$ref": "#/$defs/localizedText"
    },
    "learningResources": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "label": {
            "$ref": "#/$defs/localizedText"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "kind": {
            "enum": [
              "workflow",
              "models",
              "material",
              "prompt",
              "demo",
              "documentation"
            ]
          }
        },
        "required": [
          "label",
          "url",
          "kind"
        ]
      }
    },
    "chapters": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "$ref": "#/$defs/localizedText"
          },
          "urlZh": { "type": "string", "format": "uri" },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "seconds": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "title",
          "url",
          "seconds"
        ]
      }
    },
    "communityFeedback": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "summary": {
            "$ref": "#/$defs/localizedText"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "kind": {
            "enum": [
              "usage",
              "issue",
              "fix",
              "praise"
            ]
          }
        },
        "required": [
          "summary",
          "url",
          "kind"
        ]
      }
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "sourceCheckedAt": {
          "type": "string",
          "format": "date"
        },
        "communityReviewedAt": {
          "type": "string",
          "format": "date"
        },
        "siteTestedAt": {
          "type": "string",
          "format": "date"
        },
        "siteTestUrl": {
          "type": "string",
          "format": "uri"
        },
        "basis": {
          "enum": [
            "official",
            "author-docs",
            "community"
          ]
        },
        "status": {
          "enum": [
            "active",
            "needs-review"
          ]
        }
      },
      "required": [
        "status"
      ]
    },
    "relatedCases": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "$ref": "#/$defs/localizedText"
          },
          "relationship": {
            "enum": [
              "example",
              "technique"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "relationship"
        ]
      }
    },
    "nextGuideIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "learningOrder": {
      "type": "integer",
      "minimum": 1
    }
  },
  "$defs": {
    "localizedText": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "zh",
        "en"
      ],
      "properties": {
        "zh": {
          "type": "string",
          "minLength": 1
        },
        "en": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "localizedList": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "zh",
        "en"
      ],
      "properties": {
        "zh": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "en": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        }
      }
    }
  }
}
