Skip to content

PuvaanRaaj/DocuLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 DocuLens - AI Document Converter

DocuLens is a premium, AI-powered document digitization tool that transforms images and PDFs into editable documents — Word (.docx), PDF, or plain text (.txt).

Built with a focus on accuracy and aesthetics, it leverages Google Cloud Vision for state-of-the-art OCR and Anthropic's Claude 3.5 Sonnet to intelligently reconstruct document structure, tables, and formatting.

DocuLens UI

✨ Key Features

  • 📸 Advanced OCR: Uses Google Cloud Vision API to detect text with varying fonts, handwriting, and layouts.
  • 🧠 Intelligent Structuring: Claude 3.5 analyzes the raw text to reconstruct headers, lists, tables, and paragraphs.
  • 📑 PDF Input: Upload PDFs — each page is extracted and OCR'd automatically.
  • 📤 Multi-Format Output: Export as Word (.docx), PDF, or plain text (.txt).
  • 📦 Multi-File Upload: Batch upload images and PDFs, merged into a single output document.
  • 🎨 Premium UI: Modern glassmorphic dark-mode interface with drag-and-drop.
  • ⚡ Local & Cloud Ready: Fully Dockerized for easy local development and deployment.

🛠️ Tech Stack

  • Frontend: React, Vite, Tailwind CSS (CDN), Lucide Icons
  • Backend: Python 3.10+, FastAPI
  • AI Services:
    • Google Cloud Vision API (OCR)
    • Anthropic Claude 3.5 Sonnet (Structure Recovery)
  • Infrastructure: Docker, Docker Compose

🚀 Getting Started

Prerequisites

  • Python 3.10+ & Node.js 18+
  • Google Cloud Service Account JSON key (for Vision API)
  • Anthropic API Key (for Claude)
  • Docker (optional, recommended)

🐳 Docker Setup (Recommended)

1. Clone & Configure

git clone https://github.com/yourusername/doculens.git
cd doculens
cp backend/.env.example backend/.env

2. Setup Credentials

  • Paste your ANTHROPIC_API_KEY into backend/.env.
  • Place your Google Cloud Service Account JSON file in backend/ (e.g., backend/service-account.json).
  • Update backend/.env:
    GOOGLE_APPLICATION_CREDENTIALS=/app/service-account.json

3. Run with Docker Compose

# Development (Hot-Reload)
docker-compose -f docker-compose.dev.yml up --build

# Production (Static Build)
docker-compose up --build

Access the app at http://localhost:5174.

🔧 Manual Setup

Click to expand manual setup instructions

Backend

cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your keys
uvicorn main:app --reload --port 8001

Frontend

cd frontend
npm install
npm run dev

☁️ Deployment

This project is configured for easy deployment on Render.

  1. Create a New Web Service on Render pointing to this repo.
  2. Environment Variables: Add ANTHROPIC_API_KEY.
  3. Secret Files: Upload your Google Service Account JSON as a "Secret File" to /etc/secrets/google-credentials.json.
  4. Build Command: npm install && npm run build (if deploying frontend static site).

🤝 Support

If you find this tool helpful, consider supporting the development!

Buy Me A Coffee

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors