RealComposer
Frontend / WebSupabaseAlgoliaMulti-API Aggregation

Combine Algolia Search Results with Supabase User Favorites

One edge call merges Supabase for Frontend / Web

Direct Answer & Architecture Summary

To combine algolia search results with supabase user favorites, configure parallel steps for Supabase and Algolia. Frontend / Web performs one authorized GET/POST to RealComposer and receives a merged payload.

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

Serial Supabase and Algolia calls slow Frontend / Web pages

Each extra Supabase and Algolia hop adds hundreds of milliseconds and another OAuth refresh path your UI must manage.

Critical Security & Operational Risks:
  • One slow upstream blocking an entire page
  • Partial failures leaving UI in inconsistent states
  • Duplicate auth refresh logic per service
Architecture & Step-by-Step Implementation

How RealComposer Solves This at the Edge

1

Store upstream credentials in Secret Vault

Add SUPABASE_SERVICE_ROLE_KEY, ALGOLIA_API_KEY to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.

2

Target the real upstream URL

Use POST against https://{{secrets.SUPABASE_PROJECT_REF}}.supabase.co/rest/v1/{{query.table}}?{{query.filter}}. Allowed origins on the client token should match post pipelines set cache ttl to 0 because realcomposer only stores get responses at the edge.

3

Call from Frontend / Web

Allowed origins on the token should list every Frontend / Web host that calls this URL.

                    const res = await fetch('https://realcomposer.com/v1/workspace/combine-algolia-search-with-user-favorites', {
  headers: { Authorization: 'Bearer rc_live_your_token' }
});
                  
Payload Slimming Comparison
58% Bandwidth Reduction
Raw Upstream Response261 B
              {
  "requestId": "req_combine-",
  "upstreamLatencyMs": 142,
  "audit": {
    "region": "edge",
    "trace": "combine-algolia-search-with-user-favorites"
  },
  "payload": {
    "id": "sample_id",
    "status": "active",
    "nested": {
      "tags": [
        "demo"
      ],
      "internal": true
    },
    "unused_blob": {
      "foo": "bar",
      "bar": "baz"
    }
  }
}
            
RealComposer Slimmed Edge Payload109 B
              {
  "supabase_rowId": "sample",
  "supabase_email": "sample",
  "algolia_hitCount": "sample",
  "algolia_firstHit": "sample"
}
            

Recipe Specs

HTTP method
POST
Upstream calls
2
Edge cache TTL
No caching
Client auth
Restricted client token
Mapped output fields
4
Payload
261 B to 109 B (-58%)
Call from Terminal or Client
curl -X POST "https://realcomposer.com/v1/workspace/combine-algolia-search-with-user-favorites" \
  -H "Authorization: Bearer rc_live_client_token" \
  -H "Content-Type: application/json" \
  -d '{"model":"example"}'
Frequently Asked Questions

Developer Questions & Troubleshooting

Can Frontend / Web call Supabase without holding the production key?

Point Frontend / Web at /recipes/combine-algolia-search-with-user-favorites edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins.

Does POST traffic get cached?

combine-algolia-search-with-user-favorites POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard.

What happens if an upstream step times out?

Upstream steps in combine-algolia-search-with-user-favorites honor timeoutMs and optional fallback JSON without leaking secrets.

Sources & Definitions Used in This Answer

Instant Deployment

Deploy this Frontend / Web + Supabase, Algolia 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