Adds a PostgreSQL partial unique index on (author, chapter, page) where all
three fields are non-null, and returns HTTP 409 when a duplicate is detected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Give the image+text row an explicit 65vh height instead of flex-1 inside
a viewport-locked container. Remove the overall height constraint so
metadata and commit rows sit naturally below with scroll if needed.
Image and textarea containers now use h-full to fill the fixed row height.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change image/text column ratio from 50/50 to 60/40 (3fr 2fr) on both
the New Job result view and the Browse Jobs detail view.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New Job (plain_ocr):
- After OCR completes, the entire main area becomes a flex-column view
pinned to viewport height: image and editable textarea side by side at
top (filling available space), metadata fields in a compact row below,
Commit Job button at the bottom
- "New Analysis" button in the header returns to the upload view
- ResultPanel reverted to simple rendered-output only (no commit logic)
Browse Jobs:
- Selecting a job replaces the search list with a full-screen detail view
using the same layout: image | editable textarea on top, all metadata
fields + Reviewer name + action button in a single row below
- "Back to results" button returns to the search/list grid
- Search results now display as a responsive card grid
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New Job page:
- OCR result now shows source image and editable textarea side by side
- Grounding-box overlay preview moved into the non-commit branch
Browse Jobs / Review page:
- JobDetail uses a 2-column layout: image + read-only info on left,
all editable fields on right
- Author, book, chapter, and page are now editable inputs (not read-only)
- Text textarea is always editable (for both unreviewed and reviewed jobs)
- Reviewer name pre-filled for reviewed jobs; button becomes "Save Changes"
- Outer grid changed to 1/3 list + 2/3 detail for more review space
Backend:
- PUT /api/jobs/{id}/review now accepts and saves author, book,
chapter, page alongside reviewed_text and reviewer_name
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- OCR text is now shown in an editable textarea (plain_ocr mode) so
users can correct it before committing
- editedOcrText state tracks edits; commit job sends the edited value
instead of the original result.text
- Remove silent early-return guard that blocked commit when text was empty
- Copy and download also use the edited text
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add PostgreSQL service to docker-compose with health check and postgres_data volume
- Mount ./ocr_images as bind volume for persistent image storage
- Add backend/database.py with schema init and get_db() context manager
- Add 5 new API endpoints: POST /api/jobs, GET /api/jobs (search), GET /api/jobs/{id},
GET /api/jobs/{id}/image, PUT /api/jobs/{id}/review
- Jobs are saved with author/book/chapter/page metadata, auto UUID, and submitted_at timestamp
- Jobs start as 'unreviewed'; review captures edited text, reviewer name, and reviewed_at
- Add MetadataForm.jsx (author/book/chapter/page inputs) to the New Job panel
- Add JobsPanel.jsx with search/filter, paginated list, and detail pane with review form
- Add "Commit Job" button to ResultPanel (plain_ocr mode only) with success/error feedback
- Add "New Job" / "Browse Jobs" navigation to the app header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace eval() with ast.literal_eval() in pdf_utils.py to fix
unauthenticated remote code execution via crafted PDF uploads
(reported by OX Security)
- Sanitize HTML output with DOMPurify to prevent XSS
- Restrict CORS origins (configurable via CORS_ORIGINS env var)
- Suppress raw exception details in API error responses
- Cap Image.MAX_IMAGE_PIXELS to prevent decompression bomb DoS
- Add security regression test suite
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add prominent "What's New" section highlighting v2.2.0 features
- Add detailed "How to Use" guide for both Image OCR and PDF Processing
- Include output format comparison table
- Add use cases and tips for best results
- Expand tech stack section with new dependencies
- Better structure with clear sections for new users
Features added:
- PDF to image conversion with configurable DPI
- Multi-page PDF processing with OCR
- Export to Markdown, HTML, DOCX, and JSON formats
- Automatic image extraction from PDFs
- Formula and formatting preservation
- Real-time progress tracking for multi-page documents
Backend changes:
- New /api/process-pdf endpoint for PDF processing
- pdf_utils.py: PDF conversion and image extraction utilities
- format_converter.py: Document format conversion (MD, HTML, DOCX)
- Updated dependencies: PyMuPDF, img2pdf, python-docx, markdown
Frontend changes:
- File type toggle (Image OCR / PDF Processing)
- PDFProcessor component with format selection
- Updated ImageUpload to support both images and PDFs
- Progress bars for multi-page processing
- Download options for converted documents
Documentation:
- Updated README with PDF processing features
- Added API documentation for /api/process-pdf endpoint
- Added format conversion examples