Skip to content

itsvaibhavi13/Spending_Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 Spending Tracker

A desktop budgeting application built with Python, Tkinter, and SQLite that helps track weekly and monthly spending with automatic balance updates and period-based budgeting.

📌 Overview

This app allows you to:

  • Create custom spending categories

  • Assign a budget to each category

  • Define whether that budget resets weekly or monthly

  • Log daily expenses

  • Automatically update remaining balances

  • View all expenses for a specific week or month

The system is designed for people who primarily budget weekly, but still have expenses that occur on a monthly basis (e.g., subscriptions, shopping, utilities).

🧱 Core Concept

Each category has:

  • A Budget

  • A Remaining Balance

  • A Period (weekly or monthly)

The budget represents how much you're allowed to spend during that category’s period.

🏷 Default Categories

The app includes two built-in summary categories:

  • Total (This Week)

  • Total (This Month)

These are automatically updated when categories are added or when expenses are logged.

➕ Adding Categories

When creating a category, you choose:

  • Category name

  • Budget amount

  • Period (weekly or monthly)

Budget Logic

If you add a weekly category:

  • Weekly Total increases by the category’s budget

  • Monthly Total increases by 4 × the category’s budget

If you add a monthly category:

  • Monthly Total increases by the category’s budget

  • Weekly Total remains unchanged

🧾 Logging Expenses

You can log an expense by entering:

  • Category (dropdown selection)

  • Description

  • Amount spent

⚠️ Important: Expenses must be entered on the same day they are made. The app records the date automatically using the system date at the time of entry.

🔄 Automatic Balance Updates

When an expense is recorded:

If the category is weekly:

  • The category balance decreases

  • Weekly Total decreases

  • Monthly Total decreases

If the category is monthly:

  • The category balance decreases

  • Monthly Total decreases

  • Weekly Total remains unchanged

All changes are automatically reflected in the dashboard.

📅 Viewing Expenses

You can view:

  • This Week’s Expenses

  • This Month’s Expenses

The app calculates date ranges automatically and displays all stored expenses within that period.

🔁 Budget Reset System

Weekly Categories

All weekly category balances reset to their original budget every Monday.

Monthly Categories

Monthly categories reset on the first Monday of each month, not the 1st calendar day.

This ensures consistency with the weekly budgeting structure.

🗄 Database

The application uses SQLite for data storage:

  • Categories

  • Budgets

  • Balances

  • Expense records

  • Dates

All updates are persisted locally in the database file.

🛠 Technologies Used

  • Python

  • Tkinter (GUI)

  • SQLite3

  • Date utilities (datetime, calendar, dateutil)

🎯 Why This App Exists

This tracker was built around a real-world budgeting system where:

  • Day-to-day spending is tracked weekly

  • Some expenses occur monthly

  • Weekly consistency matters more than calendar months

It combines weekly structure with monthly flexibility in a single dashboard.

🚀 Future Improvements

  • Edit/delete expenses

  • Edit categories

  • Visual spending charts

  • CSV export

  • Automatic daily expense entry date override

  • Budget analytics and summaries

About

A desktop budgeting application built with Python, Tkinter, and SQLite that helps track weekly and monthly spending with automatic balance updates and period-based budgeting.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages