AI Financial Forensics for Messy Bank Statement PDFs

AI products · Creator, sole engineer · shipped

Bank statements are a parsing nightmare - every bank uses a different PDF layout, and mobile payment transactions have their own irregular format. And even once parsed, a table of transactions changes nobody's behaviour.

Code: https://github.com/vasu-devs/RupeeRoast

The detail

Extraction uses a layout-aware parser as the primary path after a simpler library failed on multi-column statements, with a fallback for edge cases and validated schemas throughout, so a malformed extraction fails loudly rather than producing silently wrong totals in a financial tool.

Two models split the work by their actual characteristics: a fast one categorises every transaction, which is high-volume and low-creativity, and a separate one writes the analysis, which is the opposite. Using one model for both would be either slow or bland.

The output is a dashboard plus a genuinely readable spending critique. The featured chart is impulsive versus necessary spending - the one visualisation that actually changes behaviour rather than another category pie chart.

Next.js 15, React 19, FastAPI, Recharts, Plotly.

What I did

  • Built the extraction pipeline with a layout-aware primary parser and a fallback path
  • Added validated schemas so malformed extraction fails loudly rather than silently
  • Split categorisation and narrative generation across two models chosen for their different characteristics
  • Built the analytics dashboard and the interactive charts
  • Designed the output around behaviour change rather than another category breakdown

Stack

Python, FastAPI, Next.js, Data Extraction, Machine Learning, PDF Parsing, Groq, Gemini, Recharts, Plotly, Data Visualization

Case study: https://www.siddhvasudev.com/projects/ai-financial-forensics-for-messy-bank