Rulewright: A Smarter Way to Categorize Transactions with AI
Introducing Rulewright: A Smarter Way to Categorize Transactions The Problem Managing personal finances often means going through long lists of transactions from banks, UPI apps, and digital payment platform
Introducing Rulewright: A Smarter Way to Categorize Transactions
The Problem
Managing personal finances often means going through long lists of transactions from banks, UPI apps, and digital payment platforms. Categorizing every transaction manually can be repetitive and time-consuming.
I wanted to explore a simpler approach: what if transaction categorization could combine reusable rules with AI-powered suggestions while keeping the user in control?
That idea led me to build Rulewright.
What Is Rulewright?
Rulewright is a Python and Streamlit-based bookkeeping prototype that helps users categorize transaction records from CSV files.
The goal is to make transaction organization easier while allowing users to review suggestions before exporting their final ledger.
Key Features
1. CSV Transaction Import
Upload a CSV containing transaction descriptions and supported fields to get started. A fictional sample ledger is also available for testing.
2. Offline Categorization Rules
Create reusable merchant-based rules to categorize transactions without sending them to an AI service.
3. Gemini AI Suggestions
Rulewright can request category suggestions from the Google Gemini API. The suggested categories are drafts, not automatically approved financial records.
4. Human Review and Approval
Users can review and edit suggested categories, approve selected transactions, and inspect the final approved ledger before exporting it.
5. CSV and Rules Export
Download categorized transactions, approved records, and reusable rules for further work.
How It Works
The current workflow is straightforward:
- Upload a transaction CSV or load the fictional sample ledger.
- Define the categories you want to use.
- Generate offline rules or request AI suggestions.
- Review and edit the proposed categories.
- Approve the transactions you want to include.
- Download the resulting CSV.
Technology Stack
- Python β application logic and transaction processing
- Streamlit β interactive web interface
- Pandas β CSV loading and tabular data processing
- Google Gemini API β optional AI-powered category suggestions
- Pytest β automated tests for core functionality
Privacy and Responsible AI
Financial transaction data can be sensitive. Rulewright includes a warning that transaction descriptions are sent to an external service when Gemini suggestions are requested.
For testing, I recommend using fictional data rather than real bank statements. Offline categorization is available without sending transaction descriptions to Gemini.
AI suggestions should always be reviewed before being treated as final financial records.
What I Learned
Building Rulewright helped me explore CSV processing, reusable categorization rules, API integration, data validation, approval workflows, and automated testing.
It also reinforced an important principle: AI can help make repetitive tasks easier, but users should remain in control of decisions involving their financial data.
Try Rulewright
- GitHub repository: https://github.com/LaxmikanthJanardhan01/rulewright
- Live demo: https://rulewright-vzkikduphnnvksu7vgzouu.streamlit.app
What's Next?
I plan to improve the dashboard design, make transaction review more intuitive, strengthen CSV handling, and continue testing the application with fictional transaction data.
Rulewright is a prototype, and there is still plenty of room to improve it.
I'd love to hear your feedback: What feature would make a transaction categorization tool more useful to you?
Thanks for reading!
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.