This is an implementation of the examples in Modern Treasury's "Accounting For Developers" article series. The implementation includes both the example in part 2 of the series, a toy Venmo clone, and the example in part 3 of the series, a lending marketplace.
I have also extended the example in part 3 to use compound interest instead of simple interest.
Note that for the lending marketplace implementation, I've adjusted the interest calculation interval to minutes instead of months, so you can watch a 1-year investment or 1-year loan play out in 12 minutes instead of 12 months.
- Checkout the relevant commit:
4e7b746
for toy Venmo clone5ffc66d
for lending marketplace with simple interestfeeb8cd
for lending marketplace with compound interest
- Run
pnpm install
- Run
pnpm dev
- Run
cd apps/backend && pnpm migration:run
- Use Bruno and import the
bruno
folder to call the relevant APIs - Use your SQL database GUI of choice to observe how the account balances change.