Documind is an intelligent document chat application that allows users to interact with PDF documents using natural language queries. By leveraging advanced AI technologies, Documind converts PDFs into searchable vector embeddings, enabling users to ask questions and receive accurate responses based on the document's content.
- PDF document upload and processing
- Conversion of PDF content into vector embeddings
- Natural language querying of document content
- AI-powered responses based on document context
- Next.js - React framework for building web applications
- Drizzle ORM - TypeScript ORM for SQL databases
- PostgreSQL - Open-source relational database
- Pinecone - Vector database for efficient similarity search
- OpenAI API - AI language model for natural language processing
- Node.js (20 or later)
- PostgreSQL
- Pinecone account
- OpenAI API key
- AWS S3 bucket key
-
Clone the repository:
git clone https://github.com/yourusername/documind.git cd documind
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add the following variables:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/ NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/ DATABASE_URL=your_postgresql_connection_string NEXT_PUBLIC_S3_ACCESS_KEY_ID=your_s3_access_key_id NEXT_PUBLIC_S3_SECRET_ACCESS_KEY=your_s3_secret_access_key NEXT_PUBLIC_S3_BUCKET_NAME=your_s3_bucket_name PINECONE_API_KEY=your_pinecone_api_key PINECONE_ENVIRONMENT=your_pinecone_environment OPENAI_API_KEY=your_openai_api_key
-
Run database migrations:
npx drizzle-kit push
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser to see the application.
- Upload a PDF document using the provided interface.
- Wait for the document to be processed and converted into vector embeddings.
- Once processing is complete, start asking questions about the document in natural language.
- Receive AI-generated responses based on the content of your PDF.
Contributions are welcome! Please feel free to submit a Pull Request.