README.md
atlibs-web-editor-ui
Author, check and publish atlibs compositions: https://atlibs.socialweb.computer/
- Open
<handle>/<name>orat://…(@<cid>pins it);?ref=in the URL does the same. - Each edit is checked against the
com.fedfork.exec.compositionlexicon, then loaded as both hosts load it (loadComposition: pins, hooks, parameters). Shown: instances, edges, hooks, parameters, exports, session scopes. - Add module
<handle>/<module>: an instance at itsat://URI and pin. - Publish:
putRecordas you (a swap on your own record's CID). - Bind to knotless repo: a
com.fedfork.exec.bindingat the repository's key (getRecordof itsdev.knotless.repo), orself, pinning the opened composition by CID.
Run it:
git clone https://knotless.dev/johnandersen777.bsky.social/atlibs-web-editor-ui
cd atlibs-web-editor-ui
python3 -m http.server 8790 --bind 127.0.0.1 # http://127.0.0.1:8790/ (sign-in: the loopback client)
Test (headless Chrome; with ALICE_ATPROTO_HANDLE and ALICE_ATPROTO_PASSWORD, an app password, also a
publish, bind and delete round as that account):
npm ci
node --test test/*.test.mjs
The example is written by compose.ts from atlibs.modules.js (atlibs add wrote it):
node compose.ts | diff - example.json
atlibs compose check example.json > /dev/null && echo loads
Deploy (scripts/deploy.sh: dist/ to the socialweb.computer gateway, a Caddy site):
cargo install --locked --git https://knotless.dev/johnandersen777.bsky.social/atlibs --rev 88b2ba8 atlibs
scripts/build.sh # dist/ for https://atlibs.socialweb.computer/; another origin: scripts/build.sh https://host/path/
scripts/deploy.sh
| what | from |
|---|---|
@publicdomainrelay/atlibs 0.3.0 | jsdelivr (index.html import map; package-lock.json for compose.ts) |
the example's compose module | atlibs.lock.json (atlibs add bobvmbuilder.bsky.social/compose) |
@atproto/oauth-client-browser 0.5.14, @atproto/lexicon 0.7.17, codemirror 6.0.2, @codemirror/lang-json 6.0.2 | esm.sh |
lexicons/ | atlibs 88b2ba8 (v0.3.0), and com.atproto.repo.strongRef |
| the OAuth client | records/editor.json, staged by atlibs stage --target spa |
Decisions:
- Records store
at://URIs and pins; the editor shows<handle>/<name>(a handle verified both ways, else<did>/<name>). Inputs take<handle>/<name>,<did>/<name>orat://…. - A module key resolves against the opened composition's publisher, else you. Publishing someone else's
composition rewrites its keys to
at://URIs of theirs. - Added modules are pinned; the example pins every instance.
- No
listRecords: everything is agetRecordat a known key.
