Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js Commerce fork with Builder.io visual editing and Vercel Edge Middleware for cookie-driven personalization and A/B testing.

A Turborepo monorepo starter pairing a Hono API app with a Next.js web app and shared TypeScript, ESLint, and Prettier configs.

Next.js example app implementing the OpenID Connect Authorization Code Flow with PKCE via Auth.js, deployable to Vercel or Cloudflare Pages.

A production-ready React Router template for full-stack React apps with SSR, HMR, TypeScript, Tailwind CSS, and Docker deploy configs.

A minimal Angular 13 starter app from Vercel's examples repo, generated with Angular CLI 13.1.3 and deployable to Vercel with zero configuration.
Builder.io Personalization Starter is a Next.js Commerce fork that adds Builder.io visual page building and Vercel Edge Middleware-driven personalization and A/B testing to an ecommerce storefront, maintained by Builder.io.
It is an open demo repository whose site app is a fork of Next.js Commerce with Builder.io integrated, using Edge Middleware to personalize pages with targeting rules and A/B tests while keeping page delivery fast. The app takes cookie-based targeting attributes such as personalization.returnVisitor and personalization.audience as input, rewrites a basic path into that path plus a hash of the personalized attributes, and returns a Builder.io-authored page variant as output. Content editors build and publish those variants in Builder.io's visual editor, and the same deployed code serves every variant without a rebuild. A free Builder.io account and a public API key pasted into site/config/builder.ts are the only external requirements.
site/middleware.ts rewrites a route such as /page into /page/returnVisitor=true whenever the matching cookie is present, so personalization happens before the page renders.personalization. becomes a targeting attribute; setting Cookies.set('personalization.returnVisitor', 'true') immediately changes which variant a visitor sees.returnVisitor boolean and an audience enum with segments like shirt-shipper and jacket-shopper.personalization-utils library for reading and generating personalized hashes.site/config/builder.ts holds Builder.io components and settings, and site/pages/[[...pages]].tsx fetches Builder.io content and renders it.returnVisitor boolean cookie and let the middleware rewrite the route so returning shoppers see a different hero, offer, or layout.audience enum from browsing history, add-to-cart events, or a CDP call, then publish separate page variants for segments like shirt-shipper and jacket-shopper.Personalization works by rewriting a basic path into that path plus a hash of the visitor's personalized attributes. Rename a route such as pages/page.tsx to pages/page/[hash].tsx and register it in the rewriting middleware at site/middleware.ts; the page can then return personalized content automatically based on whichever personalization.* cookies exist.
yarn and yarn dev from the monorepo root so the site is available on http://localhost:3000.site/config/builder.ts.page model, set the preview URL to http://localhost:3000 and save.returnVisitor (boolean) and audience (enum) in the Builder.io account settings.The starter code is a public GitHub repository, so cloning and running it locally costs nothing. Using the visual editor requires a Builder.io account, which the setup instructions describe as a free account, and a public API key copied from your account settings. The docs do not list paid tiers.
Yes. A Vercel deploy button is included, and the recommended Vercel settings are the Next.js framework preset with the build command cd .. && yarn build. For Netlify, the readme states no extra work is needed beyond connecting the repository.
No. The demo sets cookies directly, for example a boolean return-visitor flag and an audience enum derived from browsing history. The readme notes that in production audiences would normally come from a customer data platform, whose segment strings are written into the personalization cookie.
No. Variants are authored and published in Builder.io's visual editor after pages and targeting attributes are configured, and the Edge Middleware selects the matching variant at request time. The readme emphasizes publishing unlimited variations without any code or deploys.
