Transform your documents into conversations. Upload PDFs and get instant, accurate answers powered by advanced RAG technology.
Features • Quick Start • Demo • API Docs • Contributing
|
|
graph LR
A[User] --> B[React Frontend]
B --> C[FastAPI Backend]
C --> D[LangChain RAG]
D --> E[Google Gemini]
D --> F[Upstash Vector DB]
C --> G[Clerk Auth]
Backend Technologies
| Technology | Purpose |
|---|---|
| High-performance API framework | |
| RAG orchestration & chains | |
| Embeddings & chat completions | |
| Serverless vector database | |
| PDF parsing & extraction |
Frontend Technologies
| Technology | Purpose |
|---|---|
| UI framework | |
| Type-safe development | |
| Utility-first CSS | |
| Animation library | |
| Authentication & user management |
- Python 3.8+
- Node.js 16+
- npm or yarn
# Navigate to backend directory
cd backend
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env with your API keys (see Environment Variables section)
# Start the server
uvicorn app.main:app --reload🌐 Backend runs on: http://127.0.0.1:8000
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Edit .env with your Clerk key
# Start development server
npm start🌐 Frontend runs on: http://localhost:3000
Backend Configuration (.env)
# Google AI
GOOGLE_API_KEY=your_google_api_key_here
# Upstash Vector Database
UPSTASH_VECTOR_REST_URL=your_upstash_url_here
UPSTASH_VECTOR_REST_TOKEN=your_upstash_token_here
# Clerk Authentication
CLERK_SECRET_KEY=your_clerk_secret_key_here
# CORS
FRONTEND_URL=http://localhost:3000🔗 Get Your API Keys:
- Google AI Studio - For Gemini API access
- Upstash Console - For vector database
- Clerk Dashboard - For authentication
Frontend Configuration (.env)
# API Configuration
REACT_APP_API_URL=http://127.0.0.1:8000
# Clerk Authentication
REACT_APP_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key_here- 🔐 Sign In - Authenticate using Clerk
- 📤 Upload PDF - Drop your document or click to upload
- 💬 Ask Questions - Type your questions in natural language
- ✨ Get Answers - Receive AI-powered responses with context
Interactive API documentation is automatically generated and available at:
🔗 Swagger UI: http://127.0.0.1:8000/docs
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check & API status |
POST |
/ingest |
Upload and process PDF documents |
POST |
/chat |
Query documents with natural language |
curl -X POST "http://127.0.0.1:8000/chat" \
-H "Content-Type: application/json" \
-d '{
"question": "What is the main topic of this document?",
"session_id": "user123"
}'Google’s free tier includes the following limits:
| Limit Type | Value |
|---|---|
| Daily Requests | 1,500 |
| Requests per Minute | 15 |
The system includes built-in rate limiting and automatic retry logic to handle these limits gracefully.
- Support for multiple document formats (DOCX, TXT, etc.)
- Multi-document querying
- Export conversation history
- Custom AI model selection
- Advanced search filters
- Document summarization
- Mobile app
Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Special thanks to these amazing technologies:
- Google Generative AI - Powerful embeddings and chat models
- Upstash - Serverless vector database
- LangChain - RAG framework and orchestration
- Clerk - User authentication and management
- FastAPI - Modern Python web framework
- React - Frontend library