Skip to content
Request full CV
All cases

ALONG

Finance tracker backend

Result

100K+ sign-ups

Task

I designed and launched the backend of a personal finance tracker with accounts, categories, transactions, budgets and summaries. The app reached 100K+ sign-ups.

Situation

Two problems came up as the app grew. A transfer between a user's own accounts was counted as an expense on one account and income on the other, and the transaction feed read too many rows as the history got longer.

Cause

Counting a transfer as spending and income inflated the turnover and showed income that did not exist. The feed query paged with a growing offset, so every next page cost more.

What I did

I made a transfer its own entity with two linked sides, written in one PostgreSQL transaction. For different currencies it keeps both amounts and the rate used, and a repeated request with the same key does not create a second transfer. For the feed I first tried a cache, but clearing it after edits made things harder. I read the query with EXPLAIN ANALYZE, the PostgreSQL tool that shows how a query runs, added a composite index, moved to cursor paging by date and id, and removed the cache.

How I checked

A rollback when the second record fails, a retry after a timeout, a category change near the month boundary, the order on equal timestamps, the ownership of transactions and the query plan on a filled database.

Result

Balance and statistics no longer drift because of money moving between accounts, and a long history loads predictably.

Stack

  • Python
  • FastAPI
  • PostgreSQL
  • SQLAlchemy
  • Alembic
  • MongoDB
Request full CV

Try a question a recruiter asks