on main help sign in

An S3 storage manager for Urbit

git clone ssh://git.iko.soy/silo

silo

silo

An S3 storage manager for Urbit. silo is a frontend-only app: it is served as a glob by docket and talks to the %storage agent that ships with %landscape.

The glob is hosted over Ames by ~donmec-sallud. To install, run |install ~donmec-sallud %silo in dojo. shelf.iko.soy lists all the apps ~donmec-sallud offers.

Desk

desk/ contains only the docket file, the (empty) bill and the kelvin. The desk you install also needs the marks for these files. nix build produces a complete desk by layering desk/ on top of urbit's base-dev (pinned to 408k-2) and landscape's desk-dev. The result is in ./result.

The app icon is inlined into desk/desk.docket-0 as a base64 data: URI of ui/src/assets/favicon.svg. If you change the icon, regenerate it with:

echo "data:image/svg+xml;base64,$(base64 < ui/src/assets/favicon.svg | tr -d '\n')"

UI

silo is built using React, TypeScript and Tailwind CSS. Vite bundles the app for distribution and provides a dev server.

Getting started

Run nix develop (or install Node 22, see ui/.nvmrc), then npm install inside ui/.

To develop you need a running ship to point to. Create ui/.env.local (it isn't committed) containing VITE_SHIP_URL={URL}, where {URL} is your ship's URL (the default is http://localhost:8080). Then run npm run dev and open /apps/silo/. The dev server proxies everything except the interface to the ship, so you see live data, and hot-reloads code changes.

Building with Nix

CommandOutput
nix buildthe desk to install
nix build .#globthe glob folder to upload through docket's globulator

The frontend build is reproducible: the same source produces byte-identical files across rebuilds and across platforms (checked on aarch64- and x86_64-darwin). npm dependencies come from ui/package-lock.json and toolchain versions are pinned in flake.lock. The glob hash then depends only on the source and on the file types your browser reports during upload, so use the same browser each time.

Publishing

On ~donmec-sallud:

  1. The first time, create and mount the desk in dojo: |new-desk %silo then |mount %silo.
  2. Build the desk and sync it into the pier, then commit it:
    nix build
    rsync -rL --delete --chmod=u+w result/ ~/donmec-sallud/silo/
    Run |commit %silo in dojo. The first time, also run |install our %silo. Docket will report awaiting manual glob for %silo desk.
  3. Build the glob with nix build .#glob -o result-glob. Open https://{ship-url}/docket/upload, select the silo desk and the result-glob folder, then press "glob!". Docket hashes the glob and writes the new glob-ames+[~donmec-sallud 0v...] line into the desk's desk.docket-0.
  4. Copy that line from ~/donmec-sallud/silo/desk.docket-0 into desk/desk.docket-0 in this repo and commit it.

Step 4 matters. If you later commit a desk whose glob hash differs from the one ~donmec-sallud is hosting, docket drops the hosted glob and you have to upload it again. You only need to re-upload when the UI changes.

Changes from the previous setup