Extension points overview#
This page describes the supported extension points for contributors: how to add features without breaking performance, persistence, or UI modularity.
If you want step-by-step “do exactly this” guides, jump to:
At a glance#
Audience
Developers extending Cellucid: read fully.
Golden rules (avoid common architectural mistakes)#
Keep boundaries crisp
UI modules own DOM and call state/viewer APIs.
State owns typed arrays and emits events.
Viewer owns WebGL resources and render loops.
Never add per-frame DOM work
If it needs to update frequently, it belongs in the renderer or a debounced UI update.
Avoid hot-path allocations
Reuse typed arrays and scratch buffers.
Benchmark before/after for large datasets.
Think about persistence on day one
Should your feature persist in sessions?
If not, should it be explicitly excluded so users aren’t surprised?
Document edge cases and failure modes
Especially for: filters ↔ highlights ↔ multiview ↔ analysis ↔ export ↔ sessions.
Extension point categories#
2) Add an analysis mode / plot / compute operation#
When you want:
a new analysis UI mode (e.g. new “tab” in Page Analysis)
a new plot type
a new transform/statistical test
Go to:
Key files involved:
cellucid/assets/js/app/analysis/comparison-module.jscellucid/assets/js/app/analysis/ui/analysis-ui-manager.jscellucid/assets/js/app/analysis/plots/types/*cellucid/assets/js/app/analysis/compute/*
3) Add an export renderer#
When you want:
a new SVG renderer variant
a new PNG exporter option
a new file format (e.g. PDF-like vector output, if supported)
Go to:
Key files involved:
cellucid/assets/js/app/ui/modules/figure-export/figure-export-engine.jscellucid/assets/js/app/ui/modules/figure-export/renderers/*
4) Add a new data source#
When you want:
a new way to load datasets (beyond local-demo/local-user/remote/github/jupyter)
Start with:
cellucid/assets/js/data/data-source-manager.jscellucid/assets/js/data/data-source.js(contracts + validation)
Then wire it into:
cellucid/assets/js/app/main.jsand/or dataset connections UI
5) Add session persistence coverage#
When you add a feature that should persist:
implement or extend a contributor under
cellucid/assets/js/app/session/contributors/ensure you have bounds checks and dataset mismatch semantics
See:
“Should this be state, UI, or viewer?”#
Use this decision checklist:
If it is a user preference or UI selection → UI module + (maybe)
DataStatefield.If it affects which points are visible or colored →
DataState(typed arrays) + viewer update calls.If it affects how pixels are drawn (shader, buffers, per-frame loops) → rendering layer.
If it is a derived artifact (analysis result, export output) → keep it off the hot path; compute on-demand.