Alpha Release Notice: This project was developed using AI-assisted "vibe coding" methodology with Claude (Opus 4.5) by Anthropic. While functional and tested, users should evaluate suitability for their use case. Use at your own risk.
DeDox = de (undo, remove) + dox (documents) — detoxify your paperwork by transforming chaotic piles of documents into organized, searchable, AI-enhanced archives.
A self-hosted, privacy-first document ingestion service that captures, processes, extracts metadata, and archives documents to Paperless-ngx.
Scan documents with your phone using live edge detection, then watch DeDox automatically extract metadata via local LLM.
Documents are enriched with AI-extracted metadata in Paperless-ngx, then synced to Open WebUI for RAG-powered chat.
Your documents never leave your network. DeDox is designed from the ground up to operate entirely within your local network:
- No cloud dependencies: All processing happens on your hardware
- No external API calls: LLM inference runs locally via Ollama
- No telemetry or tracking: Your data stays yours
- Air-gapped compatible: Works without any internet connection
- Mobile app: Connects only via local network (LAN/WiFi) — no internet traffic, no external servers
This makes DeDox ideal for sensitive documents like financial records, medical documents, legal paperwork, and personal correspondence.
DeDox integrates with external services via their APIs, making each component completely independent and optional:
| Component | Purpose | Required? |
|---|---|---|
| DeDox | Document processing, OCR, metadata extraction | Yes (core) |
| Paperless-ngx | Document storage and archive | Yes |
| Ollama | Local LLM for metadata extraction | Yes |
| Open WebUI | RAG-powered chat with documents | Optional |
- Use existing instances: Already running Paperless-ngx or Open WebUI on your home network? Point DeDox at them — no need to run duplicates
- Mix and match: Don't need AI chat? Disable Open WebUI sync entirely in
config/settings.yaml - Upgrade independently: Each service can be updated, scaled, or replaced without affecting others
- Resource flexibility: Running on limited hardware? Skip Open WebUI and still get full document processing
# config/settings.yaml - Disable Open WebUI if not needed
openwebui:
enabled: false # Simply disable if you don't need RAG chat- 📷 Phone Camera Capture: Live edge detection, perspective correction, multi-page scanning — all via local WiFi, no internet
- 🔍 OCR Processing: Tesseract-based text extraction (German/English) running locally
- 🤖 AI Metadata Extraction: Local LLM-powered extraction of dates, amounts, types, urgency via Ollama
- 🔐 Privacy First: Zero cloud dependencies, zero external API calls, runs entirely on your local network
- 📦 Paperless-ngx Integration: Seamless archival with full metadata mapping (works with existing instances)
- 💬 Open WebUI RAG (optional): Chat with your documents using semantic search and AI-powered Q&A
- ⚙️ Extensible Pipeline: Configurable processing stages and metadata fields
- 🔌 API-First Design: All integrations via standard APIs — plug into your existing infrastructure
All components communicate via standard REST APIs over your local network — no internet required.
┌─────────────────────────────────────────────────────────────────────┐
│ Local Network (No Internet) │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ │
│ │ Mobile App │ ◀──── WiFi/LAN only, no internet traffic │
│ └──────┬───────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ DeDox Web UI │───▶│ DeDox API │───▶│ Paperless-ngx │ │
│ │ (Frontend) │ │ (Python) │ │ (existing or new)│ │
│ └─────────────────┘ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ ┌─────────────┼───────────────────────┤ │
│ │ │ │ │
│ ┌──────────┐ ┌─────▼──────┐ ┌──────▼──────┐ │
│ │ Tesseract│ │ Ollama │ │ Open WebUI │ │
│ │ OCR │ │ LLM │◀───────│ (optional) │ │
│ └──────────┘ └────────────┘ └─────────────┘ │
│ │
│ API-Based Integration: │
│ • Each component is independent and communicates via REST APIs │
│ • Use existing Paperless-ngx/Open WebUI instances on your network │
│ • Remove or disable any optional component without breaking others │
└─────────────────────────────────────────────────────────────────────┘
- Docker & Docker Compose
- 8GB+ RAM recommended (for local LLM)
-
Clone the repository:
git clone <repository-url> cd dedox
-
Copy and configure environment:
cp .env.example .env # Edit .env with your settings -
Start all services:
docker-compose up -d
-
Access the services:
- DeDox API:
http://localhost:8000 - Paperless-ngx:
http://localhost:8080 - Open WebUI:
http://localhost:3000
- DeDox API:
That's it! DeDox automatically handles:
- Paperless-ngx API token generation
- Open WebUI API key generation
- Knowledge base creation
- Workflow setup
Configuration files are located in config/:
settings.yaml- Main application settingsmetadata_fields.yaml- Configurable metadata extraction fieldsdocument_types.yaml- Document type definitionsurgency_rules.yaml- Urgency calculation rules
Once running, access the API documentation at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
- Ingest → Store original, return job ID
- Image Processing → Edge detection, alignment, enhancement
- OCR → Text extraction with Tesseract
- Upload to Paperless → Archive processed document with "Processing..." tag
- Metadata Extraction → LLM-based field extraction
- Finalize → Update Paperless metadata, remove processing tag
- Document Updated → Paperless webhook fires
- Download → Fetch document and metadata from Paperless
- Upload → Send to Open WebUI for processing
- Process → Open WebUI extracts embeddings
- Index → Add to knowledge base for RAG chat
DeDox uses two separate webhooks for different purposes:
Purpose: Trigger DeDox pipeline for OCR and LLM-based metadata extraction
Setup in Paperless:
- Go to Workflows in Paperless admin
- Create new workflow:
- Trigger: Document Updated
- Filter: Tags contain
dedox:reprocess - Action: Webhook
- URL:
http://dedox:8000/api/webhooks/paperless/document-updated - Method: POST
Purpose: Sync ALL document updates to Open WebUI for semantic search
Setup in Paperless:
- Go to Workflows in Paperless admin
- Create new workflow:
- Trigger: Document Updated
- Filter: (None - trigger on ALL updates)
- Action: Webhook
- URL:
http://dedox:8000/api/webhooks/paperless/document-sync - Method: POST
Note: These workflows are independent. Reprocessing a document will trigger both: first the DeDox processing pipeline, then when metadata is updated back to Paperless, the sync webhook fires and updates Open WebUI.
Open WebUI settings can be configured in config/settings.yaml:
openwebui:
enabled: true # Enable/disable sync
base_url: "http://open-webui:8080" # Internal API URL
frontend_port: 3000 # External access port
api_key: "${DEDOX_OPENWEBUI_API_KEY:}"
knowledge_base_id: "dedox-documents"
auto_create_knowledge_base: true
timeout_seconds: 60
wait_for_processing: true
max_processing_wait: 300To disable Open WebUI sync temporarily, set enabled: false in the config.
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run development server
uvicorn dedox.api.app:app --reload --port 8000docker-compose up -dAlready have Paperless-ngx or Open WebUI running on your network? Connect DeDox to your existing infrastructure:
# Configure existing service URLs in .env
DEDOX_PAPERLESS_URL=http://your-paperless-server:8000
DEDOX_PAPERLESS_TOKEN=your-existing-token
DEDOX_OPENWEBUI_URL=http://your-openwebui-server:3000 # optional
# Run minimal DeDox (without bundled Paperless/Open WebUI)
docker-compose -f docker-compose.minimal.yml up -dIf you don't need RAG chat capabilities, simply disable Open WebUI in your config:
# config/settings.yaml
openwebui:
enabled: false# Run all tests
pytest
# Run with coverage
pytest --cov=dedox --cov-report=html
# Run specific test file
pytest tests/test_pipeline.py -vPOST /api/auth/login- Login and get JWT tokenPOST /api/auth/register- Register new userGET /api/auth/me- Get current user infoPOST /api/auth/api-keys- Create API key
POST /api/documents/upload- Upload documentGET /api/documents- List documentsGET /api/documents/{id}- Get document detailsGET /api/documents/{id}/metadata- Get extracted metadataPUT /api/documents/{id}/metadata- Update metadataDELETE /api/documents/{id}- Delete document
GET /api/jobs- List processing jobsGET /api/jobs/{id}- Get job statusGET /api/jobs/{id}/progress- Get detailed progressPOST /api/jobs/{id}/cancel- Cancel jobPOST /api/jobs/{id}/retry- Retry failed job
GET /api/search/metadata- Search by metadata fieldsGET /api/search/recent- Recent documents
Note: Semantic search has been moved to Open WebUI. Use the RAG chat interface for natural language document queries.
GET /api/config/metadata-fields- Get extraction fields configGET /api/config/document-types- Get document typesGET /api/config/settings- Get public settingsGET /api/config/status- Get system status
GET /health- Basic health checkGET /health/detailed- Detailed service status
Ollama not responding:
- Ensure the Ollama container is healthy:
docker-compose logs ollama - The model download can take time on first start
- Check GPU availability if using NVIDIA acceleration
Paperless-ngx connection issues:
- Verify
PAPERLESS_URLandPAPERLESS_TOKENin your.env - For bundled Paperless, wait for initialization (can take 1-2 minutes)
- Check network connectivity between containers
OCR producing poor results:
- Ensure documents are well-lit and in focus
- Check OCR language configuration in
config/settings.yaml - Review the image processing logs for warnings
Contributions are welcome! This project was built with "vibe coding" and we encourage contributors to continue in that spirit.
- 🐛 Bug Reports: Found something broken? Open an issue!
- 💡 Feature Requests: Have an idea? Check docs/GITHUB_ISSUES.md for planned features or suggest new ones
- 🔧 Code Contributions: Pick an issue from our feature backlog and submit a PR
- 📖 Documentation: Help improve docs, add examples, or create tutorials
- 🧪 Testing: Add test coverage or report edge cases
- Check docs/GITHUB_ISSUES.md for a list of features ready for implementation
- Look for issues labeled
good first issuefor beginner-friendly tasks - Read CONTRIBUTING.md for code style and PR guidelines
This project was entirely developed using Claude Code and we encourage contributors to do the same! Using AI-assisted development:
# Install Claude Code CLI
npm install -g @anthropic-ai/claude-code
# Start coding with Claude
claude
# Example: Pick a feature from the backlog
> "Implement the duplicate document detection feature from docs/GITHUB_ISSUES.md"The codebase is structured to be AI-friendly with clear separation of concerns, comprehensive type hints, and well-documented configuration. Claude Code works exceptionally well with this architecture.
Pro tip: Point Claude at docs/GITHUB_ISSUES.md and ask it to implement any feature—the issues include technical details and acceptance criteria that help guide the implementation.
Apache License 2.0 - see LICENSE file for details.
This project was developed with significant assistance from Claude (Opus 4.5) by Anthropic, serving as an AI pair programmer throughout development.
Additional thanks to:
- Paperless-ngx - Document management system
- Ollama - Local LLM inference
- Tesseract OCR - Text recognition engine
- FastAPI - Modern web framework
- Open WebUI - RAG-powered document chat interface



