FafyCat is a privacy-focused financial transaction categorization tool that uses machine learning to automatically organize your banking data with >90% accuracy. All processing happens locally on your device - no cloud services, no data sharing.
- π€ Smart Categorization: Machine learning automatically categorizes transactions with high accuracy
- π Privacy First: All data stays on your device - no external APIs or cloud services
- π Intelligent Review: Active learning reduces manual work by 70-90%
- πͺ Merchant Memory: Learns from your patterns to improve over time
- π Export Ready: Multiple export formats for your favorite analysis tools
- β‘ Fast & Efficient: Process thousands of transactions in seconds
- Python 3.13 or later
- uv package manager https://docs.astral.sh/uv/getting-started/installation/
-
Install with uv
uv tool install git+https://github.com/davidchris/fafycat
-
Or clone for development
git clone https://github.com/davidchris/fafycat.git cd fafycat uv sync -
Configure environment (optional)
cp .env.example .env # Edit .env only if you want to override the defaults -
Start the application
# Start the packaged app fafycat serve # Development mode with sample data and hot reload fafycat serve --dev # If developing from a cloned checkout uv run fafycat serve --dev
-
Open your browser
- Development: http://localhost:8001
- Production: http://localhost:8000
-
Import Your Data
- Navigate to the Import page
- Upload your bank transaction CSV files
- The system auto-detects column formats
-
Review & Categorize
- Go to the Review page
- Correct any miscategorized transactions
- The system learns from your corrections
-
Train the Model
- Visit Settings β Train Model
- Click "Train ML Model Now"
- Training takes seconds to minutes
-
Enjoy Automation
- Future imports will be auto-categorized
- Only review uncertain predictions
- Export data for analysis
If you have previously categorized transactions:
# Import your labeled data
uv run python scripts/import_labeled_data.py --data-path /path/to/your/data
# Or use the reset script for a fresh start
uv run python scripts/reset_and_import.py --labeled-data-path /path/to/your/data --train-model- I'm getting mine via the MoneyMoney App.
βββββββββββββββββββ
β CSV Import β β Flexible format detection
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ ββββββββββββββββββββ
β Feature Extract ββββββΆβ ML Prediction β
β - Merchants β β - LightGBM β
β - Amounts β β - Naive Bayes β
β - Patterns β β - Ensemble β
βββββββββββββββββββ ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Review UI β
β Active Learning β
ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Data Export β
β CSV/Excel/JSON β
ββββββββββββββββββββ
FafyCat automatically detects and handles various banking export formats:
- Date: Various formats (DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD)
- Amount: Positive/negative or separate debit/credit columns
- Description: Transaction details and merchant names
- Category: If present, used for training
Common bank formats supported:
- German banks (Sparkasse, DKB, etc.)
- US banks (Chase, Bank of America, etc.)
- UK banks (Barclays, HSBC, etc.)
- Generic CSV exports
- Initial Training: Learn from your categorized transactions
- Prediction: Automatically categorize new transactions
- Active Learning: Intelligently select which transactions need review
- Continuous Improvement: Learn from corrections over time
- Local Processing: All ML models run on your device
- No Cloud Services: Zero external API calls
- Your Data: You own and control all your financial data
- Open Source: Fully auditable codebase
Create a .env file only if you want to override the default user-data location:
# Data defaults to your platform user-data directory
# Override only if you want a custom location
FAFYCAT_DATA_DIR=/path/to/fafycat-data
FAFYCAT_EXPORT_DIR=/path/to/fafycat-data/exports
FAFYCAT_MODEL_DIR=/path/to/fafycat-data/models
# Optional explicit database override
FAFYCAT_DB_URL=sqlite:////path/to/fafycat-data/fafycat.db
# Server settings
FAFYCAT_DEV_PORT=8001
FAFYCAT_PROD_PORT=8000
FAFYCAT_HOST=127.0.0.1- Default: Uses your platform user-data directory
- Development:
fafycat serve --devseeds synthetic test data - Custom: Set
FAFYCAT_DB_URLor pass--data-dir
- Accuracy: >90% correct categorization
- Speed: <100ms per transaction
- Scale: Handles 100,000+ transactions
- Efficiency: 70-90% reduction in manual review
uv run pytest# Linting
uvx ruff check --fix
# Formatting
uvx ruff format
# Type checking
uvx ty check- FastAPI docs: http://localhost:8000/docs
- OpenAPI schema: http://localhost:8000/openapi.json
All shipped application code lives under src/fafycat/:
src/fafycat/app.pyfor the FastAPI app factorysrc/fafycat/cli.pyfor the packaged CLIsrc/fafycat/api/for API routes and servicessrc/fafycat/web/for HTML routes, pages, and componentssrc/fafycat/core/for config, database, and shared modelssrc/fafycat/data/for CSV processingsrc/fafycat/ml/for the ML pipelinesrc/fafycat/static/for packaged static assets
tbd.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Built with FastAPI, FastHTML, and scikit-learn
- Inspired by the need for privacy-preserving financial tools
Note: FafyCat is designed for personal use. Always verify categorizations for important financial decisions.