This guide will help you get the RAG Chatbot up and running in 5 minutes.
Before starting, ensure you have:
- Python 3.8+ installed (
python --version) - Node.js 18+ installed (
node --version) - Google AI (Gemini) API key (create one at https://aistudio.google.com/)
# Navigate to backend
cd backend
# Create virtual environment
python -m venv venv
# Activate it
source venv/bin/activate # Linux/Mac
# OR
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Setup environment
cp .env.example .env
# Edit .env and add your Google AI (Gemini) API key# In a new terminal, navigate to frontend
cd frontend
# Install dependencies
npm installTerminal 1 - Backend:
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
python main.pyTerminal 2 - Frontend:
cd frontend
npm run dev- Open http://localhost:3000 in your browser
- Go to "Upload" tab
- Upload a PDF or TXT document
- Go to "Chat" tab
- Ask questions about your document!
After uploading a document, try asking:
- "What is the main topic of this document?"
- "Can you summarize the key points?"
- "What does [specific term] mean according to the document?"
- Check if port 8000 is available
- Verify Google Gemini API key is set in
.env - Make sure virtual environment is activated
- Check if port 3000 is available
- Run
npm installagain if needed - Clear
.nextfolder:rm -rf .next
- Ensure backend is running on http://localhost:8000
- Check backend terminal for errors
- Verify
.env.localhas correct API URL
- Read the full README.md for detailed information
- Check API_DOCUMENTATION.md for API details
- Explore the code in
backend/andfrontend/directories
Happy chatting! 🤖