DocuMind is a RAG (Retrieval-Augmented Generation) system that enables you to chat with your documentation. It ingests content from a provided URL, indexes it, and allows you to ask natural language questions to receive context-aware answers.
- RAG Architecture: Retrieves relevant context from documentation to prevent hallucinations.
- URL Ingestion: Scrapes and processes content directly from documentation websites.
- Semantic Search: Uses local embeddings (
@xenova/transformers) for fast, private vector search. - Smart Answers: Integrates with Groq (Llama 3 70B) for fast and accurate responses.
- Responsive UI: Clean interface with dark mode support.
- Serverless Ready: Optimized for deployment on platforms like Vercel.
Frontend
- React (Vite)
- Vanilla CSS
- Lucide React
Backend
- Node.js & Express
- @xenova/transformers (Local embeddings)
- Cheerio (Web scraping)
- Groq SDK (LLM inference)
- In-Memory Vector Store
- Node.js (v18 or higher)
- A Groq Cloud API Key
-
Clone the repository
-
Backend Setup
Navigate to the backend directory and install dependencies:
cd backend npm installCreate a
.envfile in thebackenddirectory:GROQ_API_KEY=your_groq_api_key_here PORT=3000
Start the backend server:
npm run dev
-
Frontend Setup
Open a new terminal, navigate to the frontend directory:
cd frontend npm installCreate a
.envfile in thefrontenddirectory:VITE_API_BASE_URL=http://localhost:3000
Start the frontend:
npm run dev
-
Usage Visit
http://localhost:5173in your browser.
This project is configured for Vercel deployment.
- Push to GitHub: Ensure your code is in a GitHub repository.
- Import to Vercel: Import the repository in Vercel.
- Environment Variables:
- Add
GROQ_API_KEYto the Vercel project settings. - Configure
VITE_API_BASE_URLif necessary (Vercel automatic URL handling usually works, you may need to set the production backend URL).
- Add
- Deploy: Vercel will detect
vercel.jsonand deploy both the frontend and backend.
- Ingest: The backend scrapes text from the URL, chunks it, generates embeddings, and stores them in memory.
- Query: The backend generates an embedding for the question, finds the top similar chunks, and sends the context + question to the Groq LLM.
- Response: The LLM generates an answer based strictly on the provided context.
MIT