If you’ve ever had to prove which dollars in a drained bank account belong to you vs. a spouse, you’ve run into the Lowest Intermediate Balance Rule (LIBR). It’s a 50-year-old legal precedent (See v. See, 1966) that is a nightmare to calculate manually.
I’m a dev who got frustrated seeing forensic accountants charge $500/hr to do this in spreadsheets. So I built Exit Protocol to automate the forensic tracing and "impeachment" of financial lies.
Just to share a bit of the engineering headache behind this: The hardest part wasn't the Django backend, it was getting the LIBR (Lowest Intermediate Balance Rule) logic to handle edge cases in the PDF parsing.
Bank statements often group transactions by date, not time. If a user deposits $5k and withdraws $5k on the same day, the order matters for the 'dip' calculation. I ended up having to write a heuristic that forces 'Withdrawals First' (worst-case scenario for the claimant) to ensure the report stands up to conservative judicial scrutiny.
If anyone here has worked with financial event sourcing for legal compliance, I'd love to know how you handle same-day timestamp ambiguity.
This is synthetic demo data kept it short so people could see the methodology clearly. Real reports have way more transactions (platform handles 10k+ via Celery).
It's meant to be public as a sample showing the output format. Real client data is obviously private/encrypted.
OP here – thanks for the feedback. I just pushed an update to address the Chain of Custody concerns.
The system now generates immutable forensic reports with SHA-256 integrity hashes for every document. Also added a regression suite to verify the tracing algorithm against known edge cases. The focus is definitely shifting from just "AI wrapper" to "Audit Compliance tool.
The Hard Part was OCR. I benchmarked Tesseract vs. Mistral OCR-3 on messy bank PDFs; Mistral won because it understands table layouts.
Built with Django/Celery to handle 10k+ transaction ledgers.
Happy to answer questions about the OCR pipeline or the graph theory implementation.
reply