Vela, our next-generation charting platform, is live at vela.luxalgo.com.
LuxAlgo

Production checklist

Review data providers, server-side persistence, broker wiring, CSP headers, bundle splitting, and licensing before deploying Vela Pro.

View as Markdown

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 BinanceProvider from Vela's open-source core (@luxalgo/vela), which connects directly to a public unauthenticated API from each visitor's browser. Implement a custom DataProvider backed 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 requires DepthFeed (see Quotes and market depth). Disable any feature your provider does not support by passing false for footprint, orderflowIndicators, or orderBook.
  • Configure a watchlist quote source. The Watchlist module derives quotes through the chart's providers unless you supply a dedicated QuoteSource via watchlist: { 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 surfaceDefault behaviorConfiguration seam
Workspace layout, charts, indicators, and settingsIn-memory until persist is set, then localStoragepersist and storage on VelaWorkspace
Per-symbol drawingslocalStoragesymbolDrawings: { storage }
Indicator templateslocalStorageindicatorTemplates: { storage }
Favorite indicatorslocalStorageindicatorLibrary: { favorites }
Pine code editor draftlocalStoragecodeEditor: { storage }
WatchlistslocalStoragewatchlist: { storage }
Alerts and alert historylocalStoragealerts: { backend }
Trade journallocalStoragejournal({ store })
Paper trading accountslocalStoragetrading({ 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. VelaWorkspace calls storage.set() without awaiting the returned promise. Remote adapters that must capture changes as a tab closes should send payloads with navigator.sendBeacon (or fetch with keepalive: true) inside set().
  • 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 PaperBroker for live trading. Calling trading() without a broker option uses PaperBroker, which simulates order fills in the browser at chart prices on accounts starting at 100,000 without sending orders over the network. For live execution, implement the Broker port and pass trading({ 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 the safety option on trading(). Brokers with server-enforced kill switches should also implement setKillSwitch. 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 from blob: URLs, requiring worker-src blob:. If your policy forbids blob: workers, run the engine on the main thread with pineEngine: { engine: 'inprocess' } and disable the editor with codeEditor: 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 your style-src policy must permit runtime style elements.
  • Include required API origins in connect-src. Allow your market data endpoints and storage backends in connect-src. The indicator menu also requests catalog metadata from https://app.luxalgo.com unless indicatorLibrary: { libraryUrl } points to a proxy on your origin. See Indicator menu.
  • Disable client-side webhooks unless required. Setting alerts: { webhooks: true } causes the browser to POST alert payloads directly to user-entered URLs when an alert fires. Keep webhooks disabled by default and use onFire to dispatch notifications through your backend instead.
  • Sanitize or restrict watermark markup. String values passed to watermark are 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/vela in your bundle. Resolving two copies of @luxalgo/vela ships the core library twice and prevents enableVelaPro() registrations from reaching VelaWorkspace. Run npm ls @luxalgo/vela in 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 roughly 0.8 MB for the panel, language service, and reference dataset, plus roughly 7.6 MB for Monaco when the panel opens (unminified dist/ sizes before compression). Keep bundler code splitting enabled, or exclude the feature with codeEditor: false.
  • Configure WebGL cell limits. Above maxWebglCells charts (8 by default), VelaWorkspace switches every chart in that workspace to canvas2d to stay within browser WebGL context limits (glow effects are unavailable on canvas2d). Because maxWebglCells applies per workspace instance, lower maxWebglCells or set nativeBackend: '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). Pass watermark: true to 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.md in 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.

On this page