See a pre-prepared example: Some Java+Maven projects in a directory hierarchy
All the data is loaded in through the URL. Specifically the base64 string to the right of the hash (#). The data within that hash parameter never leaves the browser. While the browser may requests the pages from the web server (e.g. total.html)
Make sure you have installed 'git size', first. Instructions here.
git size --sunburst --recursive
If that is too much for your terminal, try this:
git size --sunburst-html --recursive > foo.html
The gh-pages source is available at this Github repo, and is Apache licensed.