An Enterprise-Grade AI Customer Support SaaS. Leveraging Retrieval-Augmented Generation (RAG) to transform static data into intelligent, context-aware conversations.
WebRAG Assistant enables businesses to build a custom knowledge base by injecting various document types. The system processes these files through a neural pipeline, allowing an AI chatbot to provide accurate support based on real company content.
- JWT Security: Robust token-based authentication for all API endpoints.
- Staff Management: Admin dashboard to manage users, staff roles, and permissions.
- Protected Routes: Strict separation between Admin (Knowledge Managers) and User (Support) views.
- Multi-Format Support: Advanced extraction for
.pdf,.docx,.pptx, and.txt. - Smart Routing: Automated file-type detection choosing the optimal processing engine (pdfplumber, python-docx, python-pptx).
- Semantic Chunking: Intelligent text splitting with configurable overlap to preserve context for the LLM.
- Vector Indexing: Automated embedding and storage in ChromaDB for real-time retrieval.
- Contextual Retrieval: Chatbot queries the vector database to "read" relevant document sections before answering.
- Multi-turn Memory: Maintains conversation history for natural, fluid interactions.
- Modern UI: High-performance, responsive interface built with Tailwind CSS and Framer Motion.
'''text React (UI) ├─ Auth (Login/Register with also OAuth) ├─ Chat UI └─ Admin Upload Page ↓ Django REST API ├─ Auth (JWT) ├─ Document Upload (Multi-format) ├─ Embedding + Vector DB (Chroma) └─ Chat (RAG Pipeline) ↓ LLM + Vector Database
webrag-assistant/ │ ├── manage.py ├── requirements.txt ├── .env │ ├── webrag/ # Project Configuration │ ├── settings.py # JWT, CORS, and Apps config │ └── urls.py # Main API Routing │ ├── accounts/ # Authentication & User Management │ ├── models.py # Custom User & Staff roles │ ├── views.py # Login/Registration logic │ └── serializers.py # JWT & User serialization │ ├── documents/ # Knowledge Base Logic │ ├── services.py # Text extraction (PDF/DOCX/PPTX), Chunking │ ├── views.py # Upload & Multi-format handling │ └── models.py # Document metadata storage │ ├── chat/ # RAG Engine │ ├── services.py # Retrieval + Prompt Engineering │ └── views.py # Chat API endpoints │ ├── vectorstore/ # Vector Database Layer │ └── chroma.py # ChromaDB CRUD operations │ └── media/ # Physical Document Storage
frontend/ └── src/ ├── pages/ # Login, Register, Chat, AdminDashboard, UploadDocuments ├── components/ # Reusable UI: FileUpload, Chat, Button, Input ├── services/ # api.js (Axios Interceptors for JWT) ├── layouts/ # MainLayout (Navigation & Sidebar) ├── App.jsx # Protected Routing logic └── main.jsx
git clone https://github.com/Lido01/webrag-assistant.git cd webrag-assistant
cd backend python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt python manage.py migrate python manage.py runserver
cd frontend npm install npm run dev