Skip to main content

AI-powered document tracker: scan letters, get structured extraction and actionable recommendations

Project description

Mamadoc

AI-powered document processing for managing household paperwork. Scan letters as PDFs, get structured extraction with actionable recommendations, and track everything in a Streamlit dashboard.

Built for the real-world problem of managing a pile of unsorted letters — insurance notices, invoices, government correspondence, care facility paperwork — where you need to know what each letter says, what you need to do, and which letters belong to the same matter.

What It Does

  • Multi-language PDF reading — Claude Vision reads scanned documents in any language (German, Turkish, French, etc.) and produces English summaries
  • Structured extraction — sender, date, amount, deadline, urgency, document type, reference numbers
  • Actionable recommendations — each document gets specific action items with deadlines
  • Issue timeline grouping — automatically groups related documents (original letter → reminder → final notice) so you respond to the latest, not the first one you scanned
  • Personal task manager — add your own tasks alongside document-extracted actions
  • Conversational Ask tab — ask questions about your documents and tasks in natural language
  • File watcher — auto-processes new PDFs dropped into the folder

How It Works

Scanned PDF → Claude Vision API → Structured JSON → SQLite → Streamlit Dashboard
  1. Scan a letter as PDF (any scanner, any language)
  2. Drop it into the project folder
  3. Claude Vision reads the image, extracts structured data, generates English summary + recommendations
  4. Documents are automatically grouped into issues by sender + reference number
  5. Track action items, mark them done, ask questions about your documents

Requirements

Installing Poppler

Windows: Download from poppler releases, extract, add bin/ to PATH.

macOS: brew install poppler

Linux: sudo apt install poppler-utils

Install

From PyPI

pip install mamadoc

From source

git clone https://github.com/capraCoder/mamadoc.git
cd mamadoc
pip install -e .

Configure

cp .env.example .env
# Edit .env and add your Anthropic API key

Verify setup:

mamadoc check

Usage

CLI commands

# Check environment setup
mamadoc check

# Process all unprocessed PDFs in the project folder
mamadoc process

# Reprocess a specific document
mamadoc process Document_2026-01-15.pdf --force

# Launch the Streamlit dashboard
mamadoc dashboard

# Watch folder for new PDFs and auto-process
mamadoc watch

Direct module execution

python -m mamadoc.process_pdf
python -m mamadoc.process_pdf Document_2026-01-15.pdf --force
python -m streamlit run mamadoc/app.py
python -m mamadoc.watcher

Dashboard Tabs

Tab Purpose
Dashboard Overview metrics, document table with inline status editing
Issues Grouped timelines per matter (original → reminder → final notice)
Document Detail Full extraction, page image, action items, re-extract/delete
Pending Actions Personal tasks + document-extracted actions with deadlines
Ask Natural language questions about your documents and tasks

Architecture

mamadoc/
  mamadoc/
    __init__.py     — version
    cli.py          — CLI entry point (mamadoc command)
    config.py       — paths, API keys, logging, constants
    prompt.py       — Claude Vision prompts, JSON parsing, validation
    db.py           — SQLite schema + CRUD (documents, actions, issues, tasks)
    process_pdf.py  — PDF → image → Claude Vision → JSON → DB pipeline
    app.py          — Streamlit dashboard (5 tabs)
    watcher.py      — watchdog auto-processor for new PDFs
  .env              — your API key (not committed)
  mamadoc.db        — SQLite database (auto-created)
  processed/        — extracted JSON + page images
  pyproject.toml    — PyPI package config

Cost

Claude Vision API costs approximately $0.01 per page. A typical single-page letter costs about 1 cent to process. The issue-linking step uses the cheaper Haiku model.

Limitations

  • PDFs must be scanned images (not born-digital text PDFs — though those work too)
  • Maximum 20 pages per PDF (configurable in config.py)
  • Interface is English-only (PDF reading works in any language)
  • No multi-user support — single SQLite database, designed for personal use
  • Requires internet connection for Claude API calls

License

MIT License. See LICENSE.

Author

Kafkas M. Caprazli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mamadoc-0.2.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mamadoc-0.2.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file mamadoc-0.2.0.tar.gz.

File metadata

  • Download URL: mamadoc-0.2.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mamadoc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 50c4aeebd18d273d580b52bd206e5dbc9bb8edfcc0da1eb6114da25200c8b3a4
MD5 c03b857598d5d25927d08b339ec69f45
BLAKE2b-256 ffef2531c1c44a31b70100074dc049a9d9340e681d13a9997fb42e7aae847a06

See more details on using hashes here.

Provenance

The following attestation bundles were made for mamadoc-0.2.0.tar.gz:

Publisher: publish.yml on capraCoder/mamadoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mamadoc-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mamadoc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mamadoc-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fe9b17e4f91960bb3e5275d5503fc635f0a80041971a7f9518caa541211f440
MD5 698c90406cb2afb304b82ea6237b5abe
BLAKE2b-256 a2b8d232ec60f791c15322f8a23d91272168fe8a954dac60a43d93c975ea88d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mamadoc-0.2.0-py3-none-any.whl:

Publisher: publish.yml on capraCoder/mamadoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page