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} + + (opens in a new tab) + + ); +} + export default function DocsPage() { return (
- 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{' '}
+
+ {`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
+
+ .
- Check out these examples to see Vercel Microfrontends in action: + Official docs and the skill your agent should use:
- 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.