{"id":13341737,"url":"https://github.com/eclipse-thingweb/playground","last_synced_at":"2025-04-11T12:53:53.868Z","repository":{"id":38375465,"uuid":"62799593","full_name":"eclipse-thingweb/playground","owner":"eclipse-thingweb","description":"Browser application for validating and designing W3C Thing Descriptions and Thing Models.","archived":false,"fork":false,"pushed_at":"2025-03-28T08:29:51.000Z","size":17729,"stargazers_count":31,"open_issues_count":24,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-10T05:41:32.081Z","etag":null,"topics":["iot","nodejs","web","web-of-things","wot"],"latest_commit_sha":null,"homepage":"https://playground.thingweb.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-thingweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-07T10:47:28.000Z","updated_at":"2025-04-09T19:18:54.000Z","dependencies_parsed_at":"2023-07-21T08:44:06.567Z","dependency_job_id":"9553e698-60ac-423a-837a-2fd4d8471607","html_url":"https://github.com/eclipse-thingweb/playground","commit_stats":null,"previous_names":["eclipse-thingweb/playground","thingweb/thingweb-playground"],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-thingweb%2Fplayground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-thingweb%2Fplayground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-thingweb%2Fplayground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-thingweb%2Fplayground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-thingweb","download_url":"https://codeload.github.com/eclipse-thingweb/playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248403753,"owners_count":21097585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","nodejs","web","web-of-things","wot"],"created_at":"2024-07-29T19:25:43.708Z","updated_at":"2025-04-11T12:53:53.844Z","avatar_url":"https://github.com/eclipse-thingweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/eclipse-thingweb/thingweb/main/brand/logos/playground_for_dark_bg.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/eclipse-thingweb/thingweb/master/brand/logos/playground.svg\"\u003e\n    \u003cimg title=\"Eclipse Thingweb Playground \" alt=\"Eclipse Thingweb logo with Playground\" src=\"https://github.com/eclipse-thingweb/thingweb/raw/main/brand/logos/playground.svg\" width=\"300\"\u003e\n  \u003c/picture\u003e\n\u003c/h1\u003e\n\n## Playground\n\nThe place where you can create and play with WoT Thing Descriptions. Try it online at [https://playground.thingweb.io/](https://playground.thingweb.io)\n\n[![Default CI \u0026 CD Pipeline](https://github.com/eclipse-thingweb/playground/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/eclipse-thingweb/playground/actions/workflows/ci-cd.yaml)\n[![CodeQL](https://github.com/eclipse-thingweb/playground/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/eclipse-thingweb/playground/actions/workflows/codeql-analysis.yml)\n[![Discord](https://img.shields.io/badge/Discord-7289DA?logo=discord\u0026logoColor=white\u0026label=td-playground)](https://discord.gg/9yaFmkJ9GT)\n[\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dw/@thing-description-playground/core\"\u003e](https://npm-stat.com/charts.html?package=%2540thing-description-playground%252Fcore)\n[![Netlify Status](https://api.netlify.com/api/v1/badges/51a65a70-cb51-49e1-bbb6-82e83983c6cf/deploy-status)](https://app.netlify.com/sites/thingweb-playground/deploys)\n[![Static Badge](https://img.shields.io/badge/Show%20Adopters%20and%20Users-%2331b8a3ff?logoColor=31b8a3ff)](https://github.com/eclipse-thingweb/playground#adopters)\n\n## Installation\n\nThere are different ways to use Playground:\n\n-   Install all packages and their dependencies via `npm install` in the root directory. This script calls `lerna bootstrap`.\n-   You can install the different packages from npm ([see below](./packages)) or in their respective directories.\n\n## Structure\n\nThe structure of all Playground packages is shown here: ![packageStructure](images/playground-structure.png)\n\nAll packages (except CLI and Web) are designed to be used as an imported package in a Node.js project or as a web bundle in a Web application.\nThis allows them to be used in the Web package as part of a Web UI or inside the CLI.\n\n-   The core package provides a function to check whether a Thing Description (TD) is valid according to the W3C WoT [Thing Description standard](https://w3c.github.io/wot-thing-description/#).\n    It uses the official JSON Schema plus additional scripts for aspects that cannot be checked with a JSON Schema alone.\n    Used together with the assertions package, it allows to check whether all of the features of the TD standard are present in a single TD or a group of TDs representing an implementation.\n\nBoth packages are used by the Web and CLI packages to provide their functionalities, plus IO functionalities through a UI.\n\n## Packages\n\nThe packages in this repository are available under ([packages folder](./packages)) or on NPM under [@thing-description-playground/packageName](https://www.npmjs.com/search?q=%40thing-description-playground).\n\nReusable packages:\n\n-   [core](./packages/core/): The core package provides a function to check whether a Thing Description (TD) is valid according to the W3C WoT [Thing Description standard](https://w3c.github.io/wot-thing-description/#).\n    It uses the official JSON Schema plus additional scripts for aspects that cannot be checked with a JSON Schema alone. It generates a JSON report of the validation results. [NPM](https://www.npmjs.com/package/@thing-description-playground/core).\n-   [assertions](./packages/assertions/): The assertions package allows to check whether all of the features of the TD standard are present in a single TD or a group of TDs representing an implementation. It needs to be used together with the core package since some features are detected by the core package. [NPM](https://www.npmjs.com/package/@thing-description-playground/assertions).\n-   [defaults](./packages/defaults/): The defaults package can be used to add or remove explicitly stated default values in a TD. It has no dependency to other playground packages. [NPM](https://www.npmjs.com/package/@thing-description-playground/defaults).\n-   [td_to_asyncAPI](./packages/td_to_openAPI): The Async API package allows to create an Async API instance from a Thing Description which has MQTT in the forms. It only depends on the defaults package to add defaults to a TD before generating the Async API instance. [NPM](https://www.npmjs.com/package/@thing-description-playground/td_to_asyncapi).\n\nEnd Product Packages:\n\n-   [cli](./packages/cli/): The CLI package wraps the above packages in a way they can be used from the command line. Additionally, it allows the functionalities of the other packages to be executed on a set of TDs. [NPM](https://www.npmjs.com/package/@thing-description-playground/cli).\n-   [web](./packages/web/): The Web package wraps the above packages in a way they can be used from a browser interface. You can host/adapt your own browser version of the playground. It is online at [https://playground.thingweb.io/](https://playground.thingweb.io/)[NPM](https://www.npmjs.com/package/@thing-description-playground/web).\n\n## Examples\n\nExamples are included in the [core](./packages/core/examples) and in the [examples folder](./examples) at the root of the project.\n\n## Browser-based Thing Description Validation\n\n-   Online: It is hosted [here](https://playground.thingweb.io/)\n\n    -   Simply paste a TD in the text field and click validate\n    -   Safari browser has unexpected behavior with JSON-LD documents\n    -   If you lose your internet connection when validating JSON-LD validation will fail since it tries to access the documents under `@context` (can be turned off)\n\n-   Offline/OnPremise: by hosting the `web` yourself. Therefore, please deliver the \"index.html\" file with a web-server.\n\n## Batch Testing\n\nPlease have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#batch-testing) for batch testing of Thing Descriptions.\n\n## Script-based Assertion Tester\n\nPlease have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#script-based-assertion-tester--a-parameter) for script-based assertion testing, or at the `assertions` package, if you're planning to integrate the assertion testing as a dependency in your own NPM modules.\n\n## Script-based Thing Description Validation\n\nPlease have a look at the `cli` [package](https://github.com/eclipse-thingweb/playground/tree/master/packages/cli#script-based-thing-description-validation) for script-based TD validation, or at the `core` package, if you're planning to integrate the TD validation as a dependency in your own NPM modules.\n\n## License\n\nAll packages are licensed under the Eclipse Public License v. 2.0. You find a copy of the License [here](./LICENSE.md).\n\n## Publish a new version\n\n1. Run `lerna bootstrap` to install dependencies among the packages, even if a package has never been published before. Make sure you have not increased the dependency versions yet, e.g., you have a new package _newExample_ and the _oldExample_ depends on it. The _newExample_ is on version `0.0.0` (since you want to publish it as `1.0.0`) then in the _oldExample_ package.json the dependency has to be on the same version (or lower) so `\"dependencies\" { newExample: \"^0.0.0\"}}`. **Otherwise lerna will not accept linking the local _newExample_.**\n2. If `lerna bootstrap` was successful you can now bump dependency versions (if required), e.g., you could now do `\"dependencies\" { newExample: \"^1.0.0\"}}` in the _oldExample_ package.json.\n3. Run `lerna publish` to publish all the new package versions. Lerna will then ask for every changed package whether it received a patch, minor or major update. In our example, you should now select major for the _newExample_ so that it will be published as `1.0.0` version. You should log in to npm via `npm login` before doing this.\n\n## Adapting Licenses\n\nOne can use the VS Code plugin at \u003chttps://marketplace.visualstudio.com/items?itemName=angelo-breuer.license-header-manager\u003e to updating the copyright fields on top of each file.\n\n## Adopters\n\nIf you are using Eclipse Thingweb Playground within your organization, please support us by adding your logo to the [Eclipse IoT adopters list](https://iot.eclipse.org/adopters/#iot.thingweb).\nTo do so, simply open an issue at [the Eclipse Gitlab](https://gitlab.eclipse.org/eclipsefdn/it/api/eclipsefdn-project-adopters/-/issues/new?issuable_template=adopter_request) by providing the name of your organization, its logo, and a link to your organization or team.\nYou should be affiliated with that organization for the issue to be implemented.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-thingweb%2Fplayground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-thingweb%2Fplayground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-thingweb%2Fplayground/lists"}