This project is a Retrieval-Augmented Generation (RAG) application with a Next.js client and a Node.js/Express server. It uses Redis (Valkey), Qdrant, and Google Gemini for Embeddings, and Ollama llema3 Model for document search and retrieval.
client/— Next.js frontendserver/— Node.js backend (Express, BullMQ, Qdrant, Ollama , llema3 Model)docker-compose.yml— For running Valkey (Redis-compatible)
- Node.js (v18+ recommended)
- npm
- Docker (for Valkey/Redis)
docker-compose up -d
This will start Valkey on port 6379.
cd server
cp .env.example .env # Fill in your API keys and Qdrant details
npm install
npm run dev # Starts the Express API
GOOGLE_API_KEY— Your Google Gemini API keyQDRANT_API_KEY— Qdrant API keyQDRANT_URL— Qdrant endpoint (e.g., http://localhost:6333)QDRANT_COLLECTION— Qdrant collection name (default: rag_documents)REDIS_HOST— Redis/Valkey host (default: localhost)REDIS_PORT— Redis/Valkey port (default: 6379)
cd client
npm install
npm run dev # Starts Next.js on http://localhost:3000
- Upload PDF files via the client UI (handled by the server and processed into Qdrant)
- Search and interact with your documents using the RAG-powered interface
- Ensure Valkey (Redis) is running on port 6379
- Ensure Qdrant is accessible and API keys are correct
- Check
.envin the server folder for correct configuration
npm run dev— Start Express server with hot reloadnpm run dev:worker— Start BullMQ worker for background PDF processingnode search.js- To document search and retrieval with help of Ollama llama3 Model installed Locally
npm run dev— Start Next.js development servernpm run build— Build for productionnpm start— Start production server
MIT