A full-stack AI-powered application that lets you upload PDFs and chat with them using natural language. Get instant answers with page citations directly from your documents.
Live Application: Docsy
Repository: GitHub-Docsy
- AI-Powered Chat — Ask questions and get contextual answers from your PDFs
- Smart Citations — Click page numbers to jump to relevant sections
- Built-in PDF Viewer — Zoom, scroll, and navigate seamlessly
- Modern UI — Clean design with glassmorphism and smooth animations
- Fully Responsive — Works on desktop, tablet, and mobile
- React 18 + TypeScript
- Vite (build tool)
- Tailwind CSS (styling)
- react-pdf (PDF rendering)
- Axios (API client)
- Lucide React (icons)
- Node.js + Express
- MongoDB (document metadata)
- Cloudinary (PDF storage)
- Pinecone (vector database)
- HuggingFace (text embeddings)
- Groq (AI chat responses)
src/
├── components/ # UI components (Chat, PDFViewer, FileUpload, etc.)
├── context/ # Global state management
├── services/ # API integration (api.ts)
├── types/ # TypeScript definitions
├── App.tsx # Root component
└── main.tsx # Entry point
- Node.js 18+
- npm or yarn
- Backend API running (see backend setup)
-
Clone the repository
git clone <your-repo-url> cd docsy-frontend
-
Install dependencies
npm install
-
Configure environment variables
Create a
.envfile:VITE_API_URL=http://localhost:5000
-
Start development server
npm run dev
App runs at:
http://localhost:5173
Create .env in backend directory:
# Database
MONGODB_URI=your_mongodb_connection_string
# Cloudinary (PDF Storage)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Pinecone (Vector Database)
PINECONE_API_KEY=your_pinecone_key
PINECONE_INDEX_NAME=your_index_name
# AI Services
HUGGINGFACE_API_KEY=your_huggingface_key
GROQ_API_KEY=your_groq_key
# App Config
CLIENT_URL=http://localhost:5173
NODE_ENV=developmentcd backend
npm install
npm run devBackend runs at: http://localhost:5000
npm run buildOutput will be in the dist/ directory.
| Element | Value |
|---|---|
| Primary | #6366f1 |
| Secondary | #8b5cf6 |
| Success | #10b981 |
| Font | Inter |
| Endpoint | Method | Description |
|---|---|---|
/api/upload |
POST | Upload PDF document |
/api/chat |
POST | Send query, get AI response |
/api/upload/file/:filename |
GET | Retrieve uploaded PDF |
/health |
GET | Server health check |
| Feature | Preview |
|---|---|
| Upload Screen | ![]() |
| Chat And PDF Interface | ![]() |
Contributions are welcome! Feel free to open issues or submit pull requests.
MIT License - feel free to use for personal or commercial projects.
- PDF rendering powered by PDF.js
- AI responses via Groq
- Embeddings from HuggingFace
- PDF storage on Cloudinary
- Vector search with Pinecone
** Built By Harsh Dahiya associated with Playpower Labs ❤️ **

