LEDGR – Receipts In, Insights Out. Automatically.

This is a submission for the Postmark Challenge: Inbox Innovators.

What I Built

Let’s be honest, ‘expense tracking’ often sounds like a synonym for ‘tedious,’ ‘boring,’ and ‘something I’ll definitely start next month.’ We all know we should…


This content originally appeared on DEV Community and was authored by Ayesha Imran

This is a submission for the Postmark Challenge: Inbox Innovators.

What I Built

Let's be honest, 'expense tracking' often sounds like a synonym for 'tedious,' 'boring,' and 'something I'll definitely start next month.' We all know we should keep an eye on our spending, especially with the convenience of online shopping, and how carried away we can get with it. But the reality is, saving digital receipts, painstakingly entering data into a spreadsheet or app, and trying to remember what category 'that random Amazon purchase' falls into is enough to make anyone give up. With the hustle of our everyday lives, tracking online orders is just not something we can prioritise, but it is something we should prioritise because those purchases add up and you can go overboard so easily.

Your inbox is a goldmine of spending data - online shopping, subscriptions, and digital services, order confirmation emails all reside there - it is about time you had an automated shovel to dig up that gold.

That's exactly why I built LEDGR. I wanted to transform that chaotic inbox of yours into an effortless source of financial insight. With LEDGR, you simply forward those order confirmation emails (whether on your laptop or phone), and LEDGR does the rest – automatically extracting every detail, categorizing your purchases, and giving you a clear, visual breakdown of your spending. No more manual entry, no more lost receipts, just financial clarity at your fingertips.

Demo

Link

Screenshots

Your personalized dashboard offers an at-a-glance overview of your financial health: see total spending, stay on top of budget progress, track order processing, and review recent purchases, all in one place for quick decision-making.
Image description

The Orders tab neatly lists every purchase automatically logged from your forwarded emails, providing a complete and easily searchable history of your online spending.
Image description

Dive deeper into any purchase with a detailed order view. See every item, its price, and its AI-assigned category, giving you granular control and understanding of where your money went.
Image description

Instantly filter your purchases by category to understand spending in specific areas like 'Groceries' or 'Subscriptions,' helping you pinpoint where to optimize your budget.
Image description

Go beyond raw numbers. Our Analytics visually map your spending trends and category breakdowns, transforming data into actionable insights so you can identify habits and find opportunities to save.
Image description
Image description

Take control with flexible budgeting. Easily set (and update) overall monthly or category-specific budgets, and instantly see how you're tracking with clear visual progress, empowering smarter financial decisions before you overspend.
Image description

Personalize your experience by selecting your preferred currency for expense tracking. Your profile also conveniently displays your unique LEDGR forwarding email address, ready for you to start automating!
Image description

Code Repository

GitHub logo Ayesha-Imr / LEDGR

Receipts In, Insights Out. Automatically.

LEDGR - Logging Expense Data from Generated Receipts

Receipts In, Insights Out. Automatically.

LEDGR is an intelligent personal finance tool that automates expense tracking by parsing order confirmation emails. Simply forward your digital receipts, and LEDGR uses AI to extract, categorize, and visualize your spending.

Live Demo: https://ledgr-neon.vercel.app/

The Problem

Tracking personal expenses from countless online order confirmations is tedious, time-consuming, and often neglected. Digital receipts get buried in inboxes, manual data entry is error-prone, and gaining a clear overview of spending habits becomes a significant challenge.

Our Solution: LEDGR

LEDGR offers a "zero-effort" solution by leveraging email forwarding and AI:

  1. Forward Emails: Users forward any order confirmation email to their unique LEDGR address.
  2. AI Parsing: LEDGR uses the Google Gemini 1.5 Flash model with structured output to automatically extract key information (vendor, date, items, prices, total).
  3. Smart Categorization: The AI also intelligently assigns a relevant category to each purchased…

How I Built It

As soon as I read the challenge post and researched how Postmark inbound email forwarding works, I instantly thought of my Gmail account that I solely use for online ordering. It is full of order receipt emails and pretty much resembles buried treasure ripe for digging. This challenge seemed like the perfect opportunity to make something that would not only help me make sense of my spending data and get my financials in check, but also has the potential to benefit other online shoppers (which is pretty much everyone nowadays to be fair). So I went all in!

First I come up with the idea to forward online order confirmation emails to Postmark and get them parsed, processed and stored. Initially, I decided not to use an LLM because for some reason I wanted to do this LLM-lessly. I had decided to use vector search against fixed categories (stored in Weaviate) to categorise order items, and manual parsing for extracting order data. Unfortunately the manual parsing part did not work well and I had to shift to using an LLM - but it made things 100% better so that's the way to go!

