A production-ready Retrieval-Augmented Generation (RAG) system that allows users to ask questions about technical documentation using natural language. Built with FastAPI, React, and LangChain.
- 🤖 Dual LLM Support: Switch between Google Gemini (cloud) and Ollama (local)
- 📚 Document Ingestion: Automatically processes Markdown documentation
- 🔍 Semantic Search: Uses ChromaDB for fast vector similarity search
- 💬 Modern UI: Clean, responsive React interface
- 📊 Source Citations: Shows which documents were used to generate answers
- 🔒 Privacy-First: Option to run completely offline with local models
User Question → React Frontend → FastAPI Backend → ChromaDB (Vector Search)
↓
LangChain RAG Pipeline
↓
Google Gemini / Ollama (LLM)
↓
Answer + Sources → User
- Python 3.9+
- Node.js 18+
- Google AI API Key (free from Google AI Studio)
- (Optional) Ollama for local mode
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/smartdocs.git cd smartdocs -
Backend Setup
cd backend python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Configure Environment
echo "GOOGLE_API_KEY=your_key_here" > .env
-
Ingest Documentation
python ingest.py
-
Start Backend
uvicorn main:app --reload --port 8000
-
Frontend Setup (in a new terminal)
cd frontend npm install npm run dev -
Access the App Open http://localhost:5173
- Development Guide: Complete step-by-step tutorial
- Features & Implementation: Deep dive into how features work
- Walkthrough: Testing and verification guide
- API Documentation: Auto-generated FastAPI docs (when server is running)
- FastAPI: Modern Python web framework
- LangChain: LLM application framework
- ChromaDB: Vector database for embeddings
- Sentence Transformers: Text embedding model
- Google Gemini API: Cloud LLM
- Ollama: Local LLM runtime
- React: UI library
- Vite: Build tool and dev server
Try asking SmartDocs:
- "What is OmegaCore?"
- "How do I install OmegaCore on Linux?"
- "What is error code 501?"
- "Does it work with Docker?"
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with LangChain
- Powered by Google Gemini
- Vector search by ChromaDB
- Embeddings from Sentence Transformers
Your Name - @yourtwitter
Project Link: https://github.com/YOUR_USERNAME/smartdocs