{
  "schemaVersion": 1,
  "status": "ok",
  "product": {
    "name": "pgpeek",
    "description": "A minimal, read-only, team-shared Postgres browser shipped as one static Go binary.",
    "canonical": "https://descope-sample-apps.github.io/pgpeek/",
    "repository": "https://github.com/descope-sample-apps/pgpeek"
  },
  "summary": {
    "sectionCount": 11,
    "featureCount": 6,
    "themeCount": 20,
    "safetyLayerCount": 3,
    "documentedConfigCount": 23,
    "httpRouteCount": 25,
    "defaultRowCap": 1000,
    "defaultStatementTimeout": "30s"
  },
  "resources": {
    "count": 4,
    "items": [
      {
        "id": "quick-context",
        "href": "llms.txt",
        "description": "Concise product, safety, startup, and HTTP context."
      },
      {
        "id": "full-context",
        "href": "llms-full.txt",
        "description": "Full configuration, deployment, testing, and endpoint documentation."
      },
      {
        "id": "human-docs",
        "href": "./",
        "description": "Rendered documentation with screenshots and section anchors."
      },
      {
        "id": "repository",
        "href": "https://github.com/descope-sample-apps/pgpeek",
        "description": "Source, issues, releases, and maintainer README."
      }
    ]
  },
  "tasks": {
    "count": 5,
    "items": [
      {
        "id": "run-local",
        "href": "./#quickstart",
        "command": "go run ."
      },
      {
        "id": "inspect-limits",
        "href": "./#api",
        "command": "curl -fsS http://localhost:8080/api/meta"
      },
      {
        "id": "list-databases",
        "href": "./#api",
        "command": "curl -fsS http://localhost:8080/api/databases"
      },
      {
        "id": "check-liveness",
        "href": "./#deploy",
        "command": "curl -fsS http://localhost:8080/healthz"
      },
      {
        "id": "check-readiness",
        "href": "./#deploy",
        "command": "curl -fsS http://localhost:8080/readyz"
      }
    ]
  },
  "httpRoutes": {
    "count": 25,
    "items": [
      {
        "method": "GET",
        "path": "/healthz",
        "description": "Process liveness probe; returns JSON status and build metadata."
      },
      {
        "method": "GET",
        "path": "/readyz",
        "description": "Database readiness probe; returns ready or a JSON error."
      },
      {
        "method": "GET",
        "path": "/api/user",
        "description": "Return the authenticated user context forwarded by the deployment proxy."
      },
      {
        "method": "GET",
        "path": "/api/databases",
        "description": "List configured database targets and the default target."
      },
      {
        "method": "GET",
        "path": "/api/meta",
        "description": "Return server limits needed by the UI, including rowCap."
      },
      {
        "method": "POST",
        "path": "/api/query",
        "description": "Preview one read-only SQL statement and return capped JSON rows."
      },
      {
        "method": "POST",
        "path": "/api/query/count",
        "description": "Return the exact row count for one read-only SQL statement without returning its rows."
      },
      {
        "method": "POST",
        "path": "/api/query/cell",
        "description": "Re-run one read-only SQL statement and return a selected full cell."
      },
      {
        "method": "POST",
        "path": "/api/export",
        "description": "Run one read-only SQL statement and download row-uncapped gzip CSV up to 512 MiB before compression."
      },
      {
        "method": "GET",
        "path": "/api/tables",
        "description": "List browsable tables and views."
      },
      {
        "method": "GET",
        "path": "/api/tables/{schema}/{table}/columns",
        "description": "Return column structure for a table or view."
      },
      {
        "method": "GET",
        "path": "/api/tables/{schema}/{table}/fks",
        "description": "Return single-column foreign keys for click-through navigation."
      },
      {
        "method": "GET",
        "path": "/api/tables/{schema}/{table}/data",
        "description": "Return paged, filtered, and sorted table data."
      },
      {
        "method": "GET",
        "path": "/api/tables/{schema}/{table}/data/cell",
        "description": "Replay the current table page and return a selected full cell."
      },
      {
        "method": "GET",
        "path": "/api/queries",
        "description": "List saved and preset queries."
      },
      {
        "method": "POST",
        "path": "/api/queries",
        "description": "Create a saved query."
      },
      {
        "method": "PUT",
        "path": "/api/queries/{id}",
        "description": "Update a saved query."
      },
      {
        "method": "DELETE",
        "path": "/api/queries/{id}",
        "description": "Delete a saved query."
      },
      {
        "method": "GET",
        "path": "/mcp",
        "description": "Expose protocol-defined Streamable HTTP transport behavior."
      },
      {
        "method": "POST",
        "path": "/mcp",
        "description": "Handle stateless MCP initialization, tool discovery, and tool calls."
      },
      {
        "method": "DELETE",
        "path": "/mcp",
        "description": "Expose protocol-defined Streamable HTTP session termination behavior."
      },
      {
        "method": "OPTIONS",
        "path": "/mcp",
        "description": "Allow browser-based OAuth MCP clients to preflight the authenticated endpoint."
      },
      {
        "method": "GET",
        "path": "/.well-known/oauth-protected-resource",
        "description": "Publish RFC 9728 protected-resource metadata when Descope OAuth is enabled."
      },
      {
        "method": "OPTIONS",
        "path": "/.well-known/oauth-protected-resource",
        "description": "Advertise cross-origin access to public protected-resource metadata."
      },
      {
        "method": "GET",
        "path": "/",
        "description": "Serve the pgpeek browser UI."
      }
    ]
  },
  "httpContract": {
    "error": {
      "contentType": "application/json",
      "body": {
        "error": "<message>"
      }
    },
    "emptySavedQueries": [],
    "healthz": {
      "status": "ok",
      "version": "<semantic-version>",
      "commit": "<git-commit>",
      "buildDate": "<RFC3339>"
    },
    "readyz": "ready"
  },
  "help": [
    "Read llms.txt first for the lowest-context overview.",
    "Read llms-full.txt only when configuration, deployment, or endpoint detail is needed.",
    "Use the read-only Postgres role as the security boundary.",
    "Put pgpeek behind SSO or another authentication proxy before exposing it."
  ]
}
