The Problem

Extracting text from scanned documents and PDFs typically requires either commercial OCR services with per-page costs or complex pipelines that glue together separate tools for OCR, PDF parsing, and format conversion. This repo packages DeepSeek-OCR into a self-hosted web application with a React frontend and FastAPI backend, covering the full flow from image/PDF upload to structured output in Markdown, HTML, DOCX, or JSON.

What This Does

The app provides two processing modes. Image OCR handles single images with four modes (plain OCR, describe, find, freeform) and renders bounding boxes on results. PDF processing handles multi-page documents up to 100MB with real-time progress tracking and automatic image extraction. Results export to four formats, preserving tables, LaTeX formulas, and document structure.

The backend (backend/main.py) exposes the API and orchestrates processing; backend/pdfutils.py handles PDF-specific logic and backend/formatconverter.py manages the export formats. The frontend (frontend/src/App.jsx) is a single-page React app with Tailwind styling, organized into components (ImageUpload.jsx, PDFProcessor.jsx, ResultPanel.jsx, etc.). Both sides have Dockerfiles, and docker-compose.yml wires them together.

How To Use It

Setup: Run with Docker Compose. The README documents this as the primary path:

git clone <repository-url> cd deepseekocrapp cp .env.example .env docker compose up --build

The first run downloads the model (~5-10GB), which takes time.

Configuration: Copy .env.example to .env. The README mentions configurable ports, upload limits, and API keys, though the specific variable names live in .env.example.

Running it: Access the frontend at http://localhost:3000, the backend API at http://localhost:8000, and interactive API docs at http://localhost:8000/docs. The backend entry point is backend/main.py; the frontend dev server runs from frontend/ via Vite.

Real-World Use

A document digitization workflow: a legal firm scans client agreements as PDFs, uploads them through the web UI, and exports the OCR results as DOCX files for editing in Word. The JSON export option also feeds structured extraction into downstream systems—for example, pulling invoice line items into an accounting database. Because the model runs locally, no document content leaves the network.

Code Health & Issues

Med - No test files exist - repository-wide. OCR pipelines are error-prone (bounding box scaling, PDF page handling); untested code paths will surface in production. Med - No CI/CD pipeline - no .github/ or equivalent config. No automated build or test gate before changes land. Low - No lockfile for Python dependencies - backend/requirements.txt pins versions but not transitive dependencies, so builds aren't fully reproducible. The frontend has package-lock.json implied by package.json but it's not in the file listing. Low - Duplicate entry points - both App.jsx and App.tsx exist in frontend/src/, as do main.jsx/main.tsx and vite.config.js/vite.config.ts. One set is likely stale; this creates confusion about which is authoritative. Low - README references November 2025 - the project claims a November 2025 release date, which may be inaccurate or aspirational; verify before relying on it for planning.

The Bottom Line

This is a functional, feature-complete OCR web app that solves a real problem—self-hosted document digitization with multiple export formats. The Docker setup makes deployment straightforward, and the PDF processing with progress tracking is genuinely useful. It's a vibe-coded project (no tests, no CI, duplicate files), so treat it as a solid starting point rather than production-ready software. Best suited for teams that need a working OCR service quickly and can invest in hardening it.