{
  "slug": "supabase-edge-functions-alternative",
  "title": "Supabase Edge Functions Alternative for Simple API Proxy",
  "metaTitle": "Supabase Edge Functions Alternative - RealComposer",
  "metaDescription": "Supabase edge functions alternative for simple api proxy. Frontend / Web CORS fix for Supabase via RealComposer OPTIONS plus vault headers.",
  "headline": "Low-code Supabase BFF for Frontend / Web",
  "category": "ecosystem",
  "categoryLabel": "Platforms & Frameworks",
  "urgency": 8,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Supabase"
  ],
  "searchIntentQuery": "supabase edge functions alternative for simple api proxy",
  "directAnswerSummary": "Frontend / Web browsers cannot call https://{{secrets.SUPABASE_PROJECT_REF}}.supabase.co/rest/v1/{{query.table}}?{{query.filter}} directly because of CORS and hidden credentials. RealComposer responds to OPTIONS and proxies authorized traffic.",
  "problem": {
    "title": "Frontend / Web cannot attach secret headers to Supabase",
    "explanation": "Frontend / Web runs in the browser or a sandbox without a secret store. Supabase rejects unsigned browser origins or requires server-only headers.",
    "risks": [
      "Proxy hacks that break when vendors tighten CSP",
      "Zapier-only workarounds adding cost and latency",
      "Guest users seeing failed network requests in demos"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Store upstream credentials in Secret Vault",
      "description": "Create SUPABASE_SERVICE_ROLE_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Set headers, mapping, and cache TTL",
      "description": "Use GET against https://{{secrets.SUPABASE_PROJECT_REF}}.supabase.co/rest/v1/{{query.table}}?{{query.filter}}. Allowed origins on the client token should match leave cache ttl at 0 when each response is user-specific (include userid or record id in query params before enabling cache)."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/supabase-edge-functions-alternative', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Supabase Edge Functions Alternative for Simple API Proxy",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "supabase",
        "upstreamUrlTemplate": "https://{{secrets.SUPABASE_PROJECT_REF}}.supabase.co/rest/v1/{{query.table}}?{{query.filter}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "apikey": "{{secrets.SUPABASE_SERVICE_ROLE_KEY}}",
          "Authorization": "Bearer {{secrets.SUPABASE_SERVICE_ROLE_KEY}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "rowId",
          "sourcePath": "0.id",
          "type": "string",
          "sourceStep": "supabase"
        },
        {
          "targetPath": "email",
          "sourcePath": "0.email",
          "type": "string",
          "sourceStep": "supabase"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_supabase",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "supabase-edge-functions-alternative"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "rowId": "sample",
    "email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/supabase-edge-functions-alternative\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Can Frontend / Web call Supabase without holding the production key?",
      "answer": "Log request IDs for supabase-edge-functions-alternative, not raw Supabase payloads, because upstream bodies may include PII."
    },
    {
      "question": "How do I forward JSON bodies to POST upstreams?",
      "answer": "supabase-edge-functions-alternative keeps cache TTL at 0 because it uses POST upstream calls or per-user responses. Add ids to query strings before enabling GET cache."
    },
    {
      "question": "How do I rotate upstream credentials?",
      "answer": "Allowed origins on the supabase-edge-functions-alternative client token restrict which domains may call the edge URL."
    }
  ],
  "relatedRecipeSlugs": [
    "cache-shopify-storefront-api",
    "simplify-airtable-json-structure",
    "stitch-two-rest-apis-flutterflow"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/supabase-edge-functions-alternative",
    "markdown": "https://realcomposer.com/recipes/supabase-edge-functions-alternative.md",
    "json": "https://realcomposer.com/recipes/supabase-edge-functions-alternative.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=supabase-edge-functions-alternative&via=agent"
  }
}