A production-ready C++ application for importing bank CSV files and generating comprehensive Excel budget spreadsheets with advanced categorization, financial analytics, and professional reporting.
- ✅ Multi-Account Support: Process multiple bank accounts simultaneously
- ✅ Smart CSV Parsing: Auto-detects bank/generic formats, handles multiple date formats
- ✅ Intelligent Categorization: Configurable transaction categorization rules
- ✅ Advanced Analysis: Income/expenses, category breakdown, monthly trends, averages
- ✅ Professional Excel Export: Multi-sheet reports with formatting and analytics
- ✅ Dual Interface: Both CLI and GTK3 GUI applications
- ✅ Structured Logging: spdlog-based logging with configurable verbosity
- ✅ Unit Testing: GoogleTest framework with continuous integration
- ✅ Code Quality: clang-format, clang-tidy, AddressSanitizer, UndefinedBehaviorSanitizer
Click to expand
- Modern CMake: Modular
moneytracker_corelibrary, target-based includes, install targets - CI/CD Pipeline: GitHub Actions with testing, formatting checks, static analysis, sanitizers
- Logging System: Central spdlog-based Logger replacing ad-hoc output
- Code Standards: clang-format and .clang-tidy configs, CONTRIBUTING.md guidelines
- Safety: Structured exception handling, RAII patterns, safer process spawning
- ✅ Multi-Account Support: Process multiple bank account files simultaneously
- ✅ Auto-Format Detection: Automatically detects bank or generic CSV formats
- ✅ Smart Categorization: Automatically categorizes transactions with configurable rules
- ✅ Multi-Date Format Support: Handles MM/DD/YYYY, DD/MM/YYYY, and YYYY-MM-DD formats
- ✅ Comprehensive Error Handling: Detailed error messages and file validation
- ✅ Robust CSV Parsing: Handles quoted fields, various delimiters, and edge cases
- ✅ Comprehensive Analysis:
- Income vs. Expenses breakdown
- Spending by category
- Monthly trends and analysis
- Account-level analysis
- Average transaction calculations
- ✅ Excel Export: Generates professional XLSX spreadsheets with:
- Summary sheet with key metrics
- Detailed transaction listing
- Category breakdown
- Monthly trends
- Charts and graphs
- ✅ Configuration System: Customizable category rules via JSON config file
- ✅ Verbose Logging: Detailed output for debugging and verification
- C++17 or later
- CMake 3.12+
- Ninja build system
- Boost Libraries: system, filesystem, program_options
- libxlsxwriter: For Excel file generation
sudo apt-get update
sudo apt-get install libboost-all-dev libxlsxwriter-dev cmake ninja-build g++ libgtk-3-devbrew install boost libxlsxwriter cmake ninja gtk+3cd MoneyTracker
mkdir -p build
cd build
cmake -G Ninja ..
ninjaThe compiled binaries will be in the build/ directory:
moneytracker- Command-line interfacemoneytracker-gui- Graphical user interface (if GTK3 is available)
./build/moneytracker-guiThe GUI provides an intuitive interface for:
- Selecting CSV files and assigning account names
- Configuring transaction categories
- Viewing analysis results in tabbed interface
- Generating professional Excel spreadsheets
No command-line knowledge required! See GUI_USER_GUIDE.md for complete walkthrough.
./build/moneytracker -i checking.csv -a "My Checking Account" -vThis will:
- Parse the CSV file
- Display budget summary to console
- Generate
budget_report.xlsxwith detailed analysis
./build/moneytracker \
-i checking.csv -a "Checking" \
-i savings.csv -a "Savings" \
-i credit_card.csv -a "Amex" \
-o financial_summary.xlsx -v./build/moneytracker -i transactions.csv --no-spreadsheet -v./build/moneytracker -i data.csv --category-config my_categories.json -v| Option | Short | Description | Default |
|---|---|---|---|
--help |
-h |
Display help message | - |
--input |
-i |
Input CSV file (can use multiple times) | Required |
--account |
-a |
Account name (corresponds to input files) | "Account 1", "Account 2", etc. |
--output |
-o |
Output Excel file path | budget_report.xlsx |
--format |
-f |
CSV format: auto, bank, or generic |
auto |
--category-config |
- | Path to custom categories.json file | Uses default config |
--verbose |
-v |
Enable verbose/detailed output | Disabled |
--no-spreadsheet |
- | Skip Excel generation (console only) | Spreadsheet is generated |
Date,Description,Debit,Credit,Balance
01/15/2024,SAFEWAY GROCERY,-50.00,,1000.00
01/16/2024,SALARY DEPOSIT,,2000.00,3000.00Date,Description,Amount,Balance
01/15/2024,SAFEWAY GROCERY,-50.00,1000.00
01/16/2024,SALARY DEPOSIT,2000.00,3000.00Edit data/categories.json to customize categorization. Default categories:
- Groceries: Safeway, Trader Joe's, Whole Foods, Kroger, etc.
- Gas: Shell, Chevron, BP, Exxon, etc.
- Dining: Restaurants, cafes, food delivery, etc.
- Shopping: Amazon, Walmart, Target, malls, etc.
- Entertainment: Netflix, Spotify, movies, concerts, etc.
- Utilities: Electricity, water, internet, phone
- Healthcare: Doctors, hospitals, pharmacies
- Transportation: Uber, Lyft, parking, tolls
- Subscriptions: Monthly/annual memberships
- Transfers: Bank transfers, deposits, wires
The generated .xlsx includes:
- Summary Sheet: Income, expenses, net change, category breakdown
- Transactions Sheet: Complete transaction list with account info
- By Category: Spending totals by category with percentages
- Monthly Trends: Month-by-month spending analysis
- Charts: Pie charts and column charts for visual analysis
========== MoneyTracker Configuration ==========
Input files: checking.csv
Account names: Checking
Output file: budget_report.xlsx
Format: auto
Generate Spreadsheet: Yes
=============================================
Loading category configuration from: data/categories.json
Processing: checking.csv (Account: Checking)...
OK Loaded 150 transactions
=== BUDGET SUMMARY ===
Total Income: $4500.00
Total Expenses: $2850.45
Net Change: $1649.55
=== SPENDING BY CATEGORY ===
Groceries : $ 450.00
Dining : $ 380.50
Gas : $ 200.00
Shopping : $ 620.00
=== MONTHLY TRENDS ===
2024-01: $2850.45
2024-02: $2750.30
OK Spreadsheet generated successfully: budget_report.xlsx
OK Analysis complete!
| Problem | Solution |
|---|---|
| "File not found" | Check file path, verify permissions |
| "Date parsing failed" | Use MM/DD/YYYY, DD/MM/YYYY, or YYYY-MM-DD |
| "Wrong format detected" | Use -f bank or -f generic to specify |
| "Categories not loading" | Verify JSON syntax, check file path |
| "Excel file not created" | Verify output directory exists, check disk space |
- CSVParser: Multi-format CSV parsing with date validation
- DateParser: Multi-format date parsing (MM/DD/YYYY, DD/MM/YYYY, YYYY-MM-DD)
- ConfigManager: Category rules from JSON configuration
- TransactionData: Transaction storage and queries
- BudgetAnalyzer: Spending analysis and trend calculation
- AlertSystem: Budget limit tracking and alerts
- SpreadsheetGenerator: Professional Excel file generation
To extend the application:
- Add Categories: Edit
src/ConfigManager.cppor customcategories.json - Add Analysis: Add methods to
BudgetAnalyzerclass - Add Sheets: Create new methods in
SpreadsheetGenerator - Add Formats: Extend
CSVParserfor new bank formats
- Efficient O(n) CSV parsing
- Fast transaction queries and aggregation
- Memory-efficient design (100K+ transactions)
- Quick Excel generation
- Excel chart generation is simplified
- Single-threaded processing
- JSON parsing is basic (no external library)
- Advanced Excel charts
- Multi-threaded parsing
- Regex category rules
- Database backend
- GUI interface
- OFX/QFX file support
- Recurring transaction detection
- Web dashboard
MIT License - See LICENSE file
Contributions welcome! Please follow C++17 standards and include proper error handling.
Made for better personal finance management