Production checklist
Review data providers, server-side persistence, broker wiring, CSP headers, bundle splitting, and licensing before deploying Vela Pro.
Review this checklist before deploying Vela Pro to production. Default behaviors such as localStorage persistence, browser-simulated paper trading, and public demo feeds are intended for local development and should be replaced or explicitly configured before launch.
Data
- Replace demo data providers. Documentation examples use
BinanceProviderfrom Vela's open-source core (@luxalgo/vela), which connects directly to a public unauthenticated API from each visitor's browser. Implement a customDataProviderbacked by your market data infrastructure. See Custom data providers. - Implement extended feeds or disable dependent features. The Footprint chart type and order-flow indicators require
FootprintFeed(see Footprint data), and the Order Book module requiresDepthFeed(see Quotes and market depth). Disable any feature your provider does not support by passingfalseforfootprint,orderflowIndicators, ororderBook. - Configure a watchlist quote source. The Watchlist module derives quotes through the chart's providers unless you supply a dedicated
QuoteSourceviawatchlist: { quotes }. See Watchlist. - Configure a calendar data source. Vela Pro does not bundle economic event data, so the Calendar panel renders an empty state until you pass a
CalendarSource. See Calendar.
Persistence
By default, user state is stored in browser localStorage (or kept in memory when persist is omitted), so users lose their layouts, drawings, and module data when switching devices or clearing site data. Connect server-side storage adapters for every surface you want to retain across sessions and devices:
| State surface | Default behavior | Configuration seam |
|---|---|---|
| Workspace layout, charts, indicators, and settings | In-memory until persist is set, then localStorage | persist and storage on VelaWorkspace |
| Per-symbol drawings | localStorage | symbolDrawings: { storage } |
| Indicator templates | localStorage | indicatorTemplates: { storage } |
| Favorite indicators | localStorage | indicatorLibrary: { favorites } |
| Pine code editor draft | localStorage | codeEditor: { storage } |
| Watchlists | localStorage | watchlist: { storage } |
| Alerts and alert history | localStorage | alerts: { backend } |
| Trade journal | localStorage | journal({ store }) |
| Paper trading accounts | localStorage | trading({ broker }), or paper: { persist: false } for in-memory only |
See Persistence for details on each store and Server-side storage for backend adapter patterns. Account for two runtime behaviors when implementing remote storage:
- Flush writes on page unload.
VelaWorkspacecallsstorage.set()without awaiting the returned promise. Remote adapters that must capture changes as a tab closes should send payloads withnavigator.sendBeacon(orfetchwithkeepalive: true) insideset(). - Plan for saved state precedence. Restored user state takes precedence over most constructor options. Review Configuration precedence before rolling out updated default options to returning users.
Trading
- Replace
PaperBrokerfor live trading. Callingtrading()without abrokeroption usesPaperBroker, which simulates order fills in the browser at chart prices on accounts starting at100,000without sending orders over the network. For live execution, implement theBrokerport and passtrading({ broker })so all orders, modifications, and cancellations route through your backend for execution and audit logging. See Broker integration. - Configure trading safety controls. Configure risk limits (
limits), order confirmation dialogs (askBeforePlacing), and kill-switch behavior (killSwitch) via thesafetyoption ontrading(). Brokers with server-enforced kill switches should also implementsetKillSwitch. See Trading. - Run server-side alert evaluation if offline delivery is required. Built-in alert evaluation runs inside the open browser tab. If alerts must fire while users are away, persist alert rules via
alerts: { backend }and evaluate conditions on your server. See Alerts.
Security
- Allow
blob:workers in Content-Security-Policy. Both the Pine Script® worker engine and the Pine code editor spawn Web Workers fromblob:URLs, requiringworker-src blob:. If your policy forbidsblob:workers, run the engine on the main thread withpineEngine: { engine: 'inprocess' }and disable the editor withcodeEditor: false. See Pine Script® with PineTS and Pine code editor. - Allow runtime
<style>elements. The core,@luxalgo/vela-ui, and Vela Pro inject stylesheets into the document as<style>elements from JavaScript, so yourstyle-srcpolicy must permit runtime style elements. - Include required API origins in
connect-src. Allow your market data endpoints and storage backends inconnect-src. The indicator menu also requests catalog metadata fromhttps://app.luxalgo.comunlessindicatorLibrary: { libraryUrl }points to a proxy on your origin. See Indicator menu. - Disable client-side webhooks unless required. Setting
alerts: { webhooks: true }causes the browser toPOSTalert payloads directly to user-entered URLs when an alert fires. Keepwebhooksdisabled by default and useonFireto dispatch notifications through your backend instead. - Sanitize or restrict
watermarkmarkup. String values passed towatermarkare inserted as HTML in the bottom-left corner of the chart. Pass static, trusted branding markup only and never interpolate user input.
Performance
- Deduplicate
@luxalgo/velain your bundle. Resolving two copies of@luxalgo/velaships the core library twice and preventsenableVelaPro()registrations from reachingVelaWorkspace. Runnpm ls @luxalgo/velain your application to confirm a single copy. See Installation. - Keep code splitting enabled for the Pine code editor. None of the code editor assets load until the user opens the editor panel or your code calls the
codeEditor()handle (setCode,run). When triggered, the editor arrives in two split chunks totaling roughly0.8 MBfor the panel, language service, and reference dataset, plus roughly7.6 MBfor Monaco when the panel opens (unminifieddist/sizes before compression). Keep bundler code splitting enabled, or exclude the feature withcodeEditor: false. - Configure WebGL cell limits. Above
maxWebglCellscharts (8by default),VelaWorkspaceswitches every chart in that workspace tocanvas2dto stay within browser WebGL context limits (gloweffects are unavailable oncanvas2d). BecausemaxWebglCellsapplies per workspace instance, lowermaxWebglCellsor setnativeBackend: 'canvas2d'on pages that mount multiple workspaces. See Workspace options.
Branding
- Configure chart corner attribution.
enableVelaPro()disables the core's default attribution mark (watermark: false). Passwatermark: trueto display the Vela mark, or pass a string to render custom branding. See Theming and branding. - Verify attribution and license obligations. Review when the core's in-chart mark may be hidden in the core FAQ, and ensure compliance with the Developer License Agreement governing Vela Pro.
Maintenance
- Pin release tags in your clone. Check out an explicit release tag (such as
v0.5.12) rather than tracking a branch so rebuilds never introduce unreviewed upstream changes. - Review release notes before upgrading. Check
CHANGELOG.mdin the repository and Upgrading for breaking changes and peer dependency updates before moving to a new tag. - Test responsive breakpoints on phone and tablet viewports. Mobile layout responds to the workspace container width, hiding the side rail and opening panels as overlays. Verify small-screen behavior before launch. See Responsive layout.
- Subscribe to runtime error hooks. Vela Pro logs recoverable issues to the console with a
[vela-pro]prefix and exposes event listeners you can forward to your telemetry service:
import type { Vela } from '@luxalgo/vela';
import { VelaWorkspace } from '@luxalgo/vela/workspace';
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
import { codeEditor, enableVelaPro } from '@luxalgo/vela-pro';
declare function report(area: string, detail: unknown): void;
enableVelaPro({
alerts: { onFire: (event, rule) => report('alert', { event, rule }) },
});
const workspace = new VelaWorkspace('#chart', {
layout: false,
symbol: 'BTCUSDT',
providers: { binance: () => new BinanceProvider() },
persist: true,
});
function watch(chart: Vela): void {
chart.on('indicator:error', ({ id, error }) => report('indicator', { id, error }));
chart.on('data:unresolved', ({ symbol, providers }) => report('data', { symbol, providers }));
chart.on('load:end', ({ symbol, bars }) => {
if (bars === 0) report('data', { symbol, empty: true });
});
}
for (const cell of workspace.cells()) watch(cell.chart);
workspace.on('cell:created', ({ id }) => {
const cell = workspace.cell(id);
if (cell) watch(cell.chart);
});
codeEditor(workspace)?.onDidEndRun(({ ok, error }) => {
if (!ok) report('editor', error);
});indicator:error fires when a script fails to compile or execute, data:unresolved fires when no registered provider serves a requested symbol, and load:end with bars === 0 indicates an empty bar response. onDidEndRun reports code editor execution results, and onFire reports triggered alerts. Because layout changes dynamically create new chart cells, attach listeners to existing workspace.cells() and inside cell:created. See Events and subscriptions for the full event catalog.