Customizable RAG-powered chatbot with embeddable widget and admin dashboard
A production-ready AI chatbot system that allows organizations to create their own AI assistants by uploading documents or providing URLs. The chatbot can be embedded into any website with a single script tag.
- 🧠 RAG (Retrieval-Augmented Generation): Answers questions based on your uploaded documents
- 💬 Embeddable Widget: Beautiful floating chat bubble that works on any website
- ⚙️ Admin Dashboard: Manage documents, customize appearance, and configure settings
- 🚀 FastAPI Backend: High-performance Python API with ChromaDB vector storage
- 🎨 Customizable UI: Brand colors, bot names, and greeting messages
- 📄 Multi-Format Support: PDF uploads and URL scraping
chatbot/
├── backend/ # FastAPI server + RAG engine
│ ├── main.py # API endpoints
│ ├── rag_engine.py # LangChain + ChromaDB logic
│ ├── requirements.txt # Python dependencies
│ └── .env.example # Environment template
├── frontend/
│ ├── widget/ # Embeddable chat widget (React)
│ └── dashboard/ # Admin control panel (React)
├── test_embed.html # Demo integration page
├── DEPLOYMENT.md # Production hosting guide
└── WALKTHROUGH.md # Full feature overview
- Python 3.10+
- Node.js 18+ (for frontend)
- Google Gemini API Key (Get one here)
git clone https://github.com/Mfoniso1/chatbot.git
cd chatbotcd backend
# Install dependencies
pip install -r requirements.txt
# Create .env file
echo "GOOGLE_API_KEY=your_actual_api_key_here" > .env
# Start the server
python main.pyBackend will run on http://localhost:8000
cd frontend/dashboard
# Install dependencies
npm install
# Start dev server
npm run devDashboard will run on http://localhost:5173
Open test_embed.html in your browser to see the chatbot in action!
Create backend/.env:
GOOGLE_API_KEY=your_gemini_api_key
PORT=8000Add this to any website:
<script src="https://your-cdn.com/widget.js"></script>- WALKTHROUGH.md - Complete feature guide
- DEPLOYMENT.md - Production hosting instructions
- SETUP.md - Detailed setup guide
This project is designed for collaboration! To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Backend:
- FastAPI
- LangChain
- ChromaDB
- Google Gemini API
Frontend:
- React + Vite
- Framer Motion
- Lucide Icons
- Axios
This project is open source and available under the MIT License.
For questions or issues:
- Open an issue on GitHub
- Check the WALKTHROUGH.md for detailed usage
- Review DEPLOYMENT.md for hosting help
Built with ❤️ for developers who want to add AI to their websites