Bento Spaces docs

Bento Spaces documentation

18 — Studio

developer.bentospaces.com is the widget workbench. The page stays static; drafts, releases and the publisher profile live in the API, called through the same origin (the same reverse-proxy rule as the webtop).

studio/
  index.html      editor + preview
  app.js          validation, preview, publisher, drafts, releases
  preview.css     the widget styles the preview needs
  styles.css      the workbench chrome
  lib/…           copied from web/src at build time

What it does

Publishing

Identity is two handles:

@ren/weather        public
ren--weather        install id

A release is a version directory with manifest.json and meta.json:

  1. Save the draft (mutable, private).
  2. Publish a version (1.2.0), which validates the manifest, injects the namespaced id and
  3. developer, hashes the exact bytes, and writes an immutable release.
  4. The release appears immediately in the personal registry and auto-lists in
  5. WidgetMarket (market: true); the API invalidates the market index cache. Tier is shown
  6. on the listing but does not gate publishing. WidgetMarket merges Studio releases with the
  7. five seeded legacy examples, whose files stay on the static marketplace host.
  8. Test install copies the release into the developer's own library without affecting other
  9. users. Uninstalling it behaves like any installed widget.

Versions must increase; re-publishing a version is refused. Changing a widget means a new version, never a mutated release.

Release notes are part of the release and show up beside each version in Studio and in the store's version history.

The release list can Unlist a version from WidgetMarket (it stays in the personal registry) or Pause it (hidden from both). Both are reversible and never rewrite the release bytes; the newest visible version becomes the registry's latest.

Install analytics

With the Publisher plan, Studio lists aggregate installs, version spread and the last install date per widget. Counts come from the installed libraries across accounts; no reader identity is exposed. Other plans receive 403 publisher_plan_required and the section stays hidden.

Build and run

node scripts/build-studio.mjs

# local, with the API proxied so the account chip works
API_UPSTREAM=http://127.0.0.1:5080 node scripts/serve-static.mjs studio 5085

In a split deployment, developer.bentospaces.com serves release/developer and its config.js points at https://api.bentospaces.com. The browser calls the API directly; CORS and the .bentospaces.com cookie carry the session.

Verification

node scripts/e2e/studio.e2e.mjs starts a static server and checks:

Not built yet

No Studio gaps are open. Module assets ship inside the release; the backlog lives in Open work.