{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://capp.local/schemas/capp.showroom.developer.v1.schema.json",
  "title": "cApp Showroom Publisher Profile v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "protocol",
    "id",
    "identity",
    "focus",
    "opportunity",
    "links",
    "repository",
    "updatedAt"
  ],
  "properties": {
    "protocol": {
      "const": "capp.showroom.developer.v1"
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180,
      "pattern": "^[a-z0-9._:-]+$"
    },
    "identity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "displayName",
        "githubOwner"
      ],
      "properties": {
        "kind": {
          "enum": [
            "individual",
            "studio",
            "team"
          ]
        },
        "displayName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "githubOwner": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "pattern": "^[A-Za-z0-9_.-]+$"
        },
        "headline": {
          "type": "string",
          "maxLength": 180
        },
        "location": {
          "type": "string",
          "maxLength": 120
        },
        "bio": {
          "type": "string",
          "maxLength": 700
        },
        "story": {
          "type": "string",
          "maxLength": 6000
        }
      }
    },
    "focus": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "specialties": {
          "type": "array",
          "maxItems": 12,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        },
        "sectors": {
          "type": "array",
          "maxItems": 12,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        },
        "stack": {
          "type": "array",
          "maxItems": 24,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        }
      }
    },
    "opportunity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "status": {
          "enum": [
            "building",
            "open-to-work",
            "consulting",
            "raising",
            "acquisition-open",
            "partnerships",
            "hiring",
            "heads-down"
          ]
        },
        "seeking": {
          "type": "array",
          "maxItems": 8,
          "uniqueItems": true,
          "items": {
            "enum": [
              "customers",
              "investment",
              "acquisition",
              "partnership",
              "licensing",
              "talent",
              "cofounder",
              "hiring"
            ]
          }
        },
        "headline": {
          "type": "string",
          "maxLength": 180
        },
        "note": {
          "type": "string",
          "maxLength": 1200
        }
      }
    },
    "proof": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "label",
          "value"
        ],
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "note": {
            "type": "string",
            "maxLength": 280
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^https://"
          }
        }
      }
    },
    "media": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "avatarUrl": {
          "type": "string",
          "maxLength": 2000,
          "pattern": "^https://raw\\.githubusercontent\\.com/"
        },
        "bannerUrl": {
          "type": "string",
          "maxLength": 2000,
          "pattern": "^https://raw\\.githubusercontent\\.com/"
        }
      }
    },
    "links": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "githubUrl": {
          "type": "string",
          "maxLength": 2000,
          "pattern": "^https://"
        },
        "websiteUrl": {
          "type": "string",
          "maxLength": 2000,
          "pattern": "^https://"
        },
        "contactUrl": {
          "type": "string",
          "maxLength": 2000,
          "pattern": "^https://"
        }
      }
    },
    "updates": {
      "type": "array",
      "maxItems": 24,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "type",
          "title",
          "publishedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[a-z0-9._-]+$"
          },
          "type": {
            "enum": [
              "shipped",
              "milestone",
              "building",
              "looking-for",
              "announcement",
              "note"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "body": {
            "type": "string",
            "maxLength": 1400
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "pattern": "^https://"
          },
          "productId": {
            "type": "string",
            "maxLength": 180
          },
          "publishedAt": {
            "type": "string",
            "maxLength": 120
          }
        }
      }
    },
    "repository": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "fullName",
        "branch"
      ],
      "properties": {
        "fullName": {
          "type": "string",
          "maxLength": 240,
          "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
        },
        "branch": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        }
      }
    },
    "publishedAt": {
      "type": "string",
      "maxLength": 120
    },
    "updatedAt": {
      "type": "string",
      "maxLength": 120
    }
  }
}
