#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| Rank | Project | Score |
|---|---|---|
| 1 | azure-search-openai-demoAzure RAG chat reference on AI Search and Azure OpenAI | 56 out of 100 |
| 2 | rag-postgres-openai-pythonRAG over Postgres table rows with hybrid search and SQL filters | 51 out of 100 |
| 3 | llm-appPathway RAG pipeline templates that re-index live data sources | 48 out of 100 |
| #4 | chat-langchainLangChain docs assistant as a Managed Deep Agent with Next.js UI | 45 out of 100 |
| #5 | chat-with-your-data-solution-acceleratorAzure RAG chat app that answers from your documents with citations | 44 out of 100 |