| This is my mental model and how I built the backend of a budgeting web app. Two types of accounts: - assets (you want your balance to be more than 0) - liabilities (you want your balance to be 0) Two types of entries: - debits (increase balances of assets, decrease balances of liabilities) - credits (increase balances of liabilities, decreases balances of liabilities) Rules: - A transaction represents a transfer of value between accounts. - Every transaction must have at least two entries. The balance of all entries the transaction holds should be 0, i.e., balance = debits - credits. You don't think about money leaving or entering an account before you nail down those definitions. The account representations can be anything that holds a numeric value, not just money. You can affect more than two accounts by adding additional entries with the condition of keeping the balance to 0. |
I think in this problem hides two mistakes:
- Zero liabilities is not a reasonable goal for most people.
- There's an equity account type also. (Also income and expense accounts.)