Chat-with-pdfs

Chat with PDFs

A TypeScript-based project that allows users to interact with PDF documents through a chat interface. This project leverages Node.js and various npm packages to provide a seamless experience for parsing and querying PDF content.

Project Demo


Features

  • PDF Upload and Processing : Upload PDF documents and parse them for content extraction
  • Interactive Chat Interface : Engage in conversations about the uploaded PDF content
  • AI-Powered Document Analysis : Leverage LangChain and AI models to understand and answer questions about PDF documents
  • Vector Database Integration : Use Pinecone for efficient document similarity search and retrieval
  • User Authentication : Secure user authentication and session management with Clerk
  • Payment Integration : Stripe integration for premium features and subscriptions
  • Real-time Chat : Live chat functionality with markdown support for rich text formatting
  • File Management : Drag-and-drop file upload with Firebase storage integration
  • Responsive Design : Modern, mobile-friendly UI built with Tailwind CSS and Radix UI components
  • Document Preview : View PDF documents directly in the browser using React PDF
  • Toast Notifications : User feedback through interactive toast messages
  • Type Safety : Full TypeScript implementation for enhanced development experience

Technologies Used in Chat with PDF

Core Technologies

  1. Next.js : React framework for server-side rendering and static site generation.
  2. React : JavaScript library for building user interfaces.
  3. TypeScript : Superset of JavaScript that adds static typing.

PDF Handling

  1. pdf-parse : Library for parsing PDF files.
  2. @react-pdf/renderer : Library for rendering PDFs in React.
  3. react-pdf : Library for displaying PDFs in React.

Authentication and Database

  1. @clerk/nextjs : Authentication library for Next.js.
  2. @clerk/elements : UI components for Clerk authentication.
  3. firebase : Backend-as-a-service for building web and mobile applications.
  4. firebase-admin : Firebase Admin SDK for server-side operations.
  5. @pinecone-database/pinecone : Pinecone database client.
  6. @langchain/pinecone : Integration for Pinecone with LangChain.
  7. @langchain/community : Community package for LangChain.

AI and Language Processing

  1. @langchain/openai : OpenAI integration for LangChain.
  2. openai : OpenAI API client.
  3. langchain : Framework for developing applications with language models.

Payment Processing

  1. stripe : Stripe API client for server-side operations.
  2. @stripe/stripe-js : Stripe.js library for client-side operations.

Built with ❤️ by Aditya Prakash