Architecture
How Vela Pro composes features, domain modules, standalone widgets, and backend ports on top of Vela's open-source core.
Vela Pro is an extension suite that registers chart types, renderer layers, panels, and scripting engines into Vela's open-source core through the core's public plugin SDK (@luxalgo/vela/plugin). Rather than forking or replacing the core, Vela Pro composes four architectural concepts on top of VelaWorkspace:
import { VelaWorkspace } from '@luxalgo/vela/workspace';
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
import { enableVelaPro } from '@luxalgo/vela-pro';
import { trading, tradingController, type Broker } from '@luxalgo/vela-pro-trading';
declare const myBroker: Broker;
enableVelaPro({
replay: { defaultSpeed: 2 },
plugins: [trading({ broker: myBroker })],
});
const workspace = new VelaWorkspace('#chart', {
layout: false,
symbol: 'BTCUSDT',
providers: { binance: () => new BinanceProvider() },
});
const account = tradingController();In this example, replay configures a built-in feature, trading() registers an opt-in module connected to your brokerage via the Broker port, tradingController() returns your application's programmatic handle to that module, and VelaWorkspace and BinanceProvider come directly from the core.
Building blocks
| Concept | Role | Examples | Configuration surface |
|---|---|---|---|
| Feature | Extends every chart or workspace shell | Footprint and TPO chart types, order-flow indicators, bar replay, Pine Script® engine and code editor, Strategy Tester, side rail, bottom dock | Options on enableVelaPro() or standalone enable* functions |
| Module | Domain panel shipped in a dedicated workspace package | Watchlist, Alerts, and Order Book (enabled by default); Trading, Journal, and Calendar (opt-in) | alerts, watchlist, and orderBook options or the plugins array on enableVelaPro() |
| Widget | Standalone UI component backing a module's panel | createWatchlist, createOrderBook, createAlertsList, createOrderTicket, createTradingPanel, createJournalPanel, createCalendar | Mounted directly into custom DOM layouts inside or outside a workspace |
| Port | Typed interface connecting a module to your backend | Broker, AlertsBackend, JournalStore, WatchlistStorage, QuoteSource, CalendarSource | Passed inside the corresponding module's options object |
In TypeScript APIs, modules use the plugin surface (plugins on enableVelaPro() and definePlugin from @luxalgo/vela-pro/plugin).
Modules communicate with one another through typed plugin APIs rather than direct package coupling, so each module operates independently and unlocks cross-module workflows when companion modules are installed. For example, installing Trading enables order placement and cancellation directly on the Order Book's DOM ladder and allows the Journal module to record fills automatically.
Each module package also exports a controller accessor (tradingController(), alertsController(), watchlistController(), journalController(), and calendarController()) for programmatic state reads and actions. Controller functions return null until enableVelaPro() has installed that module.
See Modules overview for module lifecycles, controllers, and ports, and Standalone widgets for mounting module UIs outside a workspace shell.
Composition over the plugin SDK
Vela Pro integrates with the core exclusively through @luxalgo/vela/plugin registries for chart types, renderer layers, native indicators, topbar and toolbar actions, side panels, and default scripting engines. That design has four direct consequences for your application:
- Unchanged core APIs:
VelaWorkspace,DataProvider,chart.drawings, and state serialization (getState(),applyState()) belong to the core without modification, so existing core integrations and documentation apply directly. - Shared extension registries: Your application can register custom chart types, indicators, actions, and panels into the same SDK registries alongside Vela Pro.
- Single
@luxalgo/velainstance: Vela Pro registers capabilities into the@luxalgo/velainstance it imports, andVelaWorkspacereads from the instance it was constructed from. See Installation to verify deduplication withnpm ls @luxalgo/vela. - Pre-construction registration:
VelaWorkspacereads SDK registries during construction, soenableVelaPro()(or individual enablers) must run once before creating the first workspace. See Quickstart for initialization rules.
Runtime model and service seams
All rendering, native indicators, Pine Script® execution (one Web Worker per chart by default), strategy backtesting, and module state machines execute client-side in the browser. Vela Pro includes no proprietary server component; when no external backends are supplied, state persists in localStorage and Trading runs against PaperBroker.
External services connect through either the core's DataProvider interface (plus optional order-flow and market-depth extensions) or a module's typed port:
| External service | Interface seam | Consumed by | Fallback when omitted |
|---|---|---|---|
| Market data | DataProvider | Every chart | Built-in public providers (BinanceProvider, CoinbaseProvider, HyperliquidProvider) |
| Order flow | FootprintFeed on the provider | Footprint chart type and order-flow indicators | No footprint cells rendered; order-flow indicators omitted from the indicator menu |
| Market depth | DepthFeed on the provider | Order Book module | Empty Order Book panel |
| Live quotes | QuoteSource | Watchlist module | ProviderQuotes reading from the chart's registered providers |
| Brokerage | Broker | Trading module | PaperBroker simulated paper trading account |
| Alert persistence | AlertsBackend | Alerts module | LocalAlertsBackend backed by localStorage |
| Watchlist persistence | WatchlistStorage | Watchlist module | LocalWatchlistStorage backed by localStorage |
| Journal persistence | JournalStore | Journal module | LocalJournalStore backed by localStorage |
| Economic and corporate events | CalendarSource | Calendar module | Empty Calendar panel |
| Workspace layout storage | Core storage option | VelaWorkspace | localStorage when persist is enabled |
The indicator menu is the only Vela Pro feature that queries a remote LuxAlgo endpoint by default, fetching public catalog metadata from https://app.luxalgo.com. See Indicator menu to configure proxy routing or disable remote catalog tabs.
Package overview
| Package | Contents | package.json license field |
|---|---|---|
@luxalgo/vela | Open-source core: chart engine, VelaWorkspace, public providers, and plugin SDK | Apache-2.0 |
@luxalgo/vela-ui | Open-source UI component kit used by the core shell and Vela Pro panels | Apache-2.0 |
@luxalgo/vela-pro | Vela Pro features and enableVelaPro() | SEE LICENSE IN LICENSE.md |
@luxalgo/vela-pro-alerts, -dom, -watchlist | Default domain modules (dom is the Order Book module) | SEE LICENSE IN LICENSE.md |
@luxalgo/vela-pro-trading, -journal, -calendar | Opt-in domain modules | SEE LICENSE IN LICENSE.md |
@luxalgo/vela-pinets | Pine Script® ScriptingEngine adapter registered by Vela Pro | AGPL-3.0-only |
pinets | Pine Script® transpiler and execution runtime used by @luxalgo/vela-pinets | AGPL-3.0-only |
monaco-editor | Code editor bundled inside the Pine code editor panel | MIT |
The LICENSE.md file in @luxalgo/vela-pro and each @luxalgo/vela-pro-* module references the Developer License Agreement. Application code imports from @luxalgo/vela/* subpaths for workspace and core APIs, @luxalgo/vela-pro for feature enablers and types, @luxalgo/vela-pro-<module> for module factories, controllers, widgets, and ports, and @luxalgo/vela-pro/plugin when authoring Custom modules.