~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
42 lines · 2.9 KB Raw History

site

The source of https://socialweb.computer/. The landing page is index.md: the owner's Compute Contracts page (first written as the publicdomainrelay org-root README), with the current commands spliced in at build time from README.md sections, so they cannot drift: a line <!-- README.md#<heading id> --> becomes that section's body. build.ts renders it to out/index.html, the user docs and the protocol docs (its DOCS list) to out/docs/, and fancy/ (the owner's Compute Contracts pages, first written as the multi-page site of github.com/publicdomainrelay/social-web-computer, private since 2026-11-20, updated for today) to out/fancy/. The look is the one of https://console.socialweb.computer (style.css) on white pages: monospace type, the console's header bar, and code blocks and framed panels like its terminal. A link to a rendered doc (or to README.md) goes to its page; any other repository link goes to the file on https://knotless.dev/socialweb.computer/socialweb-computer-kcp (main); the build fails on a link to a missing page or anchor. A ```mermaid block becomes an inline SVG at build time, and a fenced block with a language is highlighted at build time (shiki, theme tokyo-night, colours raised to WCAG AA on the dark block); no script on any page. lexref.ts generates the lexicon and XRPC reference from lexicons/**/*.json (out/docs/lexicons/<nsid>.html, out/docs/lexicons/index.html, out/docs/xrpc/index.html); a malformed lexicon or a ref to a missing def fails the build. out/install.sh is scripts/install.sh of the commit, byte for byte (curl -sfL https://socialweb.computer/install.sh | bash -e). The footer and out/COMMIT name the commit.

Dependencies, all pinned: jq, git; deno and Chrome as pinned in tests/compositions/staging/page-tools.json (deno.sh and build.sh use PATH's deno and google-chrome when they are those versions, else fetch them with tests/compositions/staging/tools.sh, which checks their sha256; Chrome for Testing is linux/amd64 only); marked, mermaid, puppeteer-core and shiki in deno.json, locked in deno.lock.

Build, then look at site/out/index.html:

site/build.sh

Deploy (ssh as root to the gateway, port 1997; --dry-run prints what would change and stops). It refuses a tree with uncommitted changes or a commit on no swc branch, and anything in out/ but html, css, svg, png, ico, txt, COMMIT and install.sh; it saves the tree it replaces to /var/backups/socialweb.computer-<UTC time>.tgz on the gateway, swaps in the new one and checks every file against what https://socialweb.computer/ serves. Caddy is not touched: its site block for socialweb.computer is in the gateway's /etc/caddy/Caddyfile.

site/deploy.sh --dry-run
site/deploy.sh

Roll back: on the gateway, tar -C /var/www -xzf /var/backups/socialweb.computer-<UTC time>.tgz after moving /var/www/socialweb.computer aside.