A comprehensive personal finance management application built with Python, featuring both a command-line interface and an interactive web dashboard for tracking income, expenses, and budgets with ease.
- Features
- Tech Stack
- Installation
- Usage
- Project Structure
- Configuration
- Examples
- Future Enhancements
- Contributing
- License
- β Transaction Management - Add, update, delete, and list income and expense transactions
- β Category Management - Create custom spending categories for better organization
- β Budget Tracking - Set and monitor budgets for specific categories
- β Financial Reports - Generate comprehensive financial reports and insights
- β Real-time Dashboard - Interactive web interface with live financial metrics
- β Data Persistence - All data stored securely in SQLite database
- π Current Balance Overview - Real-time income, expenses, and net balance metrics
- π Budget Status Visualization - Visual progress indicators for each budget
- π Recent Transactions Table - Color-coded transaction history with filtering
- π‘ Financial Insights - Quick summary of financial health and spending patterns
- π₯οΈ User-Friendly Commands - Intuitive argparse-based command structure
- π Full CRUD Operations - Complete Create, Read, Update, Delete functionality
- π Multiple Report Types - Summary, category-wise, and budget analysis reports
- βοΈ Date-Based Filtering - Filter transactions and budgets by date ranges
| Component | Technology | Version |
|---|---|---|
| Language | Python | 3.13+ |
| CLI Framework | argparse | Built-in |
| Web Framework | Streamlit | 1.28+ |
| Database | SQLite | 3.x |
| Data Processing | Pandas | 2.0+ |
| Package Manager | pip | Latest |
- Python 3.13 or higher
- pip (Python package manager)
- Git (for cloning the repository)
git clone https://github.com/yourusername/finance-tracker.git
cd finance-tracker# On Windows
python -m venv venv
venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtOr using the project configuration:
pip install -e .python main.py initThis creates the SQLite database with all necessary tables.
python main.py initInitializes the SQLite database with all required tables.
Add a Category:
python main.py add-category "Food"
python main.py add-category "Transportation"List All Categories:
python main.py list-categoriesUpdate a Category:
python main.py update-category --id 1 --name "Groceries"Delete a Category:
python main.py delete-category --id 1Add a Transaction:
python main.py add-transaction \
--date 2025-11-18 \
--amount 50.00 \
--type expense \
--category-id 1 \
--description "Weekly grocery shopping"List All Transactions:
python main.py list-transactionsUpdate a Transaction:
python main.py update-transaction \
--id 1 \
--date 2025-11-18 \
--amount 75.00 \
--type expense \
--category-id 1 \
--description "Updated grocery shopping"Delete a Transaction:
python main.py delete-transaction --id 1Add a Budget:
python main.py add-budget \
--category-id 1 \
--amount 200.00 \
--start-date 2025-11-01 \
--end-date 2025-11-30List All Budgets:
python main.py list-budgetsUpdate a Budget:
python main.py update-budget \
--id 1 \
--category-id 1 \
--amount 250.00 \
--start-date 2025-11-01 \
--end-date 2025-11-30Delete a Budget:
python main.py delete-budget --id 1Summary Report:
python main.py report-summary \
--start-date 2025-11-01 \
--end-date 2025-11-30Category Spending Report:
python main.py report-category \
--start-date 2025-11-01 \
--end-date 2025-11-30Budget Status Report:
python main.py report-budget --date 2025-11-18Launch the interactive Streamlit dashboard:
streamlit run streamlit_dashboard.pyThe dashboard will open in your default web browser at http://localhost:8501
- Current Balance - Overview of total income, expenses, and net balance
- Budget Status - Visual progress indicators for active budgets
- Recent Transactions - Last 10 transactions with color-coded types
- Push your code to GitHub (see deployment section above)
- Create a Streamlit Cloud account at share.streamlit.io
- Click "New app" and select:
- GitHub repository:
your-username/finance-tracker - Branch:
main - Main file path:
streamlit_dashboard.py
- GitHub repository:
- Click "Deploy" and wait for the app to build
Note: The database (finance_tracker.db) is automatically initialized on first run.
On Streamlit Cloud, the database persists in the app directory for that session.
finance-tracker/
βββ main.py # Entry point
βββ streamlit_dashboard.py # Web dashboard application
βββ pyproject.toml # Project configuration
βββ README.md # This file
βββ GEMINI.md # Gemini integration notes
βββ LINKEDIN_POST_PROMPT.md # Social media prompts
βββ finance_tracker/ # Main package
βββ __init__.py # Package initialization
βββ cli.py # Command-line interface
βββ database.py # Database operations (CRUD)
βββ models.py # Data models
βββ reports.py # Report generation
βββ __pycache__/ # Python cache directory
| File | Purpose |
|---|---|
main.py |
Entry point that routes to CLI |
cli.py |
Argument parser and command handlers |
database.py |
SQLite database operations and CRUD functions |
models.py |
Data classes: Transaction, Category, Budget |
reports.py |
Report generation functions |
streamlit_dashboard.py |
Interactive web dashboard |
The application uses SQLite with the following schema:
categories table:
CREATE TABLE categories (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE
)transactions table:
CREATE TABLE transactions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT NOT NULL,
amount REAL NOT NULL,
type TEXT NOT NULL,
category_id INTEGER,
description TEXT,
FOREIGN KEY (category_id) REFERENCES categories (id)
)budgets table:
CREATE TABLE budgets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
category_id INTEGER NOT NULL,
amount REAL NOT NULL,
start_date TEXT NOT NULL,
end_date TEXT NOT NULL,
FOREIGN KEY (category_id) REFERENCES categories (id)
)All dependencies are specified in pyproject.toml:
questionary>=2.1.1- Interactive CLI promptsrich>=14.2.0- Rich terminal output formattingpandas>=2.0.0- Data processingstreamlit>=1.28.0- Web framework
# 1. Initialize database
python main.py init
# 2. Add categories
python main.py add-category "Food"
python main.py add-category "Utilities"
python main.py add-category "Salary"
# 3. Add transactions
python main.py add-transaction --date 2025-11-18 --amount 2500 --type income --category-id 3 --description "Monthly salary"
python main.py add-transaction --date 2025-11-18 --amount 50 --type expense --category-id 1 --description "Dinner"
python main.py add-transaction --date 2025-11-19 --amount 150 --type expense --category-id 2 --description "Electricity bill"
# 4. Set budgets
python main.py add-budget --category-id 1 --amount 300 --start-date 2025-11-01 --end-date 2025-11-30
python main.py add-budget --category-id 2 --amount 200 --start-date 2025-11-01 --end-date 2025-11-30
# 5. View reports
python main.py report-summary --start-date 2025-11-01 --end-date 2025-11-30
python main.py report-category --start-date 2025-11-01 --end-date 2025-11-30
python main.py report-budget --date 2025-11-20
# 6. Launch dashboard
streamlit run streamlit_dashboard.pyPlanned features for future releases:
- π± Mobile app support
- π Advanced data visualization (charts, graphs, trends)
- π User authentication and multi-user support
- πΎ Data export (CSV, PDF, Excel)
- π§ Email reports and notifications
- π― Recurring transactions (auto-bill payments)
- π³ Credit card integration
- π Machine learning-based spending predictions
- π Multi-currency support
- βοΈ Cloud sync functionality
- π± Push notifications for budget alerts
- π¨ Customizable dashboard themes
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Add docstrings to new functions
- Update documentation for new features
- Test your changes before submitting PR
- Be respectful and constructive in discussions
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @yourusername
- LinkedIn: Your LinkedIn Profile
- Email: your.email@example.com
- Built with Streamlit for the web interface
- Data processing powered by Pandas
- CLI created with Python's argparse
- Inspired by the need for simple yet powerful personal finance management
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Include steps to reproduce the problem
- Share your environment details (OS, Python version, etc.)
Last Updated: November 18, 2025
Made with β€οΈ for personal finance management