Inspiration

My inspiration was my frustration with financial trends and my need for a personal application where my bank statements can be organized for expense and income ease of view.

What it does

Cashlapse turns bank and credit card statements (PDF) into a personal P&L that's adjusted for inflation.

  • Upload your statements: drag and drop one or more PDFs, including password-protected ones.
  • Personal info is stripped before any AI sees it: names, addresses, emails, phone numbers, SSNs and account numbers are redacted first. On every statement you can open "What we sent to AI" and see exactly what left.
  • AI parsing with a balance check: Gemini pulls out the transactions as structured data. We then check that the starting balance plus the transactions equals the ending balance. If it doesn't, the statement is flagged for you to review.
  • Review and confirm: you can fix categories before anything is saved.
  • P&L dashboard: revenue, expenses by category and net income, plus a chart of nominal spending against spending in today's dollars, using official CPI data.

How we built it

  • Next.js 16 (App Router) + TypeScript for both the frontend and the backend, using Route Handlers and no separate server.
  • Tiger Data (TimescaleDB) is our only database. Transactions go in a hypertable, and monthly P&L totals come from a continuous aggregate that updates in real time. Inflation adjustments are calculated when you query, by joining those totals to CPI data. We never store adjusted amounts.
  • Gemini with structured JSON output and a response schema, so it reads a whole statement in one call.
  • pdf.js extracts the text, and we redact it with our own rules.
  • FRED API provides the CPI-U series (CPIAUCNS), synced every day by a Vercel cron job. The BEA API provides price data for specific spending categories.
  • Cloudflare R2 keeps the original files in a private bucket. NextAuth + Google OAuth handle sign-in with database sessions.
  • Tailwind v4, shadcn/ui and Recharts power the dark dashboard UI.

Challenges we ran into

  • Statement tables that split across pages, repeated headers and running-balance columns all confused the parser. We fixed this by sending all pages in one call with page markers.
  • redit card statements show money owed, so the balance check had to work both ways.
  • Transfers between your own accounts, like paying a credit card from checking, would be counted twice if they weren't left out of the totals.
  • Tiger Data's private TLS certificate authority and the rate limits on Gemini's free tier.

Accomplishments that we're proud of

  • Accurate tramsmission of transactions from statements
  • Real use of TimescaleDB features (hypertables and continuous aggregates), not just plain Postgres as this was new to us

What we learned

  • How to use Cloudfare R2 for storage services
  • How to deploy a full stack application using a domain

What's next for Cashlapse

Eventual streamlining into more financial view such as financial projections and possibly the ability to make payments and manage money within the app in relation to spending practices.

Built With

Share this project:

Updates

Submission history