LEDGR uses Gemini 2.5 Flash with structured output for parsing email order data. Its balance of speed and impressive capability, especially with its excellent structured output feature, made it ideal for a this project, allowing for rapid processing of emails into usable data without compromising on accuracy.The info is stored in and fetched from Supabase. I have completely decoupled the frontend and backend. The frontend is made (or rather, vibe-coded) using React and Vite. For backend processing I use Supabase Edge Functions. Here is a step by step flow, along with a diagram, to demonstrate clearly how LEDGR works:

  1. Sign-up & Setup: User registers via Supabase Auth, receiving a unique LEDGR forwarding email address.
  2. Email Forward: User forwards an order confirmation email to their LEDGR address.
  3. Postmark Ingest: Postmark receives the email and webhooks its JSON payload to Supabase Edge Function 1 (EF1).
  4. Initial Storage: EF1 extracts the user ID, saves the raw email to the forwarded_emails table in Supabase DB with pending_parsing status.
  5. Processing Trigger: A new entry in forwarded_emails triggers a DB webhook, invoking Supabase Edge Function 2 (EF2).
  6. Gemini Parsing: EF2 sends email content to Gemini API, requesting structured output (vendor, items, prices, categories).
  7. Structured Data Storage: EF2 receives JSON from Gemini, saves order details to the orders table and individual items to the line_items table.
  8. Status Update: EF2 updates the email's status in forwarded_emails to processed or failed.
  9. Frontend Display: The authenticated user (via Supabase Auth) on the React/Vite frontend fetches their processed orders, items, and budgets directly from Supabase DB (with RLS) for viewing and analysis.

Technical Architecture Diagram

Image description

Challenges Faced & Lessons Learned

  • Initial attempts at manual parsing of emails proved highly unreliable due to format variations. Switching to an LLM (Gemini) for structured output was a game-changer for accuracy and robustness.
  • Configuring the chain of webhooks (Postmark -> EF1 -> DB Trigger -> EF2) required careful attention to detail and debugging.
  • Prompt engineering for Gemini to consistently return the desired structured JSON, especially for categorizing diverse items, was an iterative process.
  • Managing timeouts between database webhooks and Edge Function execution, especially for potentially long-running AI calls.

Future Improvements

  • CSV data export.
  • User-customizable categories and category rules.
  • Weekly budget options or custom budget periods.
  • Support for parsing other types of financial documents (e.g., PDF bank statements).
  • More advanced analytics and predictive insights.

Conclusion

What started as a personal quest to make sense of my own online shopping habits has, thanks to the Postmark Inbox Innovators challenge, blossomed into LEDGR. This project has been an incredible learning journey – from wrestling with the myriad of email formats to truly utilising the power of Google's Gemini for intelligent, structured parsing.

While there's always more to build and exciting future improvements planned, I'm immensely proud of what LEDGR is today: a genuinely useful tool designed to solve the common and often overwhelming frustration of manual expense tracking. In an age of constant digital transactions, having an effortless way to maintain financial clarity is more important than ever, and LEDGR is my contribution towards that goal.

I'm eager to see how users interact with it, and I'm grateful to Postmark for the challenge that sparked this innovation. The journey of refining LEDGR into an even more powerful financial companion has just begun. I have already started using it to track my spending habits (as you can witness from the above screenshots) and will continue to do so. Here's to being more financially responsible!


This content originally appeared on DEV Community and was authored by Ayesha Imran


Print Share Comment Cite Upload Translate Updates
APA

Ayesha Imran | Sciencx (2025-06-07T12:13:24+00:00) LEDGR – Receipts In, Insights Out. Automatically.. Retrieved from https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/

MLA
" » LEDGR – Receipts In, Insights Out. Automatically.." Ayesha Imran | Sciencx - Saturday June 7, 2025, https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/
HARVARD
Ayesha Imran | Sciencx Saturday June 7, 2025 » LEDGR – Receipts In, Insights Out. Automatically.., viewed ,<https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/>
VANCOUVER
Ayesha Imran | Sciencx - » LEDGR – Receipts In, Insights Out. Automatically.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/
CHICAGO
" » LEDGR – Receipts In, Insights Out. Automatically.." Ayesha Imran | Sciencx - Accessed . https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/
IEEE
" » LEDGR – Receipts In, Insights Out. Automatically.." Ayesha Imran | Sciencx [Online]. Available: https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/. [Accessed: ]
rf:citation
» LEDGR – Receipts In, Insights Out. Automatically. | Ayesha Imran | Sciencx | https://www.scien.cx/2025/06/07/ledgr-receipts-in-insights-out-automatically/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.