SN Widget Kit logoSN Widget Kit
Docs

Getting Started

Basic Workflow

The whole loop is five steps — login once, then pull, preview, edit and push.

Login → Pull widget → Open Live Preview → edit + save (hot reload) → Push
  1. Login: SN Widget: Login to Instance
  2. Pull: SN Widget: Pull Widget → pick from the list → downloads to widgets/<instance>/<id>/
  3. Preview: SN Widget: Open Live Preview → opens in the browser, connected over WebSocket
  4. Edit: save any file → the preview updates instantly
  5. Push: SN Widget: Push Current Widget (or enable auto-sync)

Folder layout

Each widget is pulled as a folder, nested under its instance. Every file maps directly to a field on the sp_widget record:

<workspace>/widgets/<instance>/<widget-id>/
├── template.html       → template field
├── client.js           → client_script field
├── server.js           → script field (server script)
├── styles.scss         → css field (SCSS, compiled in the preview)
├── link.js             → link field
├── option-schema.json  → option_schema field
├── demo-data.json      → demo_data field
└── .widget-meta.json   → metadata (sys_id, scope, timestamp, instance) — not pushed
Instances never mix
<instance> is the instance subdomain (e.g. dev12345), so widgets pulled from different instances live in separate folders. See Multiple instances.

The .widget-meta.json file holds the widget's sys_id, scope, timestamp and originating instance. It is never pushed — it powers the cross-instance push block and conflict detection.