mike@kl:~

Ghostbill

A hobby project for learning Java, Spring Boot and Angular, which I haven't used at work. It's a self-hosted app that scans your Gmail receipts and finds the subscriptions you forgot you were paying for.

in progress

Why I built it

Ghostbill is a side project I build in my own time. At work I write TypeScript on the MERN stack, and I wanted to learn Java, Spring Boot and Angular, which I haven't used in a professional setting. So I wanted a project with enough moving parts to need a real backend and frontend: Google sign-in, calls to an LLM, a relational data model with migrations, and a dashboard.

I went with this idea because I'm interested in personal finance. Subscriptions are easy to forget, but the receipts are all sitting in your inbox. Ghostbill reads them, picks out the recurring charges and shows what they add up to each month and each year.

Right now I'm working on Google sign-in and reading receipt emails through the Gmail API. AI extraction, recurring detection and the dashboard come next, then a demo you can click through.

Highlights

  • Connects to Gmail with read-only access through Google OAuth, and encrypts the refresh token at rest.
  • An LLM turns each receipt into structured, validated data: merchant, amount, currency, date, billing cycle and whether it's a free trial. It runs on Gemini through Spring AI, so Claude, OpenAI or a local Ollama model can be swapped in.
  • Recurring detection is plain, unit-tested Java, not the LLM: it groups charges by merchant, works out whether each one is weekly, monthly or yearly, and estimates the next renewal.
  • Keeps LLM calls small: skips emails it has already processed, filters out obvious non-receipts, batches several emails per request and backs off when rate-limited.
  • Stores only the extracted fields and Gmail message IDs, never full email bodies.
  • A dashboard with monthly and yearly totals, where you mark each subscription Snipped, Keep or Not a subscription and see what you've saved.