Skip to content

Publishing widgets and tools

A widget or a tool you make is yours alone. To offer one to every Thingport instance, it goes into the Thingport repository by pull request, as a folder in the same layout as the examples: the metadata, the script, the HTML, a labels file per language, a README and a few screenshots. A maintainer reads the code before merging it, because it will run in other people’s Thingport instances with their access.

The steps and what reviewers look for are kept in one place each:

Sharing a Steps What reviewers look for
Dashboard widgetPublishing to the communityCommunity widgets README
ToolTool developmentTools README

In short, for either:

  1. Fork the repository and branch from develop (contributing).
  2. Put the folder under community-widgets/<slug>/ or tools/<slug>/. For a widget, Download for publishing in its ⋮ menu gives you the folder with a README to fill in.
  3. Add screenshots of it at work, listed in its metadata, and list the slug in the folder’s index.json.
  4. Run the check that CI runs: npx tsx scripts/validateCommunityWidgets.ts or npx tsx scripts/validateTools.ts in backend/.
  5. Open a pull request against develop.

Once merged, a widget shows up under Community in every Thingport instance’s custom widgets, and a tool under Administration → Tools, for an admin to install. Raise its version when you change it, and people who installed it are offered the update.

A published widget or tool can hide an easter egg that gives its users a secret badge: call thingport.achievements?.unlock("<key>") when they find it (one of the community widgets has one). The badge has to be in Thingport too, so the same pull request adds it: <slug>/<key> to SECRETS in backend/src/services/achievementCatalog.ts, its entry in frontend/src/constants/achievements.ts (with its art in frontend/src/components/achievements/), and its name, rule and stat under app.achievements.badges in every locale.

Something unclear, wrong or missing on this page? Say so here, or react. It’s kept in GitHub Discussions. Something broken? Report it as a bug.