#88th of 12 in RAG and search

nextjs-openai-doc-search

Build-time embeddings of your MDX docs into Supabase pgvector

Stars
1.7k
License
Apache-2.0
Last commit
May 2026
Language
TypeScript

Overview

A Next.js starter that chunks the .mdx files in pages/ at build time, embeds each section with OpenAI and stores vectors in Supabase pgvector, skipping files whose checksum has not changed. At runtime an Edge function embeds the question, runs a similarity search and streams a completion with the matched sections in the prompt; the schema ships as a Supabase migration. For teams adding chat search to a Next.js docs site.

Who it is for: Teams adding chat search to a Next.js docs site

Strengths

  • Checksum table avoids re-embedding unchanged files on every build
  • pgvector schema is a checked-in Supabase migration
  • One secret (OPENAI_KEY) when deployed with the Vercel Supabase integration

Weaknesses

  • Uses the legacy OpenAI text completion endpoint; expect to port it
  • Only .mdx in pages/ is indexed; other sources need code
  • No auth, no conversation history, no tests
  • Design dates from 2023; last commit 2026-05

What it needs

  • TypeScript, openai
  • Needs supabase, postgres-pgvector, openai-api-key, docker-for-local-supabase
  • env example file

Also in RAG and search

See all 12
Also in RAG and search
RankProjectScore
1azure-search-openai-demoAzure RAG chat reference on AI Search and Azure OpenAI7.8k stars, MIT56 out of 100
2rag-postgres-openai-pythonRAG over Postgres table rows with hybrid search and SQL filters505 stars, MIT51 out of 100
3llm-appPathway RAG pipeline templates that re-index live data sources Live demo ↗ (opens in a new tab)58.8k stars, MIT48 out of 100
#4chat-langchainLangChain docs assistant as a Managed Deep Agent with Next.js UI6.5k stars, MIT45 out of 100
#5chat-with-your-data-solution-acceleratorAzure RAG chat app that answers from your documents with citations1.2k stars, MIT44 out of 100