explaingit

meezan35/next-sitecore-ai

Analysis updated 2026-05-18

3TypeScriptAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

An npm package that adds AI search, content suggestions, and question-answering to Sitecore XM Cloud and Next.js websites using OpenAI and vector storage.

Mindmap

mindmap
  root((next-sitecore-ai))
    Hooks
      useContentSuggestion
      useSearchEnhance
      usePersonalize
    RAG pipeline
      Experience Edge ingestion
      OpenAI embeddings
      Supabase pgvector storage
      Semantic search query
    MCP server
      get item tool
      search content tool
      list site pages tool
    Requirements
      Sitecore XM Cloud
      OpenAI API key
      Supabase pgvector
      Next.js 14 plus
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a semantic search bar to your Sitecore XM Cloud site that ranks results by meaning rather than keywords.

USE CASE 2

Let site editors click a button to get AI suggestions for improving a content item's text.

USE CASE 3

Build a chat widget that answers visitor questions using your Sitecore published content as the knowledge base.

What is it built with?

TypeScriptNext.jsReactOpenAISupabasepgvector

How does it compare?

meezan35/next-sitecore-aiceliknimani/civic-pulse0labs-in/vision-link
Stars334
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardmoderatemoderate
Complexity4/54/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an active Sitecore XM Cloud subscription with Experience Edge, an OpenAI API key, and a Supabase project with pgvector.

MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

next-sitecore-ai is an open-source npm package that adds AI features to websites built with Sitecore XM Cloud and Next.js. Sitecore XM Cloud is a commercial headless content management system (a tool where editors write content that a separate website then displays). This package acts as a layer on top of it, connecting the CMS content to AI capabilities like search, suggestions, and question-answering. The package provides three React hooks that your Next.js pages can call. The first, useContentSuggestion, sends a Sitecore content item path to an AI route and streams back suggestions for improving the content. The second, useSearchEnhance, runs a text search query through an AI ranking step so results come back ordered by semantic relevance rather than keyword matching. The third, usePersonalize, picks a content variant to show a visitor based on audience segments you define. Behind those hooks is a retrieval-augmented generation (RAG) pipeline. During setup you run an ingestion script that reads your published Sitecore pages through Experience Edge (Sitecore's delivery API), breaks the text into chunks, generates vector embeddings using the OpenAI API, and stores them in a Supabase database. After that, when a user asks a question through the chat API route, the system finds the most relevant content chunks by comparing their embeddings and passes them to the language model as context. The package also ships an MCP server, which exposes five tools that AI coding assistants like Claude or Cursor can call to fetch Sitecore content, search it, and list site pages. This lets developers describe content changes to an AI tool and have it read the real CMS data while responding. Setup requires a Sitecore XM Cloud subscription with Experience Edge access, an OpenAI API key, a Supabase project with the pgvector database extension, and Next.js 14 or later. Install the package via npm, add seven environment variables, run the ingestion script once, and add API routes to your project. The package is MIT licensed.

Copy-paste prompts

Prompt 1
I'm adding next-sitecore-ai to my Next.js app. Walk me through setting up the ingestion script so my Sitecore content gets indexed into Supabase pgvector.
Prompt 2
How does the useSearchEnhance hook in next-sitecore-ai work, and what API route does it need on the server side?
Prompt 3
Set up the next-sitecore-ai MCP server in my Claude or Cursor config so the AI can read my XM Cloud content.
Prompt 4
I want to use the usePersonalize hook from next-sitecore-ai. How do I define variants and connect them to Sitecore item paths?

Frequently asked questions

What is next-sitecore-ai?

An npm package that adds AI search, content suggestions, and question-answering to Sitecore XM Cloud and Next.js websites using OpenAI and vector storage.

What language is next-sitecore-ai written in?

Mainly TypeScript. The stack also includes TypeScript, Next.js, React.

What license does next-sitecore-ai use?

MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

How hard is next-sitecore-ai to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is next-sitecore-ai for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub meezan35 on gitmyhub

Verify against the repo before relying on details.