pdf-chat is a simple app that enables users to chat with their PDFs using langchain and openai. It relies on essential dependencies such as AWS SDK, Next.js, Pinecone, React Query, and more.
├── .eslintrc.json
├── .gitignore
├── README.md
├── components.json
├── drizzle.config.ts
├── next.config.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
│ ├── next.svg
│ └── vercel.svg
├── src
│ ├── app
│ │ ├── api
│ │ │ ├── chat
│ │ │ │ └── route.ts
│ │ │ ├── create-chat
│ │ │ │ └── route.ts
│ │ │ ├── delete-chat
│ │ │ │ └── route.ts
│ │ │ ├── get-messages
│ │ │ │ └── route.ts
│ │ │ ├── stripe
│ │ │ │ └── route.ts
│ │ │ └── webhook
│ │ │ └── route.ts
│ │ ├── chat
│ │ │ └── [chat_id]
│ │ │ └── page.tsx
│ │ ├── favicon.ico
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── sign-in
│ │ │ └── [[...sign-in]]
│ │ │ └── page.tsx
│ │ └── sign-up
│ │ └── [[...sign-up]]
│ │ └── page.tsx
│ ├── components
│ │ ├── ChatComponent.tsx
│ │ ├── ChatSideBar.tsx
│ │ ├── FileUpload.tsx
│ │ ├── MessageList.tsx
│ │ ├── PDFViewer.tsx
│ │ ├── Provider.tsx
│ │ ├── SubButton.tsx
│ │ └── ui
│ │ ├── button.tsx
│ │ ├── input.tsx
│ │ └── progress.tsx
│ ├── lib
│ │ ├── context.ts
│ │ ├── db
│ │ │ ├── index.ts
│ │ │ └── schema.ts
│ │ ├── embeddings.ts
│ │ ├── pinecone.ts
│ │ ├── s3-server.ts
│ │ ├── s3.ts
│ │ ├── stripe.ts
│ │ ├── subscription.ts
│ │ └── utils.ts
│ └── middleware.ts
├── tailwind.config.js
├── tailwind.config.ts
└── tsconfig.json
- src: Root directory of the TypeScript project.
- src/app: Contains the core application logic and components.
- src/app/api: Handles API-related functionalities.
- src/app/chat: Manages chat functionality.
- src/app/sign-in: Handles user sign-in functionality.
- src/app/sign-up: Manages user sign-up functionality.
- src/components: Contains reusable UI components.
- src/components/ui: Houses UI-specific components.
- src/lib: Contains project-specific libraries.
- src/lib/db: Manages database-related functionalities.
- aws-sdk: JavaScript library for interacting with AWS services, including S3 for storage.
- clerk/nextjs: Authentication and user management for Next.js applications.
- neondatabase/serverless: Serverless framework for deploying and managing serverless functions.
- pinecone-database/pinecone: Vector similarity search engine for efficient data retrieval.
- radix-ui/react-progress: UI component for displaying progress indicators.
- tanstack/react-query: Data fetching and caching library for React applications.
- uploadthing/react: React component for handling file uploads.
- vercel/analytics: Analytics package for tracking usage and performance metrics.
-
Step 1
-
Step 2
1.Clone the pdf-chat repository:
git clone https://github.com/mezamateoj/pdf-chat
2.Install the dependencies with one of the package managers listed below:
pnpm install
bun install
npm install
yarn install
3.Start the development mode:
pnpm dev
bun dev
npm run dev
yarn dev
[Chat PDF](https://ai-pdfchat.vercel.app/)