Next.js template with Supabase auth, RAG, and AI web search
Top 79.5% on sourcepulse
This project provides a production-ready template for Next.js 15 applications, integrating Supabase SSR authentication with advanced AI features like document chat (RAG), web search, and multi-LLM support. It targets developers building complex, AI-powered web applications requiring secure user management and efficient data handling.
How It Works
The architecture leverages Next.js 15's Server Components for SSR authentication and AI logic. Supabase handles user authentication, database storage (including pgvector
for embeddings), and file storage with robust Row Level Security (RLS). Document processing is managed by LlamaIndex Cloud, which converts PDFs to markdown and generates embeddings. Tavily AI is used for web search, and Upstash Redis provides rate-limiting and caching. The project prioritizes code locality over strict design patterns, keeping feature-related code together for clarity and maintainability.
Quick Start & Requirements
npm install
pgvector
table with HNSW indexing..env.local
with Supabase URL/keys and other API keys.Highlighted Details
pgvector
with HNSW indexing for efficient similarity search.Maintenance & Community
The repository is maintained by ElectricCodeGuy. No specific community channels or roadmap details are provided in the README.
Licensing & Compatibility
Licensed under the MIT License, permitting commercial use and integration with closed-source projects.
Limitations & Caveats
The project requires a significant number of third-party API keys for full functionality, which may incur costs. The "code locality" approach, while aiming for clarity, might lead to some intentional code duplication. The README mentions Next.js 15, which is still relatively new and may have evolving best practices.
2 weeks ago
Inactive