DocuGenie is an intelligent document processing and querying system that allows users to interact with their documents through natural language conversations. It combines advanced document processing with AI-powered querying capabilities to make document interaction more intuitive and efficient.
-
Document Processing
- PDF document upload and processing
- Multiple document format support (PDF, DOCX, Markdown, CSV, Excel, PPTX, Url)
- Automatic document sectioning
- Text extraction and analysis
- Document status tracking
-
Intelligent Querying
- Natural language queries
- Context-aware responses
- GPT-powered document analysis
- Semantic search capabilities
-
Chat Interface
- Persistent chat history
- Interactive document exploration
- Context retention across conversations
- User session management
- Backend Framework: FastAPI
- Database: PgVector (PostgreSQL)
- Frontend: React.js, Tailwind CSS
- Clone the repository:
git clone https://github.com/imontdev25/docugenie.git
cd docugenie/backend
- Set up virtual environment:
poetry shell
- Install dependencies:
poetry install --only-main
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Run the application:
uvicorn app.main:app --reload
POST /api/v1/documents/upload
GET /api/v1/documents/{doc_uuid}/status
GET /api/v1/documents/{doc_uuid}/sections
POST /api/v1/query
GET /api/v1/documents/{doc_uuid}/chat-history
DELETE /api/v1/documents/{doc_uuid}/chat-history
# necessary env variables
POSTGRES_URI
LOGFIRE_TOKEN
LOGFIRE_PROJECT
AZURE_API_KEY
AZURE_API_VERSION
AZURE_ENDPOINT
GEMINI_API_KEY
- Install dependencies:
cd frontend
npm install
- Environment variables:
API_URL=http://localhost:8000
- Run the frontend:
npm run dev
- Build the Docker image:
docker build -t docugenie .
- Run the Docker container:
docker run -d -p 8000:8000 docugenie
import requests
files = {'file': open('document.pdf', 'rb')}
response = requests.post('http://localhost:8000/api/v1/documents/upload', files=files)
doc_uuid = response.json()['doc_uuid']
query_data = {
"query": "What are the main points discussed?",
"doc_uuid": doc_uuid
}
response = requests.post('http://localhost:8000/api/v1/query', json=query_data)
# Format code
ruff check app/ --unsafe-fixes --fix
- Fork the repository
- 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
docugenie/
├── frontend/
├── backend/
└── README.md
- Multi-document comparison
- API rate limiting
- Batch processing
- Export functionality
- Chat history fix
This project is licensed under the License - see the LICENSE file for details.
Made with ❤️ by Bhavik