{
  "openapi": "3.1.0",
  "info": {
    "title": "nic99.com API",
    "version": "0.5.0",
    "description": "API endpoints for nic99.com — Feedback, Authentication, and Module Hosting.",
    "contact": {
      "name": "nic99.com",
      "url": "https://nic99.com/feedback"
    }
  },
  "servers": [
    {
      "url": "https://nic99.com"
    }
  ],
  "paths": {
    "/api/feedback": {
      "post": {
        "summary": "Submit feedback",
        "description": "Send user feedback to the nic99 team via Feishu notification.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Optional sender name"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Optional sender email"
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Feedback message"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "feedback",
                      "bug",
                      "feature",
                      "other"
                    ],
                    "default": "feedback"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Feedback received"
          },
          "400": {
            "description": "Missing message field"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/auth/config": {
      "get": {
        "summary": "Get auth public config",
        "description": "Returns the Supabase publishable key for client-side auth.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "publicKey": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}