Money
A personal finance app for budgeting and tracking what I own, with the same operations available to me and my AI assistant.
Money is a personal finance app for me and my AI assistant. I started with YNAB's idea of assigning available money to categories, then adapted it to how I think about my accounts and investments. It runs on Cloudflare Workers and D1, with a React interface.
I think in dollars, but my accounts can hold other currencies or fractional assets. I wanted one plan that could work with those holdings. Keeping each account in its own unit matters. Converting everything to dollars at entry would lose information I need when a quote changes.
The first decision was to store complete operations and calculate balances from them. A transfer is one operation that changes both accounts together. If I correct or delete it, I do not have to repair a second stored balance or find a detached half of the transfer. Calculating from history costs read work. For a personal app, I accepted that cost instead of maintaining another version of the same money.
Exact arithmetic follows the same idea. Entered decimal quantities stay exact through storage and transport. Valuations and totals also use exact arithmetic. Rounding happens when a number is displayed.
That has a visible consequence. Adding the rounded values shown beside individual accounts can give a different result from rounding the exact total. I keep the exact total. Changing the underlying holdings to make the displayed numbers agree would make the financial record wrong.
What belongs in the plan
An account's balance and the job I give that money are separate things. A category can cover money held across several accounts. Moving it between accounts that participate in the plan does not change the category's available amount.
Other accounts only track net worth. Their value should not become money I can assign to this month's expenses. Asset accounts also sit outside the spending plan. This lets me keep a wider picture of what I own without treating all of it as available cash.
Quote changes need a rule too. When a quote changes the dollar value of on-plan holdings, the difference goes to Ready to Assign. Existing category amounts keep their assigned jobs. Otherwise updating an exchange rate would quietly change the budget I had already made.
The assistant uses the same financial calculations as the browser. It has one MCP code tool and can discover the available operations, then call them through JavaScript in Cloudflare's sandbox. I wanted the assistant to work with the app's actual operations. Every plan capability needs equivalent assistant access.
The app already includes portfolios, holding cost basis and unrealized gains. Missing quotes remain visible in portfolio readings, which mark their totals as incomplete. Those readings return the calculated figures to the assistant too, so it does not need to rebuild a total from rounded display values.