🚀 A modern PDF Comparison Tool built with Django (Backend) & React + Vite (Frontend).
Easily upload, compare, and track differences between two PDF files with an intuitive UI and history feature.
- 📤 Upload two PDF files for comparison
- 🔍 Extracts and compares text to highlight differences
- 📝 Stores comparison history in the database
- 📊 View previous comparisons and reload them
- 🎨 Clean React UI with Material UI and React-PDF
Component | Technology | Purpose |
---|---|---|
🧠 Backend | Django + DRF | API creation, storage, and comparison logic |
💾 Database | SQLite | Lightweight storage for comparisons |
📄 PDF Processing | PyPDF2 (PyMuPDF) | Extracts text content from PDFs |
🖼️ Frontend | React + Vite + MUI | UI, table, and PDF rendering |
🔗 State Mgmt | React Hooks | State handling for file comparison |
- Decoupled Frontend & Backend
frontend/
– React + Vite app for UIbackend/
– Django REST Framework for APIs
- Static File Integration – React build served via Django
- Reusable APIs – Upload, Compare, and History endpoints
- Simple DB – SQLite for local storage (can be replaced with Postgres/MySQL)
- 📄 Upload PDFs – User selects two PDF files
- 🧠 Text Extraction – Backend extracts text from both PDFs
- 🔍 Comparison – Differences are computed and summarized
- 🗃️ History Storage – Comparison details are saved in DB
- 📜 Results Display – Side-by-side PDF view with difference summary
-
Go to backend folder cd backend
-
Create virtual environment
- python -m venv venv
- source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies pip install -r requirements.txt
-
Create .env file (inside backend/)
- DJANGO_SECRET_KEY=your_secret_key
- DJANGO_DEBUG=True
- DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
-
Run migrations python manage.py migrate
-
Start the backend server python manage.py runserver
-
Go to frontend folder cd frontend
-
Install dependencies npm install
-
Start development server npm run dev
-
Build for production npm run build
1️⃣ Start backend: python manage.py runserver
2️⃣ Start frontend (dev mode): npm run dev
3️⃣ Access the app: 🌐 http://127.0.0.1:8000
Made with ❤️ using Django + React + Vite + MUI to demonstrate a full-stack PDF comparison workflow.