Microfrontends break down large frontend applications into smaller, independently deployable units. Unlike traditional 'Horizontal' microfrontends (splitting components within a page), Vertical Microfrontends (VMFE) empower a single team to own an entire slice of the application based on URL paths. This means one team has full control over everything for a route like /blog—framework, libraries, CI/CD, and all. It allows your marketing site to use Astro while your dashboard uses React, all appearing as one cohesive app to the user. Cloudflare's newly introduced Worker template simplifies building this VMFE architecture. You can find the original announcement and technical details in the Cloudflare blog post.

Cloud computing and server infrastructure illustration

Core Concept: The Router Worker & Service Bindings

The heart of a Vertical Microfrontend architecture is a 'Router Worker' that routes incoming requests to the appropriate team's Worker. Using Cloudflare's Service Bindings, the Router Worker can directly invoke other Workers (e.g., marketing, docs, dashboard teams) without needing public URLs.

Here's an example configuration for the Router Worker's wrangler.toml (or wrangler.json):

{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "name": "router",
  "main": "./src/router.js",
  "services": [
    { "binding": "HOME", "service": "worker_marketing" },
    { "binding": "DOCS", "service": "worker_docs" },
    { "binding": "DASH", "service": "worker_dash" }
  ]
}

This configuration allows the Router Worker to reference independent Worker services via binding names like HOME, DOCS, and DASH.

Server rack and network diagram

Practical Considerations: A Comparison

AspectVertical Microfrontends (VMFE)Traditional Monolith / Horizontal MFE
Team AutonomyVery High. Independent choice of framework, tools, and deployment pipeline per route.Low. Shared technology stack and deployment process.
Deployment RiskLow. A failed deployment by one team doesn't affect other routes.High. A change in a monolith can cause a rollback of the entire app.
UX Integration DifficultyModerate. Can be mitigated with CSS View Transitions and Speculation Rules.Low. Naturally integrated within a single codebase.
Operational ComplexityHigh. Requires monitoring, logging, and debugging across multiple independent services.Low. Managed as a single application.

The Secret to Unified UX: CSS & Prefetching

To make pages served from two completely different Workers feel like one app, CSS View Transitions and the Speculation Rules API are key. By enabling the smoothTransitions and preload options in the Router Worker configuration, the router automatically injects the necessary code into HTML responses.

// Example Router Configuration (ROUTES variable)
{
  "smoothTransitions": true,
  "routes": [
    { "binding": "APP1", "path": "/app1", "preload": true },
    { "binding": "APP2", "path": "/app2", "preload": true }
  ]
}

Routes with preload: true instruct supporting browsers to prefetch the next page, enabling near-instant navigation similar to a Single-Page Application (SPA).

Web development and coding on a laptop screen Vertical Microfrontends present a powerful paradigm for solving the inevitable challenges of team dependencies and deployment bottlenecks in growing organizations. Cloudflare's new template provides a foundational platform to start building this architecture at the edge.

Best Practices for Implementation:

  1. Adopt Incrementally: Instead of breaking apart an existing monolith all at once, start by building new features (e.g., a new dashboard page /dash/v2) or highly independent modules (e.g., /blog) as VMFEs.
  2. Define Common Standards: Even with full team independence, establish common operational standards for logging formats, error handling, and monitoring metrics to simplify debugging.
  3. Focus on UX Integration: Actively leverage CSS View Transitions and prefetching to ensure technical separation remains invisible to the user. They should experience one smooth, cohesive application.

This architecture maximizes team autonomy and deployment velocity while leveraging edge computing to deliver fast experiences globally. You can get started immediately from the Cloudflare Dashboard: navigate to 'Workers & Pages' > 'Create application' and select the 'Create microfrontend' template.