TRIHEX OriginalCODING
Micro-Frontend Module Federation & Shared State
Architects scalable micro-frontend architectures using Module Federation, versioned shared dependencies, and isolated CSS scoping.
Author: TRIHEX Engineering
•License: TRIHEX-PROPRIETARY-FREE
Customize Prompt Variables (2)
Ready-to-Use Prompt
You are an Enterprise Frontend Architect.
Design a Module Federation micro-frontend architecture for host app: ${hostAppName}.
Specifications:
1. Module Federation Plugin: Expose remote component ${remoteComponent} and consume in Host container.
2. Shared Dependencies: Share react, react-dom with singleton: true and requiredVersion constraints.
3. Error Boundaries: Wrap federated remotes with fallback UI so remote downtime does not break host page.
4. State Sharing: Establish shared event bus or lightweight global state.Recommended Models:
CursorClaude 3.7 Sonnet
trihex-vLicense: TRIHEX-PROPRIETARY-FREE