# Production checklist (/vela-pro/reference/production)



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 [#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](/vela-pro/data/custom-source).
* **Implement extended feeds or disable dependent features.** The Footprint chart type and order-flow indicators require `FootprintFeed` (see [Footprint data](/vela-pro/data/feeds/footprints)), and the Order Book module requires `DepthFeed` (see [Quotes and market depth](/vela-pro/data/feeds/quotes-and-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](/vela-pro/modules/catalog/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](/vela-pro/modules/catalog/calendar).

## Persistence [#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](/vela-pro/persistence/overview) for details on each store and [Server-side storage](/vela-pro/persistence/backend) 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](/vela-pro/persistence/precedence) before rolling out updated default options to returning users.

## Trading [#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](/vela-pro/modules/trading/broker).
* **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](/vela-pro/modules/trading/overview).
* **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](/vela-pro/modules/catalog/alerts).

## Security [#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](/vela-pro/indicators/pine/runtime) and [Pine code editor](/vela-pro/indicators/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](/vela-pro/indicators/library).
* **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 [#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](/vela-pro/get-started/setup).
* **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](/vela/user/workspace#options-summary).

## Branding [#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](/vela-pro/customization/theme).
* **Verify attribution and license obligations.** Review when the core's in-chart mark may be hidden in the [core FAQ](/vela/user/faq#can-i-remove-the-in-chart-vela-logo), and ensure compliance with the [Developer License Agreement](https://www.luxalgo.com/licensing/) governing Vela Pro.

## Maintenance [#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](/vela-pro/reference/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](/vela-pro/customization/mobile/responsive).
* **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:

```ts
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](/vela-pro/charts/events) for the full event catalog.
