Prerequisites
Before starting, ensure you have the following tools and accounts ready.
Note for Developers
This guide assumes basic familiarity with Node.js, Git, and command-line interfaces.
Required Software
Node.js 18+
ChatRAG requires Node.js version 18 or higher. Download from nodejs.org
# Check your Node.js version
node --version
# Should output v18.0.0 or highernpm (comes with Node.js)
npm is the package manager for Node.js and is installed automatically with Node.js.
# Verify npm installation
npm --versionGit
Required for cloning the repository. Download from git-scm.com
# Verify git installation
git --versionRequired API Keys
You'll need to sign up for the following services and obtain API keys:
1. Supabase (Free tier available)
Open-source Firebase alternative with PostgreSQL and vector database capabilities.
- Sign up at supabase.com
- Create a new project
- Note down: Project URL, Anon Key, and Service Role Key
2. OpenAI API (Required for embeddings)
Required for document embeddings and AI models.
- Sign up at platform.openai.com
- Generate an API key from the API section
- Add billing information (pay-as-you-go)
3. OpenRouter API (Recommended)
Access 100+ AI models from multiple providers through a unified API.
- Sign up at openrouter.ai
- Generate an API key from your dashboard
- Competitive pricing with various model options
4. LlamaCloud API (Required for document processing)
Required for PDF/DOCX processing and RAG functionality.
- Sign up at cloud.llamaindex.ai
- Generate an API key
- Free tier available for testing
Minimum Requirements Summary
To run ChatRAG locally, you need:
- NEXT_PUBLIC_SUPABASE_URL
- NEXT_PUBLIC_SUPABASE_ANON_KEY
- SUPABASE_SERVICE_ROLE_KEY (server-only secret)
- OPENAI_API_KEY (required for embeddings)
- OPENROUTER_API_KEY or direct OpenAI models
- NEXT_PUBLIC_LLAMA_CLOUD_API_KEY
💡 Pro Tip
All these services offer generous free tiers for testing. You can start developing with ChatRAG without any upfront costs!