Talk2PDF is an application that empowers users to ask find answers within their PDF documents.
- Demo Video
- Client Setup
- Server Setup
- Project Structure
- API End Points
- Deployment
- Contact
talk2pdf-demo.mp4
Below steps will guide you, how to set up your project locally. To get a local copy up and running follow these simple example steps.
- Clone Repo
git clone https://github.com/sub1120/Talk2PDF.git
- Install pnp
npm i -g pnpm
- Install dependencies for client
cd client; pnpm i
- Create a .env file and put this
VITE_API_URL=http://localhost:4001/api/v1
- Start client locally
cd client; pnpm run dev
- Install dependencies for server
cd server; npm i
- Create a .env file and put this
PORT=4000
GOOGLE_PALM_API_KEY=YOUR-API-KEY
Note: To create an GOOGLE_PALM_API_KEY
, please visit Get an API key
- Start server locally
cd server; npm run dev
The repository contains two folder, one for frontend code (client
) and other for backend code (server
). Below is description of some important subfolders.
Client Structure
File | Description |
---|---|
client/src |
Contains main srouce code for frontend |
client/src/api |
Contains API Inegration functions |
client/src/components |
Contains react components |
client/src/util |
Contains some helper functions and constants |
client/src/App.tsx |
Its root component of our application |
client/src/main.tsx |
Its app entry point. |
Server Structure
File | Description |
---|---|
server/controllers/chat.controllers.ts |
Defined controller to get answer from llm. |
server/controllers/doc.controller.ts |
Defined controllers to upload or delete document and vectorstore. |
server/middleware/uploader.middleware.ts |
Defined middleware to validate file and upload to server. |
server/router/doc.router.ts |
Defined all api routes for doc controllers. |
server/router/chat.router.ts |
Defined all api routes for chat controllers. |
server/config |
Contains all config varibles required by app. |
server/types |
Defined types. |
server/util |
Contains some helper functions and constants |
POST /api/v1/doc/upload
DEL /api/v1/doc/delete
POST api/v1/chat/answer
Body
{
"question": "Your question"
}
-
Frontend deployed on netlfy.com
-
Backend deployed on render.com
Contact on subhamsahu1120@gmail.com
for any kind of support