Skip to content

heyitsadityaa/chat-with-pdf

Repository files navigation

Chat with PDF 📄💬

Chat with PDF is 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 🎥

chat-with-pdfs.mp4

Badges 🏷️

Next.js React TypeScript Node.js Firebase Pinecone Stripe Tailwind CSS LangChain ESLint

Table of Contents 📋

Usage 🚀

After installing the dependencies and building the project, you can start the application with:

npm start

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.

UI Components and Styling 🎨

  1. lucide-react ✨: Icon library for React.
  2. react-dropzone 📤: Library for file dropzone components.
  3. react-markdown 📝: Library for rendering Markdown in React.
  4. daisyui 🌸: Tailwind CSS component library.
  5. tailwindcss 🌊: Utility-first CSS framework.
  6. tailwind-merge 🔄: Utility for merging Tailwind CSS classes.
  7. tailwindcss-animate 🎭: Tailwind CSS plugin for animations.
  8. clsx 🔧: Utility for constructing className strings conditionally.

Payment Processing 💰

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

Utility Libraries 🔧

  1. byte-size 📊: Library for formatting byte sizes.
  2. uuid 🆔: Library for generating UUIDs.

Development Tools 🛠️

  1. eslint 🔍: Linting utility for JavaScript and TypeScript.
  2. eslint-config-next ⚙️: ESLint configuration for Next.js.
  3. postcss 🎨: Tool for transforming CSS with JavaScript plugins.
  4. typescript 📘: TypeScript compiler.
  5. @types/node 🟢: Type definitions for Node.js.
  6. @types/react ⚛️: Type definitions for React.
  7. @types/react-dom 🌐: Type definitions for React DOM.
  8. @types/uuid 🔤: Type definitions for UUID.

About

Chat with PDF is 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.

Topics

Resources

License

Stars

Watchers

Forks

Contributors