Skip to content

SarveshAtawane/DocuAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ DocuAI - Enterprise Chatbot Platform

DocuAI Logo FastAPI MongoDB Celery LangChain

Transform your business documentation into intelligent chatbots in minutes

πŸš€ Quick Start β€’ πŸ“š Documentation β€’ 🎯 Use Cases β€’ πŸ› οΈ Tech Stack


πŸ’‘ The Problem We Solve

Imagine you're a developer at boAt and customers constantly ask: "How do I return my earphones?" The information exists across multiple PDFs, web pages, and documentationβ€”but customers want instant, conversational answers, not endless searching through documents.

DocuAI transforms your static documentation into intelligent, conversational chatbots that understand context and provide precise answers from your actual business content.


⚑ How It Works

Real-World Example: E-commerce Support Bot

Before DocuAI:

  • Customer searches through multiple pages for return policy
  • Gets frustrated, contacts support
  • Support team overwhelmed with repetitive queries

After DocuAI:

  1. Upload your website URLs + policy documents to DocuAI dashboard
  2. AI processes entire website and documents automatically
  3. Get secure API key for instant integration
  4. Customer asks: "How do I return my earphones?"
  5. Bot responds with precise answers from your documentation
# Simple API integration
curl -X POST "https://api.docuai.com/query" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"query": "How do I return my earphones?"}'

🎯 Use Cases

🏒 Enterprise Customer Support

  • Internal Knowledge Bases: HR policies, training materials
  • Customer FAQs: Instant answers from product documentation
  • Troubleshooting Guides: Technical support automation

πŸ›’ E-commerce Platforms

  • Return/Exchange Policies: Automated customer service
  • Product Information: Detailed specs and compatibility
  • Shipping & Delivery: Real-time policy updates

πŸŽ“ Educational Institutions

  • Course Materials: Interactive learning assistants
  • Research Papers: Conversational academic queries
  • Administrative Policies: Student services automation

πŸ’Ό SaaS & Tech Companies

  • API Documentation: Developer-friendly query interface
  • User Guides: Interactive onboarding assistance
  • Feature Announcements: Contextual product updates

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • MongoDB
  • SQLite (local database file)
  • Redis (for Celery)

Installation

# Clone the repository
git clone https://github.com/yourusername/docuai.git
cd docuai

# Install dependencies
pip install -r requirements.txt

# Set environment variables
cp .env.example .env
# Edit .env with your configurations

# Start all services
./runall.sh

Environment Configuration

# Database
MONGODB_URL=mongodb://localhost:27017/docuai
SQLITE_DATABASE_URL=sqlite:///./docuai.db

# API Keys
GEMINI_API_KEY=your-gemini-api-key
JWT_SECRET_KEY=your-jwt-secret

# Celery
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0

# Email (for OTP)
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client Apps   β”‚    β”‚   FastAPI       β”‚    β”‚   Celery        β”‚
β”‚                 β”‚    β”‚   REST API      β”‚    β”‚   Workers       β”‚
β”‚ β€’ Web Frontend  │◄──►│                 │◄──►│                 β”‚
β”‚ β€’ Mobile Apps   β”‚    β”‚ β€’ Authenticationβ”‚    β”‚ β€’ Web Crawling  β”‚
β”‚ β€’ Third-party   β”‚    β”‚ β€’ Query Handler β”‚    β”‚ β€’ Embedding Gen β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚ β€’ Doc Managementβ”‚    β”‚ β€’ Processing    β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚                       β”‚
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚    SQLite       β”‚    β”‚    MongoDB      β”‚
                       β”‚   (docuai.db)   β”‚    β”‚                 β”‚
                       β”‚ β€’ User Data     β”‚    β”‚ β€’ Documents     β”‚
                       β”‚ β€’ API Keys      β”‚    β”‚ β€’ Embeddings    β”‚
                       β”‚ β€’ OTP Tokens    β”‚    β”‚ β€’ Crawled Data  β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Components

  • FastAPI Backend: High-performance REST API with automatic OpenAPI documentation
  • RAG Pipeline: LangChain + Gemini LLM for intelligent document retrieval
  • Vector Database: MongoDB with semantic search capabilities
  • Async Processing: Celery workers for heavy computational tasks
  • Monitoring: Real-time dashboard for usage analytics

πŸ“š API Documentation

Authentication Routes

Method Endpoint Description Request Body
POST /signin/ Register new user {email, password, name}
POST /login/ User login {email, password}
POST /verify-otp/ Verify email OTP {email, otp_code}
POST /resend-verification-email/ Resend OTP {email}

User Management

Method Endpoint Description Auth Required
GET /user-info/ Get basic user info βœ…
GET /user/details/ Get detailed profile βœ…
GET /user-stats/ Usage statistics βœ…
POST /regenerate-api-key/ Generate new API key βœ…

Core Chatbot API

Method Endpoint Description Headers
POST /query Main chatbot endpoint X-API-Key: your-key
GET /health Health check None

Document Management

Method Endpoint Description Auth
POST /doc_upload/ Upload documents βœ…
GET /documents/ List all documents βœ…
DELETE /doc_delete/{doc_id}/ Delete document βœ…
GET /logs/recent_updates/ Recent uploads βœ…

Web Crawling

Method Endpoint Description Auth
POST /start-crawl/ Start website crawl βœ…
GET /crawl-status/{task_id} Check crawl status βœ…
GET /crawled-content/ Get crawled data βœ…

πŸ› οΈ Tech Stack

Backend & API

  • FastAPI - Modern, fast web framework for Python
  • Pydantic - Data validation and settings management
  • SQLAlchemy - SQL toolkit and ORM
  • Alembic - Database migration tool

AI & Machine Learning

  • LangChain - Framework for LLM applications
  • Google Gemini - Large language model
  • Sentence Transformers - Semantic embedding generation
  • FAISS/ChromaDB - Vector similarity search

Data & Storage

  • MongoDB - Document database for embeddings
  • SQLite - Local database file for user data
  • Redis - In-memory cache and message broker

Async & Processing

  • Celery - Distributed task queue

πŸš€ Advanced Features

πŸ” Enterprise Security

  • JWT-based authentication
  • API key rate limiting
  • OTP email verification

πŸ“Š Analytics & Monitoring

  • Usage analytics dashboard
  • Real-time query metrics (upcoming)
  • Popular questions tracking (upcoming)
  • Response quality scoring (upcoming)

⚑ Performance Optimization

  • Asynchronous document processing
  • Intelligent caching strategies (upcoming)
  • Optimized vector search

πŸ”§ Development

Running in Development Mode

rullall.sh

πŸ“ž Support & Contributing

πŸ› Issues & Bug Reports

πŸ’‘ Feature Requests

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸŽ₯ Demo

Demo_docuai.mp4

⭐ Star this repository if DocuAI helped you build better chatbots!

πŸš€ Get Started β€’ πŸ“– Documentation β€’ πŸ’¬ Community

Made with ❀️ by Your Name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors