diff --git a/microfrontends/nextjs-multi-zones/README.md b/microfrontends/nextjs-multi-zones/README.md index 08c29db49b..e2c79f6fb9 100644 --- a/microfrontends/nextjs-multi-zones/README.md +++ b/microfrontends/nextjs-multi-zones/README.md @@ -8,7 +8,7 @@ This example showcases how to build and deploy a [Next.js Multi-Zones](https://nextjs.org/docs/pages/guides/multi-zones) microfrontends application using [Vercel Microfrontends](https://vercel.com/docs/microfrontends) with [Next.js App Router](https://nextjs.org/docs/app/building-your-application/routing). Learn how to architect independent, deployable frontend applications that work together seamlessly while maintaining team autonomy and deployment independence. -Demo URL: https://vercel-microfrontends-multi-zones.vercel.app/ +Demo URL: https://microfrontends-marketing-three.vercel.app/ ## 🚀 Deploy to Vercel @@ -23,6 +23,36 @@ This example consists of two separate microfrontends that can be deployed indepe ## Getting Started +### Set up with an agent + +The fastest way to run this example, or apply the same architecture to your own apps, is to give your coding agent the Vercel `microfrontends` skill. + +Install the [Vercel plugin](https://vercel.com/docs/agent-resources/vercel-plugin) (includes the `microfrontends` skill): + +```bash +npx plugins add vercel/vercel-plugin +``` + +In Cursor you can also run `/add-plugin vercel`. To install only the skill: + +```bash +npx skills add vercel/microfrontends +``` + +Then ask your agent: + +``` +Use the microfrontends skill to set up this Next.js multi-zones example. Install dependencies and start local development. +``` + +To wire the same pattern into your own projects: + +``` +Use the microfrontends skill to create a microfrontends group, add these projects, and configure the default app and /docs routing. +``` + +See the [Microfrontends skill](https://vercel.com/changelog/manage-vercel-microfrontends-with-ai-agents-and-the-cli) and [Vercel Microfrontends docs](https://vercel.com/docs/microfrontends). + ### Prerequisites Ensure you have the following installed: diff --git a/microfrontends/nextjs-multi-zones/apps/docs/app/docs/page.tsx b/microfrontends/nextjs-multi-zones/apps/docs/app/docs/page.tsx index 0fbd5cdbdf..781e2a4181 100644 --- a/microfrontends/nextjs-multi-zones/apps/docs/app/docs/page.tsx +++ b/microfrontends/nextjs-multi-zones/apps/docs/app/docs/page.tsx @@ -1,8 +1,31 @@ +import type { ReactNode } from 'react'; import Image from 'next/image'; import { Link } from '@vercel/microfrontends/next/client'; +import { ExternalLink } from 'lucide-react'; import { Button } from '@/components/ui/button'; import mfeIcon from '../../public/mfe-icon-dark.png'; +function ExternalTextLink({ + href, + children, +}: { + href: string; + children: ReactNode; +}) { + return ( + + {children} + + ); +} + export default function DocsPage() { return (
@@ -31,9 +54,9 @@ export default function DocsPage() {
  • - Examples + Learn more
  • @@ -57,28 +80,58 @@ export default function DocsPage() { Getting Started

    - Welcome to Vercel Microfrontends documentation. This guide will - help you get started with implementing microfrontends in your - project. + This /docs page is a separate Next.js app, routed + here by Vercel Microfrontends. The fastest way to set up the same + architecture is to give your coding agent the{' '} + microfrontends skill. +

    +

    + Install the{' '} + + Vercel plugin + {' '} + (includes the skill), or install the skill on its own: +

    +
    +              {`npx plugins add vercel/vercel-plugin\n# or\nnpx skills add vercel/microfrontends`}
    +            
    +

    Then ask your agent:

    +
    + Use the microfrontends skill to set up this Next.js multi-zones + example. Install dependencies and start local development. +
    +

    + In Cursor you can also run{' '} + + /add-plugin vercel + + .

    -
      -
    1. Install the Microfrontends CLI tool
    2. -
    3. Create your first microfrontend
    4. -
    5. Configure the host application
    6. -
    7. Deploy your microfrontends
    8. -
    -
    -

    Examples

    +
    +

    + Learn more +

    - Check out these examples to see Vercel Microfrontends in action: + Official docs and the skill your agent should use:

      -
    • Basic microfrontend setup
    • -
    • Communication between microfrontends
    • -
    • Shared state management
    • -
    • Microfrontend with different frameworks
    • +
    • + + Vercel Microfrontends documentation + +
    • +
    • + + Vercel plugin for coding agents + +
    • +
    • + + Microfrontends skill and CLI + +
    @@ -93,7 +146,7 @@ export default function DocsPage() {

    - © 2025 Vercel Microfrontends All rights reserved. + © 2026 Vercel Microfrontends All rights reserved.

    diff --git a/microfrontends/nextjs-multi-zones/apps/marketing/app/page.tsx b/microfrontends/nextjs-multi-zones/apps/marketing/app/page.tsx index dc9c153bdd..0c1302c164 100644 --- a/microfrontends/nextjs-multi-zones/apps/marketing/app/page.tsx +++ b/microfrontends/nextjs-multi-zones/apps/marketing/app/page.tsx @@ -1,5 +1,6 @@ import Image from 'next/image'; import { Link } from '@vercel/microfrontends/next/client'; +import { ExternalLink } from 'lucide-react'; import { Button } from '@/components/ui/button'; import mfeIcon from '../public/mfe-icon-dark.png'; @@ -60,7 +61,7 @@ export default function Home() {

    - © 2025 Vercel Microfrontends All rights reserved. + © 2026 Vercel Microfrontends All rights reserved.

    @@ -145,8 +146,16 @@ function CTASection() { Join the microfrontend revolution today and build better web applications.

    -
  • diff --git a/microfrontends/single-spa/apps/content/src/landing.tsx b/microfrontends/single-spa/apps/content/src/landing.tsx index 0ab803c266..7cc2f33e60 100644 --- a/microfrontends/single-spa/apps/content/src/landing.tsx +++ b/microfrontends/single-spa/apps/content/src/landing.tsx @@ -3,6 +3,39 @@ import ReactDOMClient from 'react-dom/client'; import singleSpaReact from 'single-spa-react'; import './globals.css'; +const MICROFRONTENDS_DOCS_URL = 'https://vercel.com/docs/microfrontends'; + +function DocsLink({ className }: { className: string }): React.JSX.Element { + return ( + + Read the docs + + (opens in a new tab) + + ); +} + function Landing(): React.JSX.Element { return ( <> @@ -321,8 +354,7 @@ function Landing(): React.JSX.Element { Simple, Transparent Pricing

    - Choose the plan that's right for your business. All plans - include a 14-day free trial. + Choose the plan that's right for your business.

    @@ -415,12 +447,7 @@ function Landing(): React.JSX.Element {
    - +
    @@ -536,12 +563,7 @@ function Landing(): React.JSX.Element {
    - +
    @@ -872,12 +894,7 @@ function Landing(): React.JSX.Element {

    - +