Vishwa's blog

Expense Tracker

October 6, 2024

Expense Tracker is a Python backend application built with FastAPI and PostgreSQL, designed to help users efficiently track, manage, and share their daily expenses. The application allows users to create accounts, securely log in, and record their expenses with detailed descriptions, amounts, and split methods. It provides a RESTful API for seamless integration with frontend applications and ensures robust data validation at every step. Users can add expenses and specify how they are split among participants, supporting multiple split types such as equal, exact amounts, or percentages. The system enforces strict validation rules to prevent errors: for example, the total percentage of all participants must equal 100%, and the sum of distributed amounts must match the total expense. Clear error responses guide users if these constraints are violated, ensuring data integrity and reliability. The application’s backend models are designed for clarity and scalability. The User model includes fields such as username, email, phone, and hashed password, along with a relationship to their expenses. The Expense model captures essential details like description, amount, split method, and split details, linking each expense to its owner. Additional validation ensures emails are properly formatted, and phone numbers are exactly 10 digits. Overall, Expense Tracker provides a secure, organized, and user-friendly platform for individuals and groups to manage their finances efficiently. With FastAPI’s high performance and PostgreSQL’s reliability, the system can handle multiple users and expenses, making daily expense tracking and sharing simple and accurate.

Repo

https://github.com/vishwavijeth/expense-tracker
← Back to Projects