Personal Finance Tracker

Python, Flask, SQLAlchemy, Chart.js, JavaScript

Personal Finance Tracker

Overview

The Personal Finance Tracker is a comprehensive web application designed to help users manage their finances effectively. It includes features for expense tracking, income management, budget planning, and financial data visualization.

Development Approach

This project was built following Test-Driven Development principles from the ground up. Each feature was first defined with a set of tests that specified the expected behavior, then implemented to pass those tests, and finally refactored for optimization and clean code.

Key Features

Expense and Income Tracking

  • Categorized transaction entry with date, amount, category, and notes
  • Recurring transaction support
  • CSV import/export functionality

Budget Management

  • Monthly budget planning by category
  • Visual indicators for budget status
  • Automatic notifications for approaching limits

Data Visualization

  • Interactive charts showing spending patterns
  • Income vs. expense comparisons
  • Historical trend analysis

Reporting

  • Customizable financial reports
  • Tax preparation assistance
  • Annual and monthly summaries

Technical Details

Backend

The application backend is built with Flask and uses SQLAlchemy for database interactions. It follows a clean architecture pattern with separation of concerns between routes, services, and data access layers.

Database

PostgreSQL is used for data storage with a carefully designed schema that optimizes for both data integrity and query performance.

Frontend

The frontend uses a combination of server-rendered templates and JavaScript for interactivity. Chart.js is employed for all data visualizations, providing responsive and accessible charts.

Testing

Comprehensive test coverage is achieved using pytest for backend tests and Jest for frontend functionality. The TDD approach ensured that all features were well-tested before deployment.

Security

  • Secure authentication using Flask-Login
  • CSRF protection
  • Input validation and sanitization
  • Encrypted sensitive data storage

Challenges and Solutions

One of the main challenges was designing a database schema that would efficiently handle different types of financial transactions while maintaining data integrity and query performance. This was solved by implementing a combination of polymorphic tables and strategic indexing.

Another challenge was creating intuitive data visualizations that provided value to users with different financial situations. This required careful UX research and iteration on the charts and filters available.

Results

The application has been well-received by users for its clean interface and comprehensive features. The rigorous testing approach resulted in very few bugs in production and allowed for confident refactoring when adding new features.

Back to Portfolio