Skip to content

MusaIslamFahad/finance-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

💰 Finance Tracker CLI

A Python CLI app to track income and expenses, set savings goals and visualize spending patterns using SQLite for persistent storage and Matplotlib for charts.


📖 Overview

Finance Tracker CLI is a lightweight, menu-driven command-line application for managing your personal finances. Log income, categorize expenses, check your balance at a glance, set savings targets and generate spending charts - all from the terminal. Data is stored persistently in a local SQLite database, so nothing is lost between sessions.


✨ Features

  • 💵 Add Income: Record earnings with an amount and description
  • 🧾 Add Expense: Log spending by amount, category, and description
  • 📊 View Summary: Instantly see total income, total expenses and current balance
  • 🎯 Set Savings Goals: Define a savings target and track your progress toward it
  • 📈 Visualize Spending: Generate bar, pie, and line charts powered by Matplotlib
  • 🗄️ Persistent Storage: All records saved to a local SQLite database, no data lost on exit
  • 🖥️ Zero GUI dependency: Runs entirely in the terminal, no display server required

🛠️ Tech Stack

Tool Purpose
Python 3 Core language
SQLite3 Local persistent database for all transactions
Matplotlib Spending charts (bar, pie, line)
Pandas Data manipulation and summary calculations

⚙️ Requirements

  • Python 3.7+
  • matplotlib
  • pandas

🚀 Getting Started

1. Clone the repository

git clone https://github.com/MusaIslamFahad/finance-tracker-cli.git
cd finance-tracker-cli

2. Install dependencies

pip install matplotlib pandas

3. Run the app

python Personal_Finance_Tracker/main.py

A finance.db SQLite file will be created automatically in the project directory on first run.


🕹️ How to Use

When you run the app, you'll see an interactive numbered menu:

========================================
       💰 Personal Finance Tracker
========================================
  1. Add Income
  2. Add Expense
  3. View Summary
  4. Set Savings Goal
  5. Visualize Spending
  6. Exit
========================================
Enter your choice:

Menu Options

Option Action What You Enter
1 Add Income Amount + description
2 Add Expense Amount + category + description
3 View Summary (no input - displays instantly)
4 Set Savings Goal Target savings amount
5 Visualize Spending Chart type selection
6 Exit (closes the app)

📊 Sample Session

Enter your choice: 1
  Enter income amount: 50000
  Enter description: Monthly salary
  ✅ Income of 50000 added successfully!

Enter your choice: 2
  Enter expense amount: 8000
  Enter category: Rent
  Enter description: Monthly rent payment
  ✅ Expense of 8000 added successfully!

Enter your choice: 3
  ----------------------------------------
  📥 Total Income  :   50,000.00
  📤 Total Expenses:    8,000.00
  💳 Balance       :   42,000.00
  🎯 Savings Goal  :   20,000.00  (Progress: 42%)
  ----------------------------------------

🗄️ Database Schema

Data is stored in a local finance.db SQLite file with two core tables:

transactions

Column Type Description
id INTEGER Auto-incremented primary key
type TEXT "income" or "expense"
amount REAL Transaction amount
category TEXT Category label (expenses only)
description TEXT User-provided note
date TEXT Timestamp of the entry

goals

Column Type Description
id INTEGER Auto-incremented primary key
target_amount REAL Savings goal set by the user

📂 Project Structure

finance-tracker-cli/
│
├── Personal_Finance_Tracker/
│   └── main.py          # Entry point — menu loop, all features
│
├── finance.db           # Auto-generated SQLite database (gitignored)
├── screenshots/         # README screenshots (add your own)
└── README.md

Tip: Add finance.db to your .gitignore so your personal financial data is never accidentally pushed to GitHub.


🔮 Future Enhancements

  • 📅 Monthly / weekly reports: filter summaries by date range
  • 🏷️ Custom expense categories: define and manage your own spending labels
  • 📤 CSV / Excel export: download your full transaction history
  • 🔔 Budget alerts: get warned when spending in a category exceeds a set limit
  • 🌐 Web dashboard: migrate the CLI to a Flask or Streamlit interface
  • 📱 Multi-user support: separate profiles with login authentication

🤝 Contributing

Contributions are welcome! To get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add your feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

👨‍💻 Author

Musa Islam Fahad


⭐ If this helped you manage your money a little better, a star would be greatly appreciated!

About

A Python CLI app to track income and expenses, set savings goals and visualize spending patterns using SQLite for persistent storage and Matplotlib for charts.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages