RealComposer

Merge cloudinary assets with contentful entries

DAM plus CMS composed media payload

Direct Answer & Architecture Summary

Resolve Contentful asset references with Cloudinary transformation metadata. For "merge cloudinary assets with contentful entries", store CLOUDINARY_BASIC_AUTH, CONTENTFUL_ACCESS_TOKEN in Secret Vault, call https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image from a Worker, and let Next.js / React hit only https://realcomposer.com/v1/workspace/merge-cloudinary-with-contentful-entries with an rc_live_ client token.

Security LevelAES-256-GCM Vault
Edge LatencySub-10ms Response
InfrastructureZero Server Maintenance
The Problem Solved

Waterfall latency from multiple Cloudinary and Contentful requests

Next.js / React widgets often await Cloudinary and Contentful sequentially, multiplying TLS handshakes on cellular networks and amplifying failure rates.

Critical Security & Operational Risks:
  • Race conditions between parallel manual fetches
  • Higher mobile data usage from redundant JSON
  • Timeouts when any upstream exceeds cellular RTT
Architecture & Step-by-Step Implementation

How RealComposer Solves This at the Edge

1

Add vault secrets for this pipeline

Create CLOUDINARY_BASIC_AUTH, CONTENTFUL_ACCESS_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.

2

Configure upstream steps and output mapping

Use GET against https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image. 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).

3

Call from Next.js / React

Allowed origins on the token should list every Next.js / React host that calls this URL.

                    // app/api route or client component
const res = await fetch('https://realcomposer.com/v1/workspace/merge-cloudinary-with-contentful-entries', {
  cache: 'no-store',
  headers: { Authorization: 'Bearer rc_live_your_token' }
});
                  
Payload Slimming Comparison
54% Bandwidth Reduction
Raw Upstream Response259 B
              {
  "requestId": "req_merge-cl",
  "upstreamLatencyMs": 142,
  "audit": {
    "region": "edge",
    "trace": "merge-cloudinary-with-contentful-entries"
  },
  "payload": {
    "id": "sample_id",
    "status": "active",
    "nested": {
      "tags": [
        "demo"
      ],
      "internal": true
    },
    "unused_blob": {
      "foo": "bar",
      "bar": "baz"
    }
  }
}
            
RealComposer Slimmed Edge Payload119 B
              {
  "cloudinary_publicId": "sample",
  "cloudinary_format": "sample",
  "contentful_entryId": "sample",
  "contentful_title": "sample"
}
            

Recipe Specs

HTTP method
GET
Upstream calls
2
Edge cache TTL
No caching
Client auth
Restricted client token
Mapped output fields
4
Payload
259 B to 119 B (-54%)
Call from Terminal or Client
curl -X GET "https://realcomposer.com/v1/workspace/merge-cloudinary-with-contentful-entries" \
  -H "Authorization: Bearer rc_live_client_token"
Frequently Asked Questions

Developer Questions & Troubleshooting

Does Next.js / React need CORS changes after adding RealComposer?

Use scoped tokens where the vendor allows them on merge-cloudinary-with-contentful-entries. Admin keys stay {{secrets.*}} references only.

When does edge caching apply to this recipe?

merge-cloudinary-with-contentful-entries forwards client JSON to POST upstreams unchanged; secrets interpolate only in URLs and header templates.

How do I rotate upstream credentials?

Upstream steps in merge-cloudinary-with-contentful-entries honor timeoutMs and optional fallback JSON without leaking secrets.

Sources & Definitions Used in This Answer

Instant Deployment

Deploy this Next.js / React + Cloudinary, Contentful Recipe

Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.

CLONE THIS RECIPE
Related Architecture Recipes