Automated bank statement parser and categorizer with interactive visual dashboard and detailed reporting.
Interactive visual dashboard with filters, charts, and real-time exploration.
./run.sh
# Opens http://localhost:5000 in your browserCommand-line tool that generates CSV reports.
python main.py
# Outputs reports to output/ folder- Interactive Dashboard: Visual cards, charts, and summaries
- Powerful Filters: Category, month, type, and text search
- Drill Down: Click any card to explore details
- Real-Time: Instant filtering and updates
- Mobile Friendly: Works on any device
- Multi-File Processing: Analyze multiple statement files at once
- Automatic Categorization: Rule-based transaction classification
- Multiple Reports: Category summaries, monthly trends, and detailed breakdowns
- Easy Configuration: Add categories via simple JSON file
- CSV Export: All reports exported as CSV for further analysis
# Clone or download this project
cd Statement
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtPlace your bank statement files in the statements/ folder:
statements/
βββ 2025-07.csv
βββ 2025-08.csv
βββ 2025-09.csv
Expected file format:
- CSV or TXT files
- Single column with comma-separated values
- Format:
Date,Description,Amount,Running Balance - Example:
01/08/2025,SHOPIFY PAYMENTS,"2,408.66","57,982.27"
python main.pyCheck the output/ folder for generated reports:
- categories_summary.csv - Total amount and count by category
- monthly_summary.csv - Monthly total amounts
- monthly_detailed_summary.csv - Monthly income/expense breakdown
- other_details.csv - Breakdown of uncategorized transactions
Edit rules.json to add or modify categories:
[
{
"name": "Shopify Income",
"contains": ["shopify"],
"type": "income"
},
{
"name": "AMEX Payment",
"contains": ["american express"],
"type": "expense"
}
]Rule structure:
name: Category display namecontains: List of keywords to match (case-insensitive)type: "income" or "expense"
Important:
- Rules are checked in order (first match wins)
- Keywords are matched as substrings
- Put more specific rules before general ones
The system comes pre-configured with these categories:
Income:
- Shopify Income
- Shop Pay / Affirm Income
Expenses:
- Zelle Expense
- AMEX Payment
- Capital One Payment
- DTF Printer USA LLC Transfer
- Wire Transfer
- Bank Fee
Other:
- Any transaction not matching rules
# Specify custom folders
python main.py /path/to/statements /path/to/rules.json /path/to/outputTest the parser:
python parser.py ./statementsTest the categorizer:
python categorizer.py ./rules.jsonTest report generation:
python reports.py ./statements ./rules.jsonShows total and count for each category:
category,sum,count
Shopify Income,45678.90,23
AMEX Payment,-12345.67,5
...
Shows total amount by month:
month,total_amount
2025-07,15234.56
2025-08,18567.89
...
Shows income, expense, and net by month:
month,total_income,total_expense,net,transaction_count
2025-07,25000.00,-9765.44,15234.56,45
...
Shows breakdown of uncategorized transactions:
description,sum,count
AMAZON MKTPL,-26.95,1
COSTCO WHSE,-156.78,3
...
Use this to identify patterns and create new rules.
- Verify files are in
statements/folder - Check file format (CSV or TXT)
- Ensure files contain comma-separated data
- Check
rules.jsonsyntax (valid JSON) - Verify keywords are lowercase in rules
- Remember: first matching rule wins
- Check for typos in keywords
- Dates should be in common formats (MM/DD/YYYY, etc.)
- Invalid dates will show as warnings but won't stop processing
pip install -r requirements.txtStatement/
βββ memory-bank/ # Project documentation
βββ statements/ # Input: place CSV/TXT files here
βββ output/ # Output: generated reports
βββ rules.json # Categorization rules
βββ parser.py # Statement file loader
βββ categorizer.py # Transaction categorization
βββ reports.py # Report generation
βββ main.py # CLI entry point
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Review "Other" category - Check
other_details.csvregularly to find new patterns - Order matters - Put specific rules before general ones in
rules.json - Backup your rules - Save
rules.jsonwhen you've configured it - Test incrementally - Test with one file first, then add more
- Keep files organized - Use consistent naming for statement files (e.g., YYYY-MM.csv)
Potential improvements for future versions:
- Support for multiple bank formats
- Machine learning categorization
- Web interface
- Database storage
- Duplicate transaction detection
- Manual category override
- Budget tracking and alerts
For issues or questions:
- Check the troubleshooting section above
- Review the memory bank documentation in
memory-bank/ - Verify your file formats match the expected structure
Free to use and modify for personal or commercial purposes.