Docintel is a comprehensive Document Intelligence Platform that leverages AI to help users interact with their documents through natural language queries. Upload documents, extract content automatically, and chat with your files using advanced Retrieval-Augmented Generation (RAG) technology.
- Multi-format Support: Upload PDF, DOCX, and TXT files
- Automatic Parsing: Intelligent content extraction and chunking
- Vector Embeddings: Advanced semantic search capabilities using SentenceTransformers
- RAG-Powered Conversations: Ask questions and get contextual answers from your documents
- Real-time Responses: Instant AI-generated answers based on document content
- Session History: Previous conversations stored per document
- Document Library: Browse and manage all uploaded documents
- Metadata Display: View document details (title, type, upload date, page count)
- Sort & Filter: Organize documents efficiently
- Delete Functionality: Remove documents and associated data
- Split-Panel Design: Document preview on left, chat interface on right
- Highlighting: Referenced document sections highlighted in preview
- Responsive Layout: Works seamlessly on desktop and mobile
- Live Redirects: Auto-redirect to chat after document upload
rag_backend/
├── rag_backend/
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── core/
│ ├── models.py
│ ├── rag_utils.py
│ ├── views.py
│ ├── serializers.py
│ └── urls.py
├── manage.py
└── requirements.txt
docintel-frontend/
├── src/
│ ├── components/
│ │ ├── DocumentCard.js
│ │ ├── ChatInterface.js
│ │ ├── ErrorBoundary.js
│ │ ├── Layout.js
│ │ ├── LoadingSpinner.js
│ │ └── FileUpload
│ ├── context/
│ │ └── DocumentContext.js
│ ├── hooks/
│ │ ├── useChat.js
│ │ ├── useCsrf.js
│ │ └── useDocumentUpload.js
│ ├── pages/
│ │ ├── Chatbot.js
│ │ ├── DocumentChat.js
│ │ ├── Dashboard.js
│ │ ├── Library.js
│ │ └── Upload.js
│ └── App.js
└── package.json
- Framework: Django REST Framework
- Database: MySQL (metadata storage)
- Vector Database: FAISS (similarity search)
- Document Parsing:
pdfplumber(PDF processing)python-docx(Word documents)
- Embeddings: SentenceTransformers (
all-MiniLM-L6-v2) - AI Integration: LM Studio (local LLM server)
- Framework: React 18
- Styling: Tailwind CSS
- Routing: React Router
- State Management: React Context API
- HTTP Client: Axios
- File Upload: Multipart form handling
- Python 3.8+
- Node.js 16+
- MySQL 8.0+
- LM Studio (for local LLM)
- Clone the repository
git clone https://github.com/AdityaCJaiswal/DocIntel-Document-Intelligence-Platform
cd DocIntel-Document-Intelligence-Platform/rag_backend- Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate or .\venv\Scripts\Activate.ps1- Install dependencies
pip install -r requirements.txt- Configure Database
# Update settings.py with your MySQL credentials
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'docintel_db',
'USER': 'your_mysql_user',
'PASSWORD': 'your_mysql_password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}
}
}- Run migrations
python manage.py makemigrations
python manage.py migrate- Start development server
python manage.py runserver- Navigate to frontend directory
cd ../frontend- Install dependencies
npm install- Start development server
npm start-
Download and install LM Studio from https://lmstudio.ai
-
Download a compatible model (recommended: Llama 2 7B or similar)
-
Start the local server on default port
http://localhost:1234 -
Update backend configuration to point to your LM Studio endpoint
- Navigate to the home page
- Click "Upload Document" or drag-and-drop files
- Supported formats: PDF, DOCX, TXT
- Automatic processing and redirection to chat interface
- Select a document from your library
- Type questions in the chat interface
- Receive AI-generated answers with source highlighting
- View previous conversation history
- Browse all uploaded documents in the library
- Sort by date, name, or type
- Delete documents and associated data
- Preview document content and metadata
# settings.py
CHUNK_SIZE = 1000 # Document chunking size
CHUNK_OVERLAP = 200 # Overlap between chunks
EMBEDDING_MODEL = 'all-MiniLM-L6-v2' # SentenceTransformer model
LM_STUDIO_URL = 'http://localhost:1234/v1/chat/completions'GET /api/documents/ # List all documents
GET /api/documents/{id} # List documents by id
GET /api/documents/{id}/chunks # List all documents
POST /api/upload/ # Upload new document
DELETE /api/documents/{id}/delete # Delete document
GET /api/{id}/chat-history/ # Get chat history
GET /api/document/api/{id}/chat-history/ # Get chat history
GET /api/session/{id}/ # Get session details
POST /api/ask # Send chat message
- Zero API Costs: Uses LM Studio for free local LLM inference
- No External Dependencies: Fully self-hosted solution
- Scalable: Add more powerful models as needed
- Local Processing: All data stays on your infrastructure
- No Data Sharing: Documents never leave your servers
- Secure: Full control over sensitive information
- Fast Vector Search: FAISS-powered similarity matching
- Efficient Chunking: Optimized document processing
- Real-time Chat: Instant responses with context highlighting
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 for Python code
- Use ESLint/Prettier for JavaScript formatting
- Write tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- SentenceTransformers for embedding models
- FAISS for efficient vector similarity search
- LM Studio for local LLM deployment
- Django REST Framework for robust API development
- React and Tailwind CSS for modern UI development
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: adityajaiswal.codes@gmail.com
- Multi-language Support: Support for non-English documents
- Advanced Analytics: Document insight dashboards
- Collaborative Features: Multi-user document sharing
- API Integration: Support for external LLM providers
- Mobile App: Native iOS/Android applications
- Advanced Search: Filters, tags, and categories
- Export Features: Chat history and document annotations
Built with ❤️ by Aditya Jaiswal
Transform your documents into intelligent, queryable knowledge bases with Docintel.



