How Do SF Platform Architects Implement Salesforce Micro Frontends Without Framework Lock-In?
Salesforce AI

How Do SF Platform Architects Implement Salesforce Micro Frontends Without Framework Lock-In?

By Troy Amyett•September 12, 2026•6 min read
Back to Insights
Speed
AI-narrated

TL;DR: Salesforce micro frontends are now a supported pattern. UI Embedding is generally available, so you can place an independently deployed web app inside a Lightning page through the lightning-ui-embedding base component, with the app running in a sandboxed frame on its own origin. Teams that used the earlier developer-preview shell should migrate. Avoid lock-in by keeping business logic in the platform and treating the embedding contract as the only Salesforce-specific piece.

Platform Architects run into lock-in from two directions. Build everything in Lightning components and the UI is hard to reuse outside Salesforce. Build everything outside and you lose the Lightning page, its context, and its governance. Micro frontends, a form of headless architecture, sit between those: each team ships its own app on its own schedule, and Salesforce hosts the composition.

What are the two ways to build micro frontends on Salesforce?

Pattern Where the app runs Best for Status
External app through UI Embedding Your own domain, embedded in Lightning through a thin LWC wrapper Apps with their own release cadence, reused inside and outside Salesforce Generally available
Multi-Framework UI bundle On the platform as a UI bundle Apps that should live entirely in the org with Salesforce data access Bundles are GA; embedding a UI bundle is in beta

Pick the external pattern when another team or product already owns the app and ships it on its own schedule. Pick the UI bundle, built on Salesforce Multi-Framework, when the app exists only for Salesforce users and should run inside the org.

How does UI Embedding work?

A thin Lightning Web Component wraps the lightning-ui-embedding base component and points it at your app’s URL through its src attribute. Salesforce loads the app in a sandboxed frame and exchanges context and events with it.

Salesforce gives you two ways to wire the embedded app:

  • With the Platform SDK. The embedded app imports the UI Embedding module from @salesforce/platform-sdk to receive context and talk to the host page.
  • Without a package. The app implements Salesforce’s embedding message protocol directly, which suits teams that do not want a Salesforce dependency in their codebase.

To scaffold the wrapper, the getting started guide documents a CLI template:

sf template generate ui-embedding --name myEmbeddedApp --src https://app.example.com

Salesforce reports validating the pattern with React, Angular, and Vue apps, which is what keeps the embedded app independent of any one framework.

What does setup require?

From Salesforce’s documentation:

  • A Hyperforce org.
  • The embedded app’s domain added as a trusted domain for embedding.
  • An app served from a different origin than your Salesforce domain.
  • English set as the org’s default language.

Two runtime rules matter in practice. Set the src and sandbox values once, because changing them after the component mounts raises an error. And listen for the component’s ready and error lifecycle events so the page can show a fallback when the embedded app is unavailable.

How do you avoid framework lock-in?

  • Keep business logic in Apex and Flow. The front end should be replaceable without touching core processes.
  • Use standard data contracts. Read and write through the Salesforce Platform SDK or documented APIs, not framework-specific wrappers.
  • Treat the wrapper as the only Salesforce metadata. Each micro frontend keeps its own repository and pipeline.
  • Write down the contract. Record the events, inputs, and theming the host and app exchange, so a future team can replace the implementation without platform changes.

Governance and security checklist

  • Restrict sandbox permissions to what each app needs, and never allow top-level navigation.
  • Scope trusted domains to exact hostnames.
  • Grant access to each wrapper component or UI bundle through permission sets.
  • Monitor the embedded app’s availability separately, since it deploys outside your Salesforce release process.
  • Review embedded apps in security reviews like any other integration that can display Salesforce context.

How Funnelists approaches micro frontends as your AI advisor

We decide the composition model before anyone writes a component: which apps belong in the org, which belong outside, and which contracts they share. Those same contracts are what AI agents will call later, so we design them to be safe under the signed-in user’s permissions. Our headless Salesforce service builds React micro frontends and UI bundles your team owns. For the broader architecture, see how Platform Architects build headless Salesforce experiences.

The honest limitations

  • Frames add overhead. Each embedded app loads separately, so a page with many of them will feel slower.
  • Org requirements are strict. Hyperforce and an English default language rule out some orgs today.
  • Embedding UI bundles is beta. Plan production work around the external pattern or standalone bundles until it is generally available.
  • More moving parts. Independent deployments mean independent failures, so monitoring and ownership need to be clear.

Decision framework

Use UI Embedding with an external app when:

  • The app already exists or serves users outside Salesforce.
  • Its team ships on a different schedule from your Salesforce releases.

Use a Multi-Framework UI bundle when:

  • The app exists only for Salesforce users and should run inside the org.
  • You want platform data access without hosting your own infrastructure.

Stay with Lightning components when:

  • The feature is small, standard, and owned by your Salesforce team.

FAQ

What is a Salesforce micro frontend?

An independently built and deployed web app placed inside a Lightning page, so separate teams can own and release parts of the interface on their own schedules.

Is Salesforce UI Embedding generally available?

Yes. UI Embedding is generally available. Embedding a Multi-Framework UI bundle through it is currently in beta.

Does the developer-preview LWC shell still work?

Salesforce has published a migration guide from the developer preview to the generally available UI Embedding, and new work should use the lightning-ui-embedding component.

Which frameworks work with Salesforce UI Embedding?

Salesforce reports validating it with React, Angular, and Vue. Our builds use React.

The takeaway

Micro frontends on Salesforce moved from experiment to supported pattern. Use UI Embedding for apps with their own life outside the org, UI bundles for apps that belong inside it, and keep business logic in the platform so no front end becomes a trap.

Funnelists Services

Headless Salesforce

Build the frontend in React. Keep the data, security model, and business logic on Salesforce.

Troy Amyett

Troy Amyett

Founder & Chief Solutions Architect

9x Salesforce certified. Agentforce Specialist and Agentblazer Legend, 2025–2026. Anthropic-certified in Claude Code and MCP.

Get Insights in your inbox

AI-powered perspectives on Salesforce and Agentforce, delivered weekly.

No spam. Unsubscribe anytime.

Your competitors aren't waiting. Why are you?

Let's talk about what AI agents could do for your business. 30 minutes. No pitch deck. Just answers.

Launch before they do