Implementing clean micro-frontend architecture in modern enterprise apps
I'm currently leading a team transitioning a large monolithic dashboard into a micro-frontend architecture using Webpack Module Federation. While the technical integration is smoothing out, I'm struggling with the organizational and structural aspects regarding shared state and design system consistency.
Specifically, how are you all handling global state (like user authentication tokens and theme preferences) across independent deployments without tightly coupling the host application to the remotes? We've tried a custom event bus, but it feels fragile.
"The goal is independent deployability, but the reality often looks like a distributed monolith if shared dependencies aren't managed carefully."
Any insights on best practices for shared library management (like React/ReactDOM) to prevent version conflicts while still allowing individual teams autonomy would be greatly appreciated. Examples of architectural diagrams or repository structures would be amazing.