Main Server Interface Releases¶
The ion-interface frontend is published as a versioned package so a server release can select a specific set of interface assets. The release pipeline builds the desktop and mobile bundles, creates an archive and a manifest, and uploads both to the configured publisher endpoint.
The Main Server now has an authenticated TCP manager API to list, install, activate, roll back, and remove interface releases. It continues to generate its own main page and brand/session bootstrap. Installed assets are served from /static/interface/<release>/<asset>; the generated page can select that release while retaining the existing bootstrap.
Release names and pipeline channels¶
The release identifier is derived from package.json:
| Branch | Channel | Release identifier |
|---|---|---|
master |
stable |
The package version, for example 1.25.0 |
dev |
dev |
The package version followed by -dev, for example 1.25.0-dev |
The pipeline creates these files:
ion-interface-${release}.tar.gz
ion-interface-${release}.manifest.json
The archive contains the contents of the build's dist directory under the archive root dist/. The manifest is uploaded after the archive. The pipeline pushes the corresponding Git tag only after both uploads complete. It does not publish a moving latest alias. This ordering reduces the chance that a manifest is published before its archive; the storage endpoint's atomicity, overwrite, and retention behavior are not specified here.
Release tags are versioned and must be unique. If a tag for the package version already exists, the pipeline's tag precheck fails; increment the package version before retrying that release.
For example, a stable release 1.25.0 uses tag 1.25.0 and filenames ion-interface-1.25.0.tar.gz and ion-interface-1.25.0.manifest.json. A dev release uses tag 1.25.0-dev and matching -dev filenames.
Release manifest¶
The JSON manifest is the release description and records SHA-256 hashes and byte lengths for the archive and each file in dist. Paths in files and entrypoints are relative to dist; publicPath is the intended versioned web path for the assets. The hashes provide integrity data for consumers that verify downloaded artifacts.
Here is a complete illustrative schema version 1 manifest. The example values, sizes, and hashes are placeholders and do not identify an actual build:
{
"schemaVersion": 1,
"product": "ion-interface",
"version": "1.25.0",
"release": "1.25.0",
"channel": "stable",
"commit": "0123456789abcdef0123456789abcdef01234567",
"createdAt": "2026-10-26T12:00:00.000Z",
"publicPath": "/static/interface/1.25.0/",
"archive": {
"filename": "ion-interface-1.25.0.tar.gz",
"format": "tar.gz",
"root": "dist",
"bytes": 700,
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"entrypoints": {
"desktop": {
"runtime": "assets/desktop/runtime.js",
"js": "assets/desktop/bundle.js",
"css": "assets/desktop/bundle.css"
},
"mobile": {
"runtime": "assets/mobile/runtime.js",
"js": "assets/mobile/bundle.js",
"css": "assets/mobile/bundle.css"
},
"sso": "assets/sso.js"
},
"files": [
{ "path": "assets/desktop/runtime.js", "bytes": 10, "sha256": "1111111111111111111111111111111111111111111111111111111111111111" },
{ "path": "assets/desktop/bundle.js", "bytes": 20, "sha256": "2222222222222222222222222222222222222222222222222222222222222222" },
{ "path": "assets/desktop/bundle.css", "bytes": 30, "sha256": "3333333333333333333333333333333333333333333333333333333333333333" },
{ "path": "assets/mobile/runtime.js", "bytes": 40, "sha256": "4444444444444444444444444444444444444444444444444444444444444444" },
{ "path": "assets/mobile/bundle.js", "bytes": 50, "sha256": "5555555555555555555555555555555555555555555555555555555555555555" },
{ "path": "assets/mobile/bundle.css", "bytes": 60, "sha256": "6666666666666666666666666666666666666666666666666666666666666666" },
{ "path": "assets/sso.js", "bytes": 70, "sha256": "7777777777777777777777777777777777777777777777777777777777777777" }
]
}
| Field | Meaning |
|---|---|
schemaVersion |
Manifest format version; currently 1. |
product |
Product identifier, ion-interface. |
version |
Frontend package version from package.json. |
release |
Versioned release identifier used in filenames and the versioned asset path. |
channel |
Pipeline channel: stable or dev. |
commit |
Full 40-character Git commit hash used for the build. |
createdAt |
Manifest creation time as an ISO 8601 UTC timestamp. |
publicPath |
Intended public asset path for this release, /static/interface/<release>/. |
archive.filename |
Release archive filename. |
archive.format |
Archive format, tar.gz. |
archive.root |
Top-level directory in the archive, dist. |
archive.bytes |
Archive size in bytes. |
archive.sha256 |
SHA-256 hash of the archive. |
entrypoints.desktop |
Relative runtime, JavaScript bundle, and CSS paths for desktop. |
entrypoints.mobile |
Relative runtime, JavaScript bundle, and CSS paths for mobile. |
entrypoints.sso |
Relative SSO JavaScript path. |
files |
Inventory of files from dist; each record has a relative path, byte length, and SHA-256 hash. |
The archive hash covers the packaged archive; each files hash covers the corresponding file before packaging. The manifest is a separate uploaded file and is not itself listed in files.
Publisher configuration¶
The pipeline streams each artifact as multipart/form-data with one part named file, matching ion-uploader. It does not send a raw file body. Configure the following Bitbucket repository or deployment variables:
| Variable | Required | Default / meaning |
|---|---|---|
PUBLISHER_HOSTNAME |
Yes | Hostname of the artifact upload service. |
PUBLISHER_PROTOCOL |
No | https: when omitted; supported values are https: and http: (include the colon). |
PUBLISHER_PORT |
No | Optional destination port; defaults to 443 for HTTPS and 80 for HTTP. |
PUBLISHER_PATH |
No | /upload when omitted. |
PUBLISHER_METHOD |
No | POST when omitted. |
PUBLISHER_AUTH_KEY |
Yes | HTTP header name used for upload authentication. |
PUBLISHER_AUTH_TOKEN |
Yes | Secret value sent in the authentication header. |
Set these as Bitbucket repository or workspace variables available to the pipeline. The pipeline does not declare deployment environments, so deployment-scoped variables are unavailable unless a deployment stanza is added. Mark the authentication token as secured; never place it in source control, pipeline YAML, or logs. The authentication key is an HTTP header name and does not contain the credential.
The upload request includes an auxiliary X-File-Name header, multipart Content-Type with boundary, full-body Content-Length, and the configured authentication header. The archive is sent first and the JSON manifest second. The publisher requires an HTTP 2xx response containing JSON saved-file metadata with file.originalname and file.filename equal to the sent filename and file.size equal to the local file length. HTTP 200 without that acknowledgement fails the pipeline and creates no publication receipt or Git tag. Storage overwrite behavior, atomicity and server-side checksum verification are not assumed.
For PUBLISHER_PATH=/upload?dir=interface, the current ion-uploader stores files under /srv/www/ctl/storage/interface/; Docker bind mounts may map that path to another location on the host. A representative response is:
{
"message": "File uploaded",
"file": {
"fieldname": "file",
"originalname": "ion-interface-0.3.19.tar.gz",
"encoding": "7bit",
"mimetype": "application/gzip",
"destination": "/srv/www/ctl/storage/interface",
"filename": "ion-interface-0.3.19.tar.gz",
"path": "/srv/www/ctl/storage/interface/ion-interface-0.3.19.tar.gz",
"size": 123456
}
}
message is the acknowledgement text. The Multer file object reports the multipart field name, original upload name, encoding, MIME type, destination directory, saved filename, saved path and byte size. The JSON manifest upload returns the same structure with its own filename, size and application/json MIME type.
Earlier raw-body publication could receive HTTP 200 from ion-uploader even when no file part was supplied and no file was saved. Use the multipart publisher for another run. If that earlier run already created the release tag, increment the package version rather than force-replacing the existing tag.
Pipeline receipts and deployment boundary¶
After both uploads succeed, the pipeline writes a local release/publication.json receipt for inspection. It is retained as a CI artifact and is not uploaded as part of the release package. The stable and dev channels use distinct release identifiers, filenames, tags, and publicPath values.
The Main Server fetches manifests and archives from its built-in distribution base https://ctl.scaletrade.com/storage/interface. For example, release 0.3.20 resolves to ion-interface-0.3.20.manifest.json and the archive filename validated from that manifest. The uploader also exposes catalog-listed artifact names under /interface/<filename>. The server-generated page and session/brand bootstrap remain authoritative.
Available release catalog¶
GET http://upd.scaletrade.com/interface/releases.json is public, read-only release metadata. It does not
require an upload token and responds with Cache-Control: no-store.
Example (hashes and sizes below are illustrative):
{
"schemaVersion": 1,
"product": "ion-interface",
"updatedAt": "2026-10-26T16:00:00.000Z",
"releases": [
{
"version": "0.3.19",
"release": "0.3.19",
"channel": "stable",
"commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"createdAt": "2026-10-26T15:00:00.000Z",
"publicPath": "/static/interface/0.3.19/",
"manifest": "ion-interface-0.3.19.manifest.json",
"archive": {
"filename": "ion-interface-0.3.19.tar.gz",
"bytes": 123456,
"sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
}
}
]
}
schemaVersion: catalog format, currently 1.product:ion-interface.updatedAt: last successful catalog rebuild, UTC ISO timestamp.releases: verified entries, possibly empty, sorted by buildcreatedAtdescending and release name descending for ties; this is not semver ranking.version,release,channel,commit,createdAt,publicPath: values from each frontend manifest. Stable release equals its package version; dev appends-dev. Commit is the full Git commit hash.manifest: filename relative to the interface storage directory.archive: relative filename, byte size and SHA-256 from the validated manifest.
The Main Server uses /storage/interface/releases.json on its internal distribution host for automatic discovery when that generated catalog has been deployed. A static directory does not provide discovery by itself. Installation by an explicit release identifier fetches its manifest directly and does not depend on this index. No engine compatibility is implied.
The same catalog is stored at
/srv/www/ctl/storage/interface/releases.json. The uploader rebuilds it before
listening at startup, so already uploaded releases are discovered without another
pipeline run. It rebuilds after each completed upload directly into interface,
before acknowledging the upload. Archive uploads without a manifest are not
listed yet. Invalid/partial manifests, missing archives, size/hash mismatches and
symlinks are excluded. Full archive hashes are streamed during every rebuild;
startup/upload latency therefore depends on release storage size and speed.
Rebuilds are queued inside the existing single-process PM2 deployment and written
via a same-directory temporary file and atomic rename. Keep instances: 1 and
exec_mode: fork; this does not implement multi-process or distributed locking.
Do not upload interface/releases.json directly (HTTP 400); the uploader owns it.
The read endpoint waits for pending updates. If the last rebuild failed, it returns
HTTP 503 with {"error":"Interface release catalog unavailable"}. A storage
failure during an upload produces the existing HTTP 500 upload error, even though
the uploaded artifact may already be on disk. Correct storage access and restart
the uploader to rebuild. Startup failure logs a sanitized error and does not open
the listening port. Startup logs report release/skipped counts. Deleting files
manually requires a restart to refresh the catalog.
Deploy the updated ion-uploader server.js and lib/interface-releases.js together, then restart the existing uploader service. Its first startup discovers already uploaded manifest/archive pairs; no frontend pipeline rerun or trading-engine deployment is required. The reverse proxy must forward /interface/ to the uploader, including the catalog and artifact download routes. Check with:
pm2 restart ion-uploader
curl -fsS http://upd.scaletrade.com/interface/releases.json
The supplied PM2 configuration runs one process. Multiple uploader processes or hosts sharing the same storage need a separate distributed publication design before use.
Main Server operations¶
Interface release storage and distribution endpoints are internal implementation constants. They are not exposed in TOML, environment variables or management settings. The server stores installed release directories and their .release-manifest.json metadata under static/interface, with the selection in static/interface/state.json. Downloads require HTTPS with certificate verification and do not follow redirects. There is no plain-HTTP override.
Startup checks installed manifests and file sizes, verifies the selected active release with per-file hashes, and reports malformed local state or initialization failures in state_error; a state error permits CDN fallback and does not stop trading.
Manager commands and their complete request/response formats are documented in Interface update TCP commands. Read commands are available to authenticated manager, admin, dealer, CRM manager, and CRM admin sessions. Mutations require an admin or CRM admin session with super_admin permission.
Install activates the release by default. Set activate: false to install without activating it. Activation records the previous source and release for rollback; rollback can restore a local release or CDN source. The active release and previous local release cannot be removed. Mutations are asynchronous; poll status for progress. Operation details are volatile and cleared on engine restart, while selected release state persists. One writer holds a lock on the interface release directory. Stopping the service cancels an in-progress download and joins its worker.
The list command refreshes registry data; the status command returns local state without contacting the registry or listing catalog rows. Registry errors are reported in the response and do not remove installed releases or prevent installation by an explicit release identifier. BO keeps its update entry accessible when discovery fails and permits manual version entry with installation confirmation. The /static/interface/<release>/<asset> route serves only files present in an installed release manifest, streams their contents, supports HTTP GET and HEAD, sets the asset MIME type, and uses immutable one-year caching. Missing or unlisted files return HTTP 404; other methods return HTTP 405. Interface release versions are independent of the server's license update version.
Activation verifies the target release files and selects one desktop/mobile package for all brands on this engine. Reloading a page selects the active release. Existing tabs can continue loading the old versioned URLs while that release remains installed; removing an older package may break subsequent asset requests from those tabs. Engine binary updates preserve this separate static directory.
The uploader exposes public GET and HEAD /interface/<filename> for archive and manifest filenames listed in its verified catalog. Downloads use Cache-Control: public, max-age=0, must-revalidate. Missing, unlisted or unsafe files return 404 with {"error":"Interface artifact not found"}; catalog/storage lookup failures return 503 with {"error":"Interface release catalog unavailable"}. A HEAD response has the corresponding headers without a body. These routes do not require upload credentials.
Back Office version controls¶
The Back Office footer displays separate icon-and-version controls for the Back Office application, trading server and trading terminal. The terminal control shows the version without an inline component label or source suffix. Hovering or focusing a control opens a detailed tooltip with the component purpose, current version, available update information and click action. The server tooltip includes its build date when available; the terminal tooltip identifies whether the version is installed on the server or hosted externally.
The application control opens application information and updates, the server control opens engine release management, and the terminal control opens interface release management. Keyboard users can activate these controls with Enter or Space. Version availability and existing update permissions are unchanged.