Run locally
A static site with no framework and no bundler, plus a separate contracts package.
Requirements
You need Node.js. The contracts package asks for Node 22.10 or newer, and the same version works for the site. The site has no runtime dependencies to install.
Commands
npm install
npm run build
npm run serve
| Command | What it does |
|---|---|
npm install | Installs the root dev tools, including the crawler. The site does not need them to run. |
npm run build | Composes the pages in src/ into site/. |
npm run serve | Serves the site at http://localhost:8811 with clean URLs, such as /docs/fees. |
npm test | Runs the Node tests in tools/test. |
npm run close -- month.json | Runs the monthly close (tools/close.mjs). See Operator guide. |
cd contracts && npm install && npm test | Installs and tests the contracts package. |
File map
| Path | Contents |
|---|---|
site/js/money.js | Money arithmetic in BigInt, for USDG, shares and prices. |
site/js/close.js | The close engine, the canonical Roll CSV, the identity checks and SHA-256. |
site/js/sample-data.js | The sample portfolio and six sample months, labelled as sample. |
site/js/data.js | Loads the published Rolls, or falls back to the sample set. |
site/js/abi.js | keccak-256 and ABI encoding and decoding, written without a library. |
site/js/wallet.js | EIP-6963 wallet discovery, chain switching, reads through the public RPC and writes through the wallet. |
site/js/facade.js | The street drawing. |
site/js/config.js | Addresses and links. The only file that changes at launch. |
site/data/ | portfolio.json and the published Rolls in rolls/, listed by rolls/index.json. |
src/pages, src/docs | Page sources. Each file starts with a JSON metadata comment, and the build wraps the body in the site layout. |
tools/build-site.mjs | The build, which composes src/ into site/. |
tools/serve.mjs | The local server. |
tools/close.mjs | The monthly close tool. |
contracts/ | The Solidity contracts, their tests and the operator scripts. See Contracts. |
Third-party code
There is no framework and no bundler. GSAP and Phosphor icons load from jsDelivr, and fonts load from Google Fonts. Everything else, keccak-256 and ABI encoding included, lives in the repository.