{
  "openapi": "3.1.0",
  "info": {
    "title": "School Derby public surface",
    "version": "0.1.0",
    "description": "Discoverable human routes for School Derby (static SPA). Auth areas require a signed-in session. There is no public unauthenticated write API in v0. For agent guidance see https://schoolderby.com/llms.txt",
    "contact": {
      "name": "School Derby",
      "url": "https://schoolderby.com"
    }
  },
  "servers": [
    {
      "url": "https://schoolderby.com",
      "description": "Production"
    }
  ],
  "tags": [
    { "name": "public", "description": "No login required" },
    { "name": "auth", "description": "Requires account" }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": ["public"],
        "summary": "Peace Derby public page",
        "description": "Match hype, countdown, callout board, verified squads, ticket tiers when configured, stream links.",
        "operationId": "getHome",
        "responses": {
          "200": {
            "description": "HTML SPA shell (React app)"
          }
        }
      }
    },
    "/register": {
      "get": {
        "tags": ["public"],
        "summary": "Create account",
        "description": "Query role=student (default) or role=official for school sports masters / principals.",
        "operationId": "getRegister",
        "parameters": [
          {
            "name": "role",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["student", "official"]
            },
            "description": "Account type to create"
          }
        ],
        "responses": {
          "200": { "description": "Registration form" }
        }
      }
    },
    "/login": {
      "get": {
        "tags": ["public"],
        "summary": "Sign in",
        "operationId": "getLogin",
        "responses": {
          "200": { "description": "Login form" }
        }
      }
    },
    "/dashboard": {
      "get": {
        "tags": ["auth"],
        "summary": "School official dashboard",
        "description": "School setup, player registration with documents, match squad management.",
        "operationId": "getDashboard",
        "responses": {
          "200": { "description": "Dashboard (session required)" },
          "302": { "description": "Redirect to /login if unauthenticated" }
        }
      }
    },
    "/me": {
      "get": {
        "tags": ["auth"],
        "summary": "Student hub",
        "description": "School claim, sports, callouts, opt-in to play.",
        "operationId": "getStudentHub",
        "responses": {
          "200": { "description": "Student dashboard (session required)" }
        }
      }
    },
    "/admin": {
      "get": {
        "tags": ["auth"],
        "summary": "Admin console",
        "description": "Verify schools/players, stage matches, tickets, challenges. Admin role only.",
        "operationId": "getAdmin",
        "responses": {
          "200": { "description": "Admin UI" }
        }
      }
    },
    "/gate": {
      "get": {
        "tags": ["auth"],
        "summary": "Match-day gate roster",
        "description": "Photo roster for stadium staff. Admin access in v0.",
        "operationId": "getGate",
        "responses": {
          "200": { "description": "Gate roster UI" }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": ["public"],
        "summary": "LLM / agent briefing",
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "Plain-text agent instructions",
            "content": {
              "text/plain": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "tags": ["public"],
        "summary": "Agent discovery document",
        "operationId": "getAgentWellKnown",
        "responses": {
          "200": {
            "description": "JSON discovery metadata"
          }
        }
      }
    }
  }
}
