How gianluca-gitea/pdf-extractext works
PDF Extract Text is a desktop-assisted PDF processing system: users select PDFs in the GUI, which sends requests through the nginx gateway. Extract converts PDFs to plain text or Markdown (with optional OCR); Documents deduplicates uploads, persists extracted text and metadata in MongoDB, and provides history, status editing, soft deletion, and downloads. The upload orchestration and extraction engine are distinct internal layers. README documents the gateway and service split; source excerpts show the main service calls. The GUI implementation and nginx configuration were not excerpted, so those connections rely on README documentation.
Main entry points: upload_service.py Upload orchestration · default.conf.template HTTP gateway · app/main.py Documents API · app/main.py Extract API
Components 14
Gateway and UI
- Desktop GUI
gui/interface.py - HTTP gateway
nginx/templates/default.conf.template
Document management
- Documents API
services/documents/app/main.py - Upload orchestration
services/documents/app/services/upload_service.py - SHA-256 checksum
services/documents/app/services/checksum_service.py - Document builder
services/documents/app/services/document_builder.py - History and status
services/documents/app/services/document_service.py - Extraction HTTP client
services/documents/app/services/extract_client.py
PDF extraction
- Extract API
services/extract/app/main.py - PDF text and Markdown
services/extract/app/pdf_service.py - OCR engine
Document persistence
- Document repository
services/documents/app/repositories/document_repository.py - MongoDB
Other components
- User
Connections 15
- User → Desktop GUI: selects PDFs
README.md - Desktop GUI → HTTP gateway: calls APIs
README.md - HTTP gateway → Extract API: routes extract
README.md - HTTP gateway → Documents API: routes documents
README.md - Documents API → Upload orchestration: processes uploads
services/documents/app/main.py - Documents API → History and status: handles document operations
services/documents/app/main.py - Upload orchestration → SHA-256 checksum: calculates checksum
services/documents/app/services/upload_service.py - Upload orchestration → Document repository: checks and saves
services/documents/app/services/upload_service.py - Upload orchestration → Extraction HTTP client: requests extraction
services/documents/app/services/upload_service.py - Upload orchestration → Document builder: builds metadata
services/documents/app/services/upload_service.py - Extraction HTTP client → Extract API: posts PDF text
services/documents/app/services/extract_client.py - Extract API → PDF text and Markdown: dispatches extraction
services/extract/app/main.py - PDF text and Markdown → OCR engine: optionally recognizes images
README.md - History and status → Document repository: reads and updates
services/documents/app/services/document_service.py - Document repository → MongoDB: queries and writes
services/documents/app/repositories/document_repository.py