Skip to content

Development

Requirements: Docker, JDK 17, Node is downloaded by the build.

Terminal window
./gradlew build # module (.modl), Java unit tests, Jest tests
cd web && npm test # Jest only
ops/setup.sh # fresh dev stack, fully unattended (gateway :9188, PostgreSQL :5437)
ops/deploy.sh # rebuild and reload into the running gateway
ops/e2e.sh # redeploy and run the Playwright suite
ops/e2e.sh --fresh # what CI runs: fresh stack, then the suite

ops/setup.sh signs the module with a local dev certificate, accepts it and the EULA without the wizard, seeds the dev config (file secret provider, PostgreSQL connection, Core historian, alarm journal, configurations default, restricted and timescale) and starts the sample project, which creates demo users, tags and 30 days of history, and a few notes through system.historian.storeAnnotations. The demo's analog tags store a value a minute, the rate of the history it backfills, so a bar's sum of stored values is the same kind of number for the hour still running as for the hours before it.

The stack also runs the Mustry TimescaleDB historian (provider Timescale, in the PostgreSQL container, which has the TimescaleDB extension) when its checkout sits next to this one (../timescaledb-historian-module, or set TSDB_MODULE_DIR). Setup stages its unsigned build (built once if missing; TSDB_REBUILD=1 builds it again) and the sample project fills [default]PowerChartTimescale with history and notes on it, for the /timescale page and the timescale configuration. Without the checkout the stack runs on the Core historian only. Demo users: alice (Operator), bob (Engineer), carol (Engineer, Lead), password Trend-Demo-2026; gateway admin admin / password.

The sample project hides Perspective's app bar toggle (session property appBar.togglePosition set to hidden): it floats over the bottom right of the page and covered buttons on a phone. In a project of your own that keeps it, the component lifts its editors' buttons and the last rows of its lists clear of it (and of the device's safe area).

The sample project's pages on the local dev stack that ops/setup.sh starts (port 9188 on your own machine, not a public site): http://localhost:9188/data/perspective/client/powerchart/trends (Core historian, with the bound pens Lab pH, Lab turbidity and Batch yield), /timescale (TimescaleDB historian), /dashboard (clean charts), /overview, /restricted, /batches, /sync (synchronised charts), /twocharts (two charts with one urlKey); for the end-to-end tests /limited (a chart bound to a Time Range longer than it allows), /ownrange, /pinned (a tile beside a saved chart's page), /switch (a chart whose configuration two buttons switch), /pair (two editable charts, each with its own urlKey, on one saved chart's page), /late and /longtext; and the dev gateway's PowerChart Ultra page at http://localhost:9188/app/services/powerchart-ultra.


Copied from the section "Development" of the README when the site is built. Source: README.md.