Hi everyone,
First of all, I would like to invite everyone to my github: https://github.com/M4rc1nek/finovara-backend
So,
I’ve just finished working on a new feature in my project Finovara. I added a full activity log system that tracks changes for both expenses and revenue.
Why I built it
Users should always be able to see what happened to their data, what changed, when it changed, and what the previous values were.
That’s why I decided to implement an audit-style activity history for all financial operations.
What the system tracks
The activity logs now record actions for both expenses and revenue. It includes:
• adding a record
• editing a record
• deleting a record
• saving previous values whenever something is updated
Logs for expenses and revenue work in exactly the same way. They follow the same structure and logic, just applied to different types of financial data.
What a log entry contains
Each activity record stores:
• type of operation
• amount
• category
• date
• previous amount when edited
• previous category when edited
Because of this, when a value changes, the user can clearly see both the old and the new data.
How it works under the hood
All logs are stored in dedicated tables that act as an audit trail. Whenever an expense or revenue operation happens, the service layer automatically creates an activity entry. This keeps the logging fully transparent and doesn’t clutter the business logic.
Sorting
Users can sort their activity history by newest, oldest, highest amount, or lowest amount.
I implemented this using Spring Data sorting. The frontend sends the selected option, and the backend maps it to the proper configuration so the database returns already sorted results.
Automatic cleanup
I also added a scheduler to prevent the tables from growing forever. Every six months it automatically removes old activity logs. This keeps the system clean while still preserving a long enough history window.
Why this matters
This makes Finovara feel much closer to a real financial system. Users get full visibility into their financial history and can always understand what happened to their data.
It also creates a solid foundation for future features like security activity tracking, full account history logs, and advanced auditing.
More updates coming soon.
Top comments (0)