Getting Started
This page explains how to run the Clock widget locally in standalone mode against a running Octopus backend.
Prerequisites
Node.js 18+ and npm.
(Optional) An Octopus backend if you want to exercise full IANA + sunrise/sunset behavior inside the dashboard. The widget can still run without backend access (for example,
LSTclocks and basic local formatting).
Install and run the widget (standalone)
npm install
npm run dev
The dev server runs on http://localhost:5174/ by default. The local dev harness is located under dev/ and uses the widget SDK’s createMockHost. You can run it without a backend; update dev/main.tsx only if you want live backend data for location/solar queries.
Building the library bundle
To build the distributable IIFE bundle (for use in octopus-frontend):
npm run build
This produces dist/index.iife.js and type declarations in dist/.
Docs quickstart
Install docs tooling: see
docs/requirements-docs.txt.Build docs:
make docs-buildServe docs:
make docs-serve