Docs
Get started

Install

Get access to the private Klorad packages, choose the ones your app needs, and install them on your machine and in CI.

The packages are private. Request access first. Request package access with the npm user names of the developers who need it and a line on what you are building. Until then, the sandbox runs the packages in your browser.

Getting access

Klorad (Prieston Technologies) licenses the packages to its customers and partners, and to research groups with research access. They are private packages on npm under the @klorad scope. Klorad adds the npm account of each developer your licence covers to a read only team of the @klorad organisation; nothing else is installed or configured on your side. Send the npm user names to your Klorad contact, or through the request form if you have no contact yet.

Requirements

  • Node.js 18 or newer (20 or newer for @klorad/protocols)
  • pnpm or npm
  • an npm account with access, as above

On your machine

npm login
pnpm add @klorad/api @klorad/react @klorad/engine-three three

npm login stores your credentials in your user .npmrc, and pnpm reads them from there too.

In CI

Create a granular access token on npmjs.com with read only access to the @klorad packages, store it as a secret (for example NPM_TOKEN), and add an .npmrc to the project:

//registry.npmjs.org/:_authToken=${NPM_TOKEN}

The token stays in the CI secret store; the .npmrc only refers to it.

Which packages you need

PackageYou need it whenPeer dependencies
@klorad/apiAlways. The world model (/world) and the integration layer (/integration).none
@klorad/reactYou build the interface in React.react 18.3 or 19
@klorad/engine-threeYou draw the scene in 3D. /react adds the ThreeView component.three 0.170 or newer; react and @klorad/react for /react
@klorad/engine-openlayersYou draw the scene as a 2D plan. /react adds the MapView component.ol 10; react and @klorad/react for /react
@klorad/engine-cesiumYou draw the scene on the globe, with buildings streamed as 3D Tiles.cesium 1.131 or newer, below 2
@klorad/engine-mapboxYou draw the scene on a GL map: blocks raised to their height, roads in their true width. /react adds MapboxView.mapbox-gl 3 or maplibre-gl 4 or 5, passed in by you; react and @klorad/react for /react
@klorad/accessMore than one kind of user: Worlds, entitlement, audit log.none
@klorad/notifyAlerts from rules over readings and Actions.none
@klorad/protocolsReal equipment: MQTT, signed webhooks, REST polling. Node 20 or newer.mqtt 5, only for /mqtt

Each package is ESM only and ships its own type declarations. Its runtime dependencies are the Klorad packages it names, plus 3d-tiles-renderer for @klorad/engine-three, which loads it only when a scene streams 3D Tiles. A renderer is chosen by installing it: an app that does not draw in 3D never downloads three.js.

Licence

The packages are proprietary. You may use them only under your licence agreement and within the scope it grants; the LICENSE file in each package says the same. Builds are minified; the type declarations are complete and readable, and they are what you and your agents code against.

Something wrong or unclear? Tell us.