This is a submission for the Postmark Challenge: Inbox Innovators.
What I Built
Sumrise is a personal spend analyzer tool that parses credit card and banking transaction emails forwarded to an inbound processor. It extracts transaction data asynchronously and displays monthly expenditure summaries and transaction lists in a simple dashboard.
Key features: Dockerized, 100% Self hostable, Bank and currency agnostic (It is just the filtering logic with your mail provider), You control the emails, You (can) control the LLMs, You control the data.
Bonus: Mobile responsive, dark mode, no tracking, no ads, no signup, no login (of course you login only as a super admin in an environment you control), no data collection, no data sharing, no data selling, no data mining, no data profiling, no data anything.
tools: sveltekit, pocketbase, postmark, groq, docker, cloudflare, cloudflared.
Demo
Code Repository
peopledrivemecrazy
/
sumrise
Sumrise is a personal spend analyzer tool that parses credit card and banking transaction emails forwarded to an inbound processor. It extracts transaction data asynchronously and displays monthly expenditure summaries and transaction lists in a simple dashboard.
Sumrise Spend Analyzer - Developer Specification (MVP)
Overview
Sumrise is a personal spend analyzer tool that parses credit card and banking transaction emails forwarded to an inbound processor. It extracts transaction data asynchronously and displays monthly expenditure summaries and transaction lists in a simple dashboard.
Architecture
sequenceDiagram
…
participant U as You
participant B as Bank
participant G as Gmail
participant P as Inbound Processor
participant DB as PocketBase
participant CRON as Cron Job
participant GROQ as Groq API
participant UI as SvelteKit App
U->>B: Make a transaction
B->>G: Sends transaction email
G->>P: Forwards email to inbound processor
P->>DB: Saves email to raw_emails collection
CRON->>DB: Fetches queued emails
CRON->>GROQ: Sends email for parsing
alt Groq succeeds
GROQ-->>CRON: Parsed transaction data
CRON->>DB: Updates transaction record
else Groq fails or response is incorrect
CRON->>DB: Marks record as failed with error_msg
UI->>DB: Displays link to retry parsing
end
U->>UI: Views dashboard
UI->>DB: Fetches processed
https://github.com/peopledrivemecrazy/sumrise
How I Built It
This project is built with a focus on simplicity, rapid development, and leveraging powerful, free-tier-friendly tools.
Most email providers have a way to forward emails to any email address. I use Gmail and can use the filter feature to forward emails with a specific match pattern (Subject, from, body text, etc) to a specific email address. I forward these emails to my Postmark mail.
This in turn makes a call to the webhook I set up with Pocketbase (hooks), which is a simple script that parses the email and saves the data to the database, adds queued
status to the record. A cron job is set up to run every minute and checks for records with queued
status and makes a subsequent call to the groq api to parse the email and update the record with the parsed data to the transactions
collection.
You make a transaction -> Your bank sends an email -> Your email provider (Gmail in my case)forwards the email to my inbound processor -> Pocketbase saves the email to the database -> Cron job calls Groq api to parse the email and updates the database -> SvelteKit app displays the data in a simple dashboard.
Also, sometimes Groq fails or sends an incorrect response. I have a simple fallback that adds a failed
status to the record and a link to access the failed transaction, which the user can retry. It sets the status to queued
, and the cron job will retry it.
Tech Stack
Backend: I chose PocketBase as the all-in-one backend. It's an open-source Go application that provides a SQLite database, real-time subscriptions, user management, and a full admin UI in a single file. It's incredibly fast and easy to set up. The asynchronous email processing is handled by a cron job written in JavaScript and executed by PocketBase's integrated JSVM.
Frontend: The UI is built with SvelteKit, a modern web framework that allows for building highly performant applications with a great developer experience. For styling, I used Tailwind CSS to quickly create a clean and responsive design without writing a lot of custom CSS.
AI-Powered Parsing: To extract structured data from unstructured email text, I'm using the Groq API. It provides blazing-fast LLM inference, which is perfect for the real-time nature of this application.
Development & Infrastructure: The entire stack is containerized using Docker and Docker Compose. This ensures a consistent development environment and simplifies setup. The stack includes three main services: the SvelteKit app, the PocketBase server, and an Nginx reverse proxy. Nginx is configured to serve the frontend and backend under local domains (
sumrise.test
,pocketbase.test
) with locally-trusted SSL certificates generated by mkcert.Inbound Email Forwarding: Postmark to forward emails to the inbound processor. I'm using the Postmark Inbound Webhook to forward emails to the inbound processor.
Cloudflare: to serve the frontend and backend. I'm using the Cloudflare tunnels to expose the frontend and backend and allow Postmark to webhook to reach my machine.
Important notes
This is a Docker-focused project; most of its orchestration can be found in the docker-compose.yml
file.
- Nginx is configured to serve the frontend and backend under local domains (
sumrise.test
,pocketbase.test
) with locally-trusted SSL certificates generated by mkcert. - A custom domain for the app
sumrise.test
andpocketbase.test
for the backend, and edited the/etc/hosts
file to point to my local machine. - Gmail Specific Configuring filter + Forwarding instructions here
- When adding your postmark inbound email to Gmail, you will get a verification email; you need to verify it to start forwarding emails.
- I am using Cloudflare Tunnels (cloudflared) with ingress to expose the frontend and backend to the internet.
- For demo purposes, the cron job is set to run every minute.
- Tweak the SYSTEM_PROMPT to your needs.
# Cloudflare tunnel config
tunnel: tunnel_id
credentials-file: /<user_home>/.cloudflared/tunnel_id.json
ingress:
- hostname: pocketbase.domain.com
originRequest:
disableChunkedEncoding: false
service: http://localhost:8080
- hostname: sumrise.domain.com
service: https://sumrise.test
- service: http_status:404
Setup
For more information, please see the repo.
Top comments (1)
Really impressed by how Sumrise brings together so many modern tools for a genuinely practical purpose. I love the level of control you give users — finally, something that doesn’t want to sell my spending habits to the highest bidder or reward me with endless targeted ads for things I just bought. The self-hosting and Dockerized approach makes my inner tinkerer happy, and the no-login (except super admin, which makes me feel like I have a secret lair) is honestly refreshing. Bonus points for dark mode; my retinas thank you. The Groq AI fallback for failed parses is a much-needed touch — because let’s face it, banks write emails like they’re paid by the word, not by clarity. Thanks for sharing this and making fiscal responsibility just a little bit more nerd-friendly!