Skip to content
yalt8826.com
← projects/
projects/expense-tracker/finisheddesktopfirst gui app

Expense Tracker

My first full desktop app: log income and expenses, see where the money goes in pie charts, and keep a running record of what's saved each month.

Team of two · 3rd-semester Java project · Nov – Dec 2024

01 / overview

Where it started.

This was the third-semester project for Object Oriented Programming with Java, built with a classmate. It was the first time I'd put a real interface on top of a real database. You sign up, log what comes in and what goes out, and the app shows it back to you as charts and running totals.

The question behind it, where does my money actually go, stuck with me. Two years later it became Tyche, which reads bank SMS so nobody has to type anything.

6screens, laid out in Scene Builder
3pie charts: expenses, income, spending vs savings
2tables, mapped with Hibernate
2024built; revived in 2026 so it runs again
02 / screens

Sign in, log, look.

Captured by running the app again in November 2026 with a demo account and made-up numbers.

01Sign in
02This month: income, spending, savings and where it went
03Logging an expense, with the history beside it
04Income by source
05Spending vs savings and the monthly savings log
03 / architecture

MVC, before I knew to call it that.

viewFXML · Scene Builder
loginregisterhomeexpensesincomeoverview
controllerJavaFX
scene switchingform handlingPieChart per category
sessionSessionManager
current usercached transactionsrunning totals
dataDAO + Hibernate
UserDAOTransactionDAOentities → tables
storeMySQL
userstransactions
04 / the data

Two tables do everything.

A users table holds accounts. A single transactions table holds everything else, with a type column that tells the rows apart: 0 is an expense, 1 is income, and 2 is a monthly savings snapshot, labelled with the month and year. That one table feeds every chart and history list in the app, filtered by the signed-in user.

05 / looking back

What two more years taught me.

securityPasswords in plain text

Passwords were stored and compared as is. Today they'd be salted and hashed with something like bcrypt, and never readable.

moneyAmounts as whole numbers

Amounts were integers, so paise were lost. Money needs a decimal type or integer paise, decided on purpose.

structureOne very large controller

Almost all the UI logic sat in one controller of nearly 900 lines. One controller per screen would have been easier to change.

Running it again also turned up a bug: the monthly savings snapshot was meant to be written on the last day of each month, but that check is commented out, so every sign-in adds another one.

Tyche sidesteps the first one entirely: it has no accounts, so there's no password to store.