Backend integration
Persisted-state pages explain what users can restore. Backend-integration pages explain how an adapter moves that state to durable storage.
Choose the integration boundary
| Product requirement | Integration | Start here |
|---|---|---|
| Restore chart workspace layouts, drawings, templates, user settings, or replay progress | ChartStorageAdapter | Chart storage |
| Restore the outer arrangement of charts, order tickets, watchlists, and other panels | WidgetLayoutStorageAdapter | Widget layout storage |
These boundaries remain independent even when they use the same authenticated backend. A chart workspace layout describes chart content. A widget panel arrangement describes the product surface around the charts. Give them separate records, identities, and deletion lifecycles.
Know who owns each decision
| Owner | Responsibility |
|---|---|
| TradeScript | Captures and reapplies the documented public state objects |
| Storage adapter | Translates public storage operations to local, REST, or custom transport calls |
| Your backend | Authenticates, authorizes, isolates tenants, resolves concurrency, and retains durable data |
Choose one adapter authority for each operation. Feature settings may hide a supported control, but they do not add adapter methods or backend permission.
Next steps
- Chart storage — choose local browser storage, the built-in chart REST contract including replay state, or a custom
ChartStorageAdapterfor different routes, transports, or pushed drawing subscriptions. - Widget layout storage — load, save, and delete a widget panel arrangement independently from chart content.
- Test chart storage — prove chart-storage identity, isolation, failures, and teardown.