AI-powered bank transaction categorization system that automatically identifies transaction types and vendors.
-
Install dependencies:
poetry install
-
Set up API key:
cp .env.example .env # Edit .env and add your OpenAI API key -
Start the application:
# Easy one-command startup python start.py # Or manually start just the web interface poetry run streamlit run app.py
-
Open your browser to
http://localhost:8501
- Go to Process Transactions page
- Upload a CSV file or select sample data
- Click Process to categorize transactions
- View results in real-time
- Vendor Payments: View all vendor transactions and matching details
- Analytics: See spending patterns and charts
- Vendors: Browse identified vendors and their information
- Database: View all transactions by category
- Process Transactions: Upload CSV files and run processing
- Analytics: Charts and spending analysis
- Vendor Payments: Review vendor transactions with matching source
- Vendors: Browse all identified vendors
- Database: View transaction categories and data management
For large files, enable background processing:
-
Start services:
# Install Redis (macOS) brew install redis brew services start redis # Start Celery worker (separate terminal) poetry run celery -A src.celery_app worker --loglevel=info
-
Use "Process in Background" button in the UI
-
Monitor progress while using other pages
To stop all running services (Celery workers, Streamlit app, Redis):
# Kill all Celery worker processes
pkill -f "celery.*worker"
# Kill Streamlit app
pkill -f "streamlit.*app.py"
# Stop Redis service
brew services stop redis
# OR if Redis was started manually:
redis-cli SHUTDOWNTo clear all Redis cache, Celery queues, and start fresh:
# Start Redis (if not running)
redis-server --daemonize yes
# Clear all Redis data
redis-cli FLUSHALL
redis-cli FLUSHDB
# Purge all Celery tasks
poetry run celery -A src.celery_app purge -f
# Stop Redis
redis-cli SHUTDOWNTo see real-time logs from background processing:
# Option 1: Run Celery worker manually (shows logs in terminal)
poetry run celery -A src.celery_app worker --loglevel=info
# Option 2: Monitor task events
poetry run celery -A src.celery_app events --dump
# Option 3: Check active tasks
poetry run celery -A src.celery_app inspect active- Smart Categorization: vendor_payment, salary_payment, customer_payment_received, etc.
- Vendor Identification: Automatically extracts and matches vendors
- Confidence Scores: Shows AI confidence for all decisions
- MECE Categories: Mutually exclusive, collectively exhaustive categories
- Duplicate Detection: Prevents processing duplicate transactions
- Interactive UI: Real-time progress and filtering
- Python 3.10+
- OpenAI API key
- Poetry
- Redis (optional, for background processing)
Includes sample Danish bank CSV data for testing. The system processes these fields:
- Date, Amount, Currency, Transaction text, Vendor info, etc.
- Database: SQLite with transaction and vendor tables
- AI: OpenAI GPT for categorization and vendor enrichment
- UI: Streamlit web interface
- Background: Celery + Redis for async processing