{
  "slug": "bff-without-express-or-docker",
  "title": "Backend for Frontend without Express Or Docker",
  "metaTitle": "Backend for Frontend without - RealComposer",
  "metaDescription": "Backend for frontend without express or docker. Merge REST API in one Frontend / Web call with parallel Worker steps. RealComposer edge vault and client to",
  "headline": "One edge call merges REST API for Frontend / Web",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 9,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "REST API"
  ],
  "searchIntentQuery": "backend for frontend without express or docker",
  "directAnswerSummary": "To backend for frontend without express or docker, configure parallel steps for REST API. Frontend / Web performs one authorized GET/POST to RealComposer and receives a merged payload.",
  "problem": {
    "title": "Serial REST API calls slow Frontend / Web pages",
    "explanation": "Each extra REST API hop adds hundreds of milliseconds and another OAuth refresh path your UI must manage.",
    "risks": [
      "One slow upstream blocking an entire page",
      "Partial failures leaving UI in inconsistent states",
      "Duplicate auth refresh logic per service"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Store upstream credentials in Secret Vault",
      "description": "Add API_BEARER_TOKEN to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream."
    },
    {
      "stepNumber": 2,
      "title": "Configure upstream steps and output mapping",
      "description": "Point step upstream at https://jsonplaceholder.typicode.com/users/{{query.userId}} with GET. Add output mapping fields that mirror the JSON contract your screen already expects. 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/bff-without-express-or-docker', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Backend for Frontend without Express Or Docker",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "upstream",
        "upstreamUrlTemplate": "https://jsonplaceholder.typicode.com/users/{{query.userId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.API_BEARER_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "userId",
          "sourcePath": "id",
          "type": "number",
          "sourceStep": "upstream"
        },
        {
          "targetPath": "name",
          "sourcePath": "name",
          "type": "string",
          "sourceStep": "upstream"
        },
        {
          "targetPath": "email",
          "sourcePath": "email",
          "type": "string",
          "sourceStep": "upstream"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_bff-with",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "bff-without-express-or-docker"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "userId": "sample",
    "name": "sample",
    "email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/bff-without-express-or-docker\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Is it safe to log REST API responses in Frontend / Web?",
      "answer": "Store API_BEARER_TOKEN for bff-without-express-or-docker. Frontend / Web never sees decrypted values."
    },
    {
      "question": "When does edge caching apply to this recipe?",
      "answer": "bff-without-express-or-docker vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "What happens if an upstream step times out?",
      "answer": "Upstream steps in bff-without-express-or-docker honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "stripe-proxy-react-native",
    "combine-algolia-search-with-user-favorites",
    "connect-stripe-to-retool-securely"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/bff-without-express-or-docker",
    "markdown": "https://realcomposer.com/recipes/bff-without-express-or-docker.md",
    "json": "https://realcomposer.com/recipes/bff-without-express-or-docker.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=bff-without-express-or-docker&via=agent"
  }
}