Production-grade Python patterns for automating expense-report auditing — receipt OCR, deterministic policy validation, anomaly detection, and reimbursement routing.
🌐 Live site: www.expense-report.org
The Expense Audit Automation Guide is a working engineering reference for finance-operations teams, accounts-payable engineers, corporate-travel platforms, and Python automation builders who want to replace manual reimbursement review with deterministic, auditable pipelines. Every guide is grounded in real, runnable code: schema-validated payloads, minor-unit money, idempotent state machines, cryptographic chain-of-custody, and explainable anomaly scoring — the patterns you actually ship, not toy snippets.
It currently spans 52 in-depth guides across four connected topic areas, each with hand-drawn architecture diagrams, copy-ready Python, configuration references, testing patterns, and operational runbooks.
| Topic area | What you'll build |
|---|---|
| Core Policy Architecture & Taxonomy Design | Turn reimbursement guidelines into deterministic, version-controlled rule sets — normalized taxonomies, tiered spending caps, per-diem tables, and config-as-code policy versioning. |
| Receipt Ingestion & OCR Data Extraction | Build production capture pipelines — image preprocessing, Tesseract tuning, layout-aware pdfplumber parsing, async batch processing, and error categorization. |
| Automated Policy Validation & Anomaly Flagging | Combine deterministic rule evaluation with explainable anomaly scoring — duplicate detection, merchant-category routing, dynamic thresholds, and mileage validation. |
| Reimbursement Routing & Approval Sync | Close the loop after validation — approval-chain routing, idempotent ERP/GL sync, payment-batch reconciliation, and approval-SLA monitoring. |
- Runnable, typed Python — every code block is self-contained, type-annotated, and uses structured logging and explicit audit metadata. No pseudocode.
- Deterministic by design — minor-unit integer money, frozen schemas, idempotency keys, and SHA-256 chained audit ledgers, so every decision is reproducible and defensible under SOX-style review.
- Explains the hard part visually — each guide carries an original, hand-authored inline SVG diagram that adapts to light and dark themes.
- Densely cross-linked — concepts link to the guides that own them, so you can jump laterally through a real pipeline instead of reading top-down.
- Installable PWA — the site works offline, so the most-visited guides stay available on a plane or in a locked-down review room.
- Eleventy (11ty) static-site generator
- Hand-authored inline SVG diagrams, KaTeX, and a custom accessible design system (WCAG 2 AA)
- Progressive Web App (installable, offline-capable) with a service worker
- Deployed on Cloudflare Pages
npm install
npm run build # build the static site into _site/
npm run serve # local dev server with live reloadIssues and suggestions are welcome — open an issue with a correction, a gap you'd like covered, or a pattern you'd like to see. If a code sample doesn't run cleanly in your environment, that's a bug worth reporting.
Content and code © Expense Audit Automation Guide. All rights reserved.
Explore the full guide at www.expense-report.org.