{
  "schema_version": 1,
  "description": "Machine-readable map of how this app connects to PC Gateway for all backend operations.",
  "gateway": {
    "role": "PC Gateway — app-user auth, records, storage, AI, edge functions, realtime.",
    "bff_path": "/api/cloud",
    "dev_proxy_path": "/api/p2hs/cloud",
    "dev_proxy_env": "NUXT_P2HS_GATEWAY_PROXY_TARGET",
    "public_url_env": "NUXT_PUBLIC_P2HS_GATEWAY_URL",
    "server_url_env": "CLOUD_GATEWAY_URL",
    "server_token_env": "CLOUD_SERVICE_TOKEN",
    "note": "Data operations go through the BFF at /api/cloud. App-user auth and realtime SSE call the Gateway directly using the user JWT.",
    "typical_routes": [
      "POST /v1/projects/{id}/auth/signup",
      "POST /v1/projects/{id}/auth/signin",
      "GET  /v1/projects/{id}/entities/{entity}/records",
      "POST /v1/projects/{id}/records/query",
      "POST /v1/projects/{id}/storage/{bucket}/presign",
      "GET  /v1/projects/{id}/realtime/{channel}"
    ]
  },
  "client_registration": {
    "note": "Trusted clients and capability grants are issued by P2HS Core. The browser must not embed secrets — PROJECT_ID is safe, service tokens are not.",
    "public_env": ["NUXT_PUBLIC_P2HS_CLIENT_ID", "PROJECT_ID"]
  }
}
