02
How to run the code
There is no build step. The site is plain HTML, CSS and JavaScript. No Node.js, npm or bundler is needed to use or deploy it. Clone the repository and open any index.html in a browser. The calculator even works straight from disk (file://).
git clone https://github.com/johnnynanjiang/Bitcoin-Logbook.git
cd Bitcoin-Logbook
# Run the calculator's tests (Node.js, no packages to install)
node apps/bitcoin-dca-calculator/tests/run.js
# Or open the same tests in a browser
open apps/bitcoin-dca-calculator/tests/index.html
# Add the latest daily prices (Python 3, no packages to install)
python3 .github/scripts/update_btc_prices.py
The calculator's formulas are in lib/core.js, with one folder per strategy in strategies/.
05
Why open source?
"Don't trust, verify".
You shouldn't have to take my word for it. Every number on this site, from a calculator result to the reported +$4,629.81 profit, comes from code and data you can read, run and check yourself.
If a formula is wrong, you can see it. If a price is wrong, you can trace it to the source. If you find a problem, open an issue.
View the code on GitHub ↗