Official source
Building Micro-Frontends
Practical book by Luca Mezzalira about architecture, delivery model and scaling frontend teams through micro-frontends.
Building Micro-Frontends
Authors: Luca Mezzalira
Publisher: O'Reilly Media, 2021
Length: 334 pages
Luca Mezzalira on practices for scaling frontend teams: domain boundaries, composition, governance and gradual migration from a monolith.
OriginalMain thesis
Micro-frontends work when an organization designs the frontend as product domain system, and not as a monolithic SPA with a single release point. The book emphasizes that technical decomposition should go along with the decomposition of ownership, CI/CD and operational practices.
Four pillars
Domain Ownership
The boundaries of front-end modules should coincide with business domains, not technology layers.
Independent Delivery
Each team releases its micro-frontend autonomously, without synchronously releasing the entire portal.
Contract First Integration
Integration is based on stable contracts (routing, auth, events, shared APIs), and not on implicit agreements.
Platform Governance
We need a thin platform layer: standards, quality gates and rules for changes without a bureaucratic bottleneck.
Composition options
Client-side composition
Shell loads remote modules at runtime. Maximum autonomy, but requires strict control of performance and dependencies.
Server-side composition
Assembling pages at the edge/server level before rendering in the browser. It’s easier with SEO and first paint, but the complexity of backend orchestration is higher.
Build-time integration
The modules are combined at the assembly stage. Low entry threshold, but less independence of teams during release.
Step-by-step rollout
- Define domain slices and ownership map between teams.
- Create a shell and fix the minimum contracts: navigation, identity, telemetry, design tokens.
- Translate legacy UI step by step using the strangler pattern, starting with the least risky areas.
- Introduce contract tests and consumer-driven checks between micro-frontends.
- Build observability per domain: errors, latency, business KPIs, release health.
What is important organizationally
Engineering platform
- Unified CI templates, quality checks and release policy.
- General observability model for all micro-frontends.
- Compatible design system and token pipeline.
Governance without overload
- RFC/ADR for shared contracts changes.
- Ownership matrix by domain and SLA on shared parts.
- Explicit deprecation process instead of sudden breaking changes.
Antipatterns
- Dividing micro-frontends by frameworks instead of business contexts.
- A global shared library that blocks releases from all teams.
- Lack of uniform versioning rules and backward compatibility.
- Big-bang migration instead of a gradual strangler approach.
- Zero transparency of operational metrics at the level of each module.
