π 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.