Skip to content

kar137/QueryPilot-SmartDocsAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QueryPilot-SmartDocsAssistant

Typing SVG

πŸ€– Next-Generation AI Documentation Assistant with Intelligent Conversational Forms

FastAPI Next.js Google AI Docker TypeScript

🌟 Live Demo β€’ πŸ“š Documentation β€’ πŸš€ Deploy β€’ 🀝 Contributing


🎯 What is QueryPilot?

QueryPilot is a cutting-edge AI documentation assistant that revolutionizes how you interact with your documents. Powered by advanced RAG (Retrieval-Augmented Generation) technology and Google's Gemini AI, it transforms static documents into interactive knowledge bases.

✨ Key Highlights

  • Smart Document Analysis - Upload PDFs, DOCX, or TXT files and get instant answers
  • Precision RAG Technology - Advanced vector search with FAISS for accurate responses
  • Conversational UI - Modern Next.js interface with real-time chat experience
  • Intelligent Booking - AI-powered appointment scheduling with natural language processing
  • Enterprise-Ready - Containerized architecture with professional-grade deployment
  • Multi-Format Support - Handles various document types with smart text extraction

πŸ› οΈ Tech Stack

Category Technologies
Frontend Next.js 15, React 19, TypeScript, Tailwind CSS v4
Backend FastAPI, Python 3.10+, Uvicorn
AI/ML Google Gemini 1.5-Flash, LangChain, FAISS
Database SQLite, Vector Storage
DevOps Docker, Docker Compose
Styling Modern UI/UX with Dark/Light themes

Features That Set Us Apart

πŸ“„ Document Intelligence

  • Multi-format Support: PDF, DOCX, TXT processing
  • Smart Chunking: Optimal text segmentation for better retrieval
  • Vector Search: Advanced FAISS-powered semantic search
  • Context Preservation: Maintains document relationships

πŸ’« User Experience

  • Modern Interface: Sleek Next.js with responsive design
  • Real-time Chat: Instant responses with typing indicators
  • Theme Support: Professional dark/light mode switching
  • File Management: Drag-and-drop upload with progress tracking

πŸ€– AI-Powered Features

  • Natural Conversations: Context-aware chat interactions
  • Intelligent Routing: Smart request classification
  • Error Recovery: Graceful API quota handling
  • Multi-session: Concurrent user support

πŸ“… Smart Booking System

  • Conversational Forms: Natural language data collection
  • Input Validation: Email, phone, date verification
  • Date Parsing: "next Monday" β†’ structured dates
  • Database Integration: Persistent appointment storage

πŸ“‚ Project Structure

QueryPilot-Docs/
β”œβ”€β”€ 🎨 frontend/                 # Next.js Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                 # App Router pages
β”‚   β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   └── contexts/            # React contexts (Theme, etc.)
β”‚   β”œβ”€β”€ tailwind.config.ts       # Tailwind configuration
β”‚   └── package.json
β”‚
β”œβ”€β”€ βš™οΈ backend/                  # FastAPI Server
β”‚   β”œβ”€β”€ main.py                  # API endpoints & routing
β”‚   β”œβ”€β”€ chatbot.py              # Core AI logic (LangChain + Gemini)
β”‚   β”œβ”€β”€ form_agent.py           # Conversational form handler
β”‚   β”œβ”€β”€ db.py                   # Database operations
β”‚   β”œβ”€β”€ requirements.txt        # Python dependencies
β”‚   └── data/                   # Document storage & vectors
β”‚       β”œβ”€β”€ faiss_index/        # Vector database
β”‚       └── sample_docs/        # Example documents
β”‚
β”œβ”€β”€ 🐳 Docker Files
β”‚   β”œβ”€β”€ docker-compose.yml      # Multi-container orchestration
β”‚   β”œβ”€β”€ Dockerfile              # Backend container
β”‚   └── Dockerfile.frontend     # Frontend container
β”‚
└── πŸ“‹ Documentation
    └── README.md               # This file

βš™οΈ Quick Start Guide

πŸ“‹ Prerequisites

  • Docker & Docker Compose (Recommended)
  • Python 3.10+ & Node.js 18+ (For local development)
  • Google AI API Key (Get it here)

🐳 Docker Deployment (Recommended)

# 1️⃣ Clone the repository
git clone https://github.com/kar137/QueryPilot-Docs.git
cd QueryPilot-Docs

# 2️⃣ Set up environment variables
echo "GOOGLE_API_KEY=your_gemini_api_key_here" > backend/.env

# 3️⃣ Launch with Docker Compose
docker-compose up --build -d

# πŸŽ‰ Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docs

πŸ› οΈ Local Development

πŸ”§ Expand for local setup instructions

Backend Setup

cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
echo "GOOGLE_API_KEY=your_api_key" > .env
uvicorn main:app --reload --port 8000

Frontend Setup

cd frontend
npm install
npm run dev

How to Use QueryPilot

πŸ“€ 1. Upload Documents

  • Drag and drop or click to upload PDF, DOCX, or TXT files
  • Watch the real-time upload progress
  • Get confirmation when documents are processed

πŸ’¬ 2. Start Conversations

πŸ‘‹ "Hello" β†’ Get a friendly introduction
❓ "What is machine learning?" β†’ Ask about document content
πŸ“„ "Summarize the key points" β†’ Get document summaries
πŸ“… "Book an appointment" β†’ Start the booking process

πŸ“… 3. Smart Appointment Booking

The AI will conversationally collect:

  • βœ… Name: Your full name
  • βœ… Email: Validated email address
  • βœ… Phone: Formatted phone number
  • βœ… Date: Natural language ("next Friday", "tomorrow", "Dec 25th")

πŸ“Έ Demo Screenshots

🎨 Modern Interface

QueryPilot Main Interface

πŸ’¬ Intelligent Chat

Chat Interface

πŸ“… Smart Booking

Appointment Booking
πŸ“± View More Screenshots

πŸŒ™ Dark Mode

Dark Mode

πŸ“Š Document Analysis

Document Analysis

⚑ Real-time Processing

Processing

πŸ”§ API Reference

πŸ“š Expand API Documentation

Core Endpoints

Method Endpoint Description
POST /upload Upload documents for processing
POST /chat-json Send chat messages and get AI responses
POST /book-appointment Direct appointment booking
POST /clear-documents Clear all uploaded documents
GET /appointments List all appointments

Example Usage

// Chat with the AI
const response = await fetch("/chat-json", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    message: "What are the key findings?",
    conversation_id: "user-123",
  }),
});

🀝 Contributing

We welcome contributions! Here's how you can help:

🌟 Ways to Contribute

  • πŸ› Bug Reports: Found an issue? Open an issue
  • πŸ’‘ Feature Requests: Have ideas? Share them with us
  • πŸ”§ Code Contributions: Submit pull requests
  • πŸ“– Documentation: Help improve our docs
  • ⭐ Star the Repo: Show your support!

πŸ“ Development Guidelines

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

Support & Contact

Need Help? We're Here for You!

GitHub Issues

Built with ❀️ by Karan Bista

⭐ If you found QueryPilot helpful, please star the repository! ⭐


Ready to revolutionize your document workflow? Get started now!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published