When developers think about tracking loans to friends, they usually start with a deceptively simple mental model:
"If I lend Rahul Rs. 5,000, that is an expense of Rs. 5,000. When Rahul pays me back, that is income of Rs. 5,000."
This mental model is fundamentally broken.
If you record lending money as an ordinary living expense, your monthly budget shows a massive, artificial spending spike. You didn't spend Rs. 5,000 on goods or services; you simply converted liquid cash into a loan receivable asset.
Even worse, when your friend pays you back three months later, recording their repayment as income distorts your tax calculations and savings rate, making it look as though you earned new salary or business revenue.
When I designed the debt-tracking subsystem in FinLedger ( LendingRepository.kt ), I realized that modeling personal debt requires full lifecycle tracking: principal disbursement, linked bank accounts, partial settlements, asset reclassification, and two-way ledger synchronization.
Here is…