Monorepo for Lightfin, a lightweight, dependency-free financial charting library for the web — candlesticks, volume, indicators, drawing tools, smooth pan/zoom, and live data, rendered on HTML5 Canvas2D. The core is framework-agnostic vanilla TypeScript; framework bindings and the docs site live beside it.
Library usage is in packages/core/README.md.
A Bun workspace. Packages live under packages/:
| Package | Name | What it is |
|---|---|---|
packages/core |
@lightfin/core |
The chart library. Zero runtime dependencies. Holds the demo/ playground and the Playwright e2e/ suite. |
packages/react |
@lightfin/react |
React bindings (<LightfinChart> + hooks). react and the core are peer dependencies, so the core stays React-free. |
packages/www |
@lightfin/www |
Marketing site and documentation (Astro + Starlight). Private; not published. |
Measured in real browsers, Canvas2D was around 30% faster. Our batched Canvas2D raster work does not outweigh the cost of shader per-frame buffer upload and command submit.
bun install
bun run dev # serve the core /demo playground (app-mode Vite)
bun run www # serve the docs site
bun run build # build core and react (ESM + .d.ts) to packages/*/dist
bun run build:www # build core, react, and the docs site
bun run test # unit tests (Vitest) across packages
bun run test:e2e # browser tests against the demo (Playwright)
bun run typecheck # tsc --noEmit across packages
bun run size # check built bundles against each package's .size-limit.json
bun run size:json # rewrite packages/{core,react}/size.json for the landing page
bun run format # prettier --writeRoot scripts fan out to the workspace. Run one package with
bun run --filter <name> <script> (for example
bun run --filter @lightfin/react test). With bun run dev running,
/stress.html loads 500k candles and benchmarks paint, calc, and backfill
times.
MIT