Introduction
AppShell is the core library for building shell (host) applications in the UI Protocol ecosystem.
Introduction
It manages the integration of micro-frontend applications, handling data sharing, user actions, navigation, and communication.
What is a Shell Application?
A shell application is the host that embeds and manages micro-frontend clients. Examples include Omnitron and Seller Center. The shell provides:
Layout and Navigation - Header, sidebar, and routing
Shared Data - User info, permissions, configuration
Actions - Functions that clients can invoke
Communication Channel - Message passing via postMessage API
Key Responsibilities
Data Management
Share data with all connected micro-frontends
Synchronize state changes across applications
Maintain data isolation between different clients
User Actions
Define actions that clients can invoke (e.g., show toast, open modal)
Process action requests and return results
Handle built-in actions (navigation, UI helpers)
Navigation
Manage routing for fullpage applications
Handle navigation requests from clients
Coordinate URL and query parameter changes
Application Lifecycle
Register and configure micro-frontend applications
Load/unload clients via iframes
Manage communication channels per client
Installation
Basic Setup
Wrap your application with AppShellProvider:
Provider Props
apps
RegisteredApp[]
Yes
List of registered micro-frontend applications
navigation
ShellNavigation
Yes
Navigation helper functions
data
ApplicationData
No
Shared data available to all clients
actions
ApplicationActions
No
Custom actions that clients can invoke
Registered Apps
The apps prop contains the list of micro-frontend applications that can be rendered:
How It Works
Shell initializes with
AppShellProviderand registered appsClient iframe loads and sends
SET_CONFIGeventShell responds with
SET_DATAandSET_APP_IDCommunication established via framebus library
Ongoing communication for actions, navigation, and data updates
Next Steps
Configuration - Configure data sharing, actions, and navigation
Hooks - Shell-side React hooks
Components - AppRenderer, PluginRenderer, ModalRenderer
API Reference - Complete API documentation
Last updated
Was this helpful?

