{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.connectsoft.ai/reference/schemas/blueprint-mobile.schema.json",
  "title": "Mobile Blueprint (blueprint-mobile-v1)",
  "description": "Descriptor document of the Mobile Blueprint kind (BC-02). Validated by BlueprintService; metadata per blueprint-common.schema.json; generation outputs and validation rules per model/blueprints.yaml.",
  "type": "object",
  "required": [
    "metadata",
    "template",
    "platforms",
    "screens"
  ],
  "additionalProperties": false,
  "properties": {
    "metadata": {
      "$ref": "blueprint-common.schema.json#/$defs/Metadata"
    },
    "template": {
      "type": "object",
      "required": [
        "id",
        "version"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "platforms": {
      "type": "array",
      "items": {
        "enum": [
          "ios",
          "android",
          "windows"
        ]
      }
    },
    "screens": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "offline"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "offline": {
            "enum": [
              "none",
              "read-cache",
              "queue-writes"
            ]
          },
          "readModels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commands": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "via"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "via": {
            "enum": [
              "connector",
              "identity",
              "platform"
            ]
          }
        },
        "additionalProperties": false
      }
    }
  }
}
