Planning the finance app
I don’t like deciding too much up front, but understanding what you’re trying to do helps. I tend to focus more on the logic side rather than the UI - since I’m not that great at UI work - so I’ll start from the data model and work up.
What I want out of this
To figure out the data model I need to figure out what I want out of this. The two biggest parts are setting a budget and seeing how well actual spending compares to that budget. In the future I’d like to do things like analyse spending patterns and maybe intelligently inform the budget, but that’s a later goal.
I also want to have some implementation of shared accounts. Since I don’t have a joint account with my wife we transfer money between our individual accounts a lot. It’d be nice to be able to have a virtual spending account to track all this. I have ideas on how to implement this with the architecture from the first post, but that’s for another time.
I’m also going to defer repeating transactions. They’re useful from a budget point of view, but they don’t need to be there from day one.
Linking budgets to spending
I’m going to follow a tried-and-tested method, categories. Categories can have budget and actual transactions linked to them and compared.
I’m going to give categories a type - expense, income and transfers. Each has a natural transaction direction, but I won’t limit it as sometimes you want to reverse it. For example, medical expenses then insurance reimbursements - the reimbursement shouldn’t be counted as income but it does offset medical expenses. Perhaps you might want to do this differently, but I’m writing this for me!
Accounts
Just like at the bank! I’m not sure how different account types should behave, but I’ll store the kind (everyday, savings, credit card, loan) for later.
Importing Transactions
I do almost all of my transactions via EFTPOS, so I want to grab as much from my bank as possible. I wish there was a handy API or automatic email drop, but until that happens I’ll have to deal with period uploads. This means there’ll be duplicate transactions to detect on import.
To start with I’ll only allow OFX imports as my bank support it pretty well. CSV would require more custom work and isn’t as portable.
I’d like to automate this, but I’ll add an API to start with.
Cash
I rarely use cash, but it’d be nice to be able to track it. I’m currently planning to treat cash as another kind of account and transfer in to it.
Manual Transactions
Most transactions will be imported, but since there will be cash accounts we’ll need manual transactions. Hopefully the transaction-matching logic will cope with this so transactions can be entered before they occur at the bank (repeating transactions?), but that’ll come later.
Initial data model
And that’s it for now. Next up we’ll start some code!