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
- Scan a letter as PDF (any scanner, any language)
- Drop it into the project folder
- Claude Vision reads the image, extracts structured data, generates English summary + recommendations
- Documents are automatically grouped into issues by sender + reference number
- Track action items, mark them done, ask questions about your documents
Requirements
- Python 3.10+
- Poppler (for PDF to image conversion)
- Anthropic API key (~$0.01 per page)
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50c4aeebd18d273d580b52bd206e5dbc9bb8edfcc0da1eb6114da25200c8b3a4
|
|
| MD5 |
c03b857598d5d25927d08b339ec69f45
|
|
| BLAKE2b-256 |
ffef2531c1c44a31b70100074dc049a9d9340e681d13a9997fb42e7aae847a06
|
Provenance
The following attestation bundles were made for mamadoc-0.2.0.tar.gz:
Publisher:
publish.yml on capraCoder/mamadoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mamadoc-0.2.0.tar.gz -
Subject digest:
50c4aeebd18d273d580b52bd206e5dbc9bb8edfcc0da1eb6114da25200c8b3a4 - Sigstore transparency entry: 946361515
- Sigstore integration time:
-
Permalink:
capraCoder/mamadoc@d8cf1f9e2c7035603a7efe29ac7351ea65067618 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/capraCoder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8cf1f9e2c7035603a7efe29ac7351ea65067618 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fe9b17e4f91960bb3e5275d5503fc635f0a80041971a7f9518caa541211f440
|
|
| MD5 |
698c90406cb2afb304b82ea6237b5abe
|
|
| BLAKE2b-256 |
a2b8d232ec60f791c15322f8a23d91272168fe8a954dac60a43d93c975ea88d0
|
Provenance
The following attestation bundles were made for mamadoc-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on capraCoder/mamadoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mamadoc-0.2.0-py3-none-any.whl -
Subject digest:
8fe9b17e4f91960bb3e5275d5503fc635f0a80041971a7f9518caa541211f440 - Sigstore transparency entry: 946361529
- Sigstore integration time:
-
Permalink:
capraCoder/mamadoc@d8cf1f9e2c7035603a7efe29ac7351ea65067618 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/capraCoder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8cf1f9e2c7035603a7efe29ac7351ea65067618 -
Trigger Event:
release
-
Statement type: