A full-stack application that allows users to upload PDF documents and ask questions about their content using AI-powered natural language processing.
- PDF Upload: Upload and store PDF documents
- Document Management: View, organize, and access your uploaded documents
- AI-Powered Q&A: Ask questions about your documents and receive accurate answers
- Conversational Interface: Follow-up questions and contextual understanding
- Multi-Document Analysis: Connect information across multiple documents
- Semantic Search: Find information based on meaning, not just keywords
- Framework: FastAPI
- NLP Processing: LangChain
- Database: PostgreSQL
- PDF Processing: PyMuPDF
- FileStorage: Cloudinary
- Framework: React.js
- Styling: Tailwind CSS, shadcn
- Python 3.8+
- Node.js 14+ and npm
- Git
- Cloudinary
-
Clone the repository
git clone https://github.com/yourusername/pdf-qa-system.git cd pdf-qa-system/backend
-
Create and activate a virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
# Create a .env file with the following variables DATABASE_URL=postgresql:///./app.db # Add any API keys for LLM services if needed
-
Initialize the database
python init_db.py
-
Start the backend server
uvicorn main:app --reload
The backend will be running at http://localhost:8000
-
Navigate to the frontend directory
cd ../frontend
-
Install dependencies
npm install
-
Configure the API endpoint
# Create a .env file with the backend URL REACT_APP_API_URL=http://localhost:8000
-
Start the development server
npm start
The frontend will be running at http://localhost:3000