Skip to content

eclipse/editdor

alt text Discord

A tool for simply designing W3C Thing Descriptions and Thing Models

Find the ediTDor here to try it out:

https://eclipse.github.io/editdor/

About this project

This project aims to make creating W3C Thing Description (TD) instances and Thing Model (TM) easy by providing a platform-independent ediTDor tool. The following features are addressed in this project:

  • Creating a new Thing Description / Thing Model from scratch
  • Rendering a Thing Description / Thing Model
  • Editing the Thing Description / Thing Model
  • Validating the Thing Description / Thing Model
  • Exporting the Thing Description / Thing Model from the visual representation into JSON-LD
  • Reading/writing exposed properties' values exposed by a proxy (anything that can translate a protocol to HTTP)
  • Contributing the Thing Model to a third-party catalog using the Thing Model Catalog API

Technologies

  • React
  • TailwindCSS
  • Typescript

Resources

Contribution guide

Any contribution to this project is welcome. Please follow our contribution guide.

License

Prerequisites

  • Node.js, version 10+ (e.g., 10.13.0 LTS)

Build

yarn install installs all the dependencies listed within package.json

yarn build builds the project for deployment

yarn dev starts a local development server on Port 3000 (http://localhost:3000)

Development environment

In the development environment it is possible to use react scan to detect performance issues by analyzing the pop-up on the bottom right corner. The complete documentation is available here.

Using the Catalog Contribution Feature

You will need a Thing Model Catalog running somewhere. If you want to host it yourself, use the command-line interface to run one in the terminal using the following instructions:

    go install github.com/wot-oss/[email protected]
    $GOPATH/bin/tmc
    ./tmc-linux-amd64

The most use commands to test are:

    tmc serve
    tmc repo add --type file <nameOfCatalog> ~/tm-catalog

A local repository folder will be created inside the tm-catalog directory

    tmc list
    tmc repo list
    tmc repo remove <nameOfCatalog>

Send TD feature

To use the Send TD feature, it is necessary to define in the Settings pop-up the Southbound URL and Northbound URL. The Send TD feature allows you to send your Thing Description to any service following the WoT TD Directory specification. Afterwards, if the service proxies the TD, ediTDor can fetch the proxied TD containing HTTP hrefs to interact with the original Thing.

Configuration

  1. Open the Settings pop-up from the main toolbar
  2. Enter your Southbound URL in the designated field (e.g., http://localhost:8080)
  3. Click Save to store the URL

The proxy uses the TD sent to its southbound API endpoint to communicate with a Thing. This way, you can interact with a non-HTTP Thing from your ediTDor.

Automatically reading URL parameters

The ediTDor has the functionality to automatically set the following list of variables from a URL with query parameters:

  1. tmcendpoint
  2. repo
  3. northbound
  4. southbound
  5. valuePath

Query parameters tmcendpoint and repo will set the value for the TMC Catalog Endpoint and the Name of Repository, respectively, present in the Contribute to Catalog pop-up.

Example of use:

http://localhost:5173/?tmcendpoint=http://localhost:8080&repo=my-catalog

Query parameters northbound, southbound, valuePath will set the value for the Target URL Northbound, Target URL Southbound, and JSON Pointer Path, respectively, under the Settings pop-up.

The JSON Pointer Path is the path to the key on the JSON object where the value to be read or write is. This means when the ediTDor will try to read a value for a given property, the value the user will get from the response corresponds to the value of the key defined. In the case of a nested structure must be the path to the key using "/" character. For example, in a JSON like {"foo": {"bar":"somevalue"}}, where somevalue is the value according the Data Schema of the TD, you should enter /foo/bar.

Example of use:

http://localhost:5173/?northbound=http://localhost:8080&southbound=http://github.com&valuePath=/value

Implemented Features:

  • JSON Editor with JSON Schema support for TD (Autocompletion, JSON Schema Validation)
  • Add Property, Action, Event by wizard
  • Render TD to be more human-readable
  • Validate JSON Syntax and JSON Schema for TD (JSONLD and Additional Validation for nested TM will be implemented in the future)
  • Add a TM or TD via a CSV file (For now, Modbus only)
  • Configuration on Settings page includes: southbound URL, northbound URL, save location, and configuration of the path value

About

Eclipse ediTDor - A tool for simply designing W3C Thing Descriptions

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 11