When an application grows organically, early data models inevitably hit structural limits.
In FinLedger's earliest releases, the lending subsystem was completely standalone. The lending_records SQLite table simply stored a raw text column: person_name TEXT NOT NULL . It worked well enough for logging simple loans to a few friends.
However, several sprints later, we designed the Split & Group Expenses Engine to allow roommates and friends to split dinner bills and vacation costs. The split engine also required contacts: people who participated in group expenses and owed shares of restaurant checks.
Suddenly, we had a serious architectural dilemma:
A user had "Rahul Patil" in their lending ledger with a Rs. 1,000 loan.
The same user had "Rahul" in their split expense ledger owing Rs. 450 for a pizza order.
Because contacts were stored as disconnected string fields in two separate tables, the application had no way of knowing that these two records belonged to the same human being.…