Micro-Frontends with Astro
A micro-frontend (MFE) applies the micro-services philosophy to the browser: instead of one large single-page app owned by one team, a page is composed from several independently-owned slices. The header comes from one team, the product grid from another, the cart from a third — each with its own codebase, build pipeline, and deployment cadence.
The hard part of MFEs has always been the shell: the thing that stitches the slices together, decides what ships JavaScript, and keeps the page fast despite multiple frameworks fighting over the main thread. This is exactly where Astro shines. Astro renders to static HTML by default, hydrates only the interactive parts (islands), and can host React, Vue, Svelte, Solid and more on the same page. That makes it an unusually good composition layer for micro-frontends.
What this module covers
Section titled “What this module covers”| Lesson | What you will learn |
|---|---|
| What Are Micro-Frontends? | Independent teams, vertical slices, build-time vs run-time integration, and the real costs |
| Islands Across Frameworks | One Astro page hosting React, Vue and Svelte islands — the simplest MFE boundary |
| Composition Patterns | Astro as the shell: build-time packages vs run-time fragments and server islands |
| Run-time Integration & Deploy | Web Components, iframes, remote fragments, Module Federation, and independent deployment |
A page built by many teams
Section titled “A page built by many teams”In a micro-frontend architecture, a single page the user sees is assembled from regions that different teams build and ship on their own schedule. The Astro shell is responsible only for the layout and for deciding how each region is integrated.
flowchart TD
subgraph Shell["Astro shell (zero-JS layout)"]
H["Header region"]
C["Catalog region"]
R["Reviews region"]
K["Cart region"]
end
TeamA["Team A — Identity"] --> H
TeamB["Team B — Catalog"] --> C
TeamC["Team C — Social"] --> R
TeamD["Team D — Checkout"] --> K
Shell --> Page["One fast HTML page"] Each team owns a vertical slice end to end — UI, the logic behind it, and often its own data source. The shell never reaches inside a slice; it only knows where to place it and how to load it.
Throughout this module we treat Astro as the integration layer. You will see two big families of integration — composing slices at build time (shared packages in a workspace) and composing them at run time (remote fragments, Web Components, Module Federation, iframes) — and learn when each one is the right tool.