Shared Iframe App Scaffold
Common app base for WordPress and Shopify wrappers
This app runs inside an iframe and communicates with platform- specific wrappers through a single bridge module. Add new bridge events in one place and consume them everywhere as constants.
Single bridge export
Import `bridge` from the shared client module and use `send`, `on`, `handleRequest`, and `request`.
Grouped event constants
System, user, and request events are defined centrally to avoid string duplication.
Wrapper-agnostic client
Works the same inside WordPress plugin wrappers and Shopify app wrappers.
Scaffold-ready
Replace this screen with product UI while keeping bridge contracts stable.
Suggested Structure
- 1. Wrapper bootstraps iframe and initializes wrapper-side bridge manager.
- 2. Iframe app imports `bridge` + `BRIDGE_EVENT_GROUPS` from a common module.
- 3. App sends ready/system events and handles shared request contracts.
- 4. Platform wrappers map platform APIs to shared bridge events.
Iframe Bridge
Client bridge initialized from shared module
System Events
- system:app_bootstrapped
- system:app_ready
- system:wrapper_ready
- system:heartbeat
- system:error
User Events
- user:session_updated
- user:product_selected
- user:config_changed
- user:toast
Request Events
- request:get_context
- request:get_config
- request:save_config
- request:track_event
Activity Log
- No bridge activity yet.