A starter template for integrating Mixedbread Search into ecommerce applications using Next.js, Vercel, and Mixedbread.
Note: This is a demo store that is currently not publicly accessible. We will add public stores in the future. Feel free to explore the code and use this as a starter template to build your own AI-powered search application.
ecom_vercel_demo.mp4
- Node.js 22+
 - Git
 
git clone <your-repo-url>
cd vercel-integration-ecommercenpm installCreate a .env file in the root directory:
cp .env.example .envAdd your Mixedbread API key to the .env file:
MXBAI_API_KEY=your-api-key-here
MXBAI_STORE_ID=your-store-idTo get your API key and store ID, you have two options:
- 
From Vercel Integration (Recommended if deploying to Vercel):
- Go to your Vercel Dashboard
 - Navigate to your project's Integrations tab
 - Install or access the Mixedbread integration
 - Copy your API key and store ID from the integration settings
 
 - 
From Mixedbread Platform (For standalone use):
- Visit the Mixedbread Platform
 - Sign up or log in to your account
 - Navigate to API Keys and create a new key
 - Copy your API key and store ID from the platform
 
 
This template is pre-configured to work with the commerce dataset. If you're using your own dataset, you'll need to update the code to match your metadata structure and content URLs.
Key files to update:
lib/types.ts- Update theProductMetadatainterface to match your dataset's metadata fieldscomponents/product-grid.tsx- Update references tometadatafields (e.g.,metadata.name,metadata.description) andimage_url.urlapp/api/search/route.ts- Adjust search parameters if needed (e.g.,top_k,score_threshold)
Example metadata structure used in this template:
{
  name: string;
  description?: string;
  filename?: string;
  price?: number;
  category?: string;
  // ... other fields
}The template also expects search results to include an image_url.url field for product images.
Start the development server:
npm run devOpen http://localhost:3000 in your browser to see the application.
- Mixedbread Documentation - Learn about Mixedbread's features and APIs
 - Quickstart Guide - Get started with creating stores and uploading files
 - Mixedbread Discord - Join the community and get support
 
MIT