Skip to main content

Introduction to pond-ts core

pond-ts (the core package) is a TypeScript-first, in-memory time-series foundation: schema-typed events, a closed algebra of composable transforms, a live-ingest mode for streaming-style updates, and JSON round-trip — all strict TS end to end, all immutable. It covers batch and streaming as peers: the same schema type and the same operator surface, with two different cost models.

It is the foundation the rest of pond builds on. Everything else is a sibling branch on top of core:

BranchWhat it adds
@pond-ts/reactHooks that bind live series into React render
@pond-ts/chartsThe visualization layer — charts that consume pond series
@pond-ts/fit · @pond-ts/financialDomain libraries (fitness, financial studies); others possible

Core knows nothing about any of them — it is the shared substrate they each build against.

What the core covers

  • The three series typesTimeSeries (batch), LiveSeries (streaming), and ValueSeries (value-keyed). The core's spine.
  • Transformsfilter, map, aggregate, rolling, smooth, reduce, alignment, reshaping, sampling, cleaning, anomaly detection. A closed algebra: a TimeSeries transform returns a TimeSeries, so you keep chaining. Walked one operator per page in the TimeSeries deep dive.
  • Live ingest — push events into a bounded in-process buffer with bounded reorder tolerance; aggregations and views update incrementally. The LiveSeries deep dive.
  • Value axis — key a series by distance / work / lap instead of time. The ValueSeries deep dive.
  • Array columns & JSON — array-valued columns and snapshot round-trip (Advanced).

What the core is not

  • Not a database. No persistence layer. Snapshots round-trip through JSON; the storage is yours.
  • Not a query engine. No SQL surface — the operators are the query surface, end-to-end typed.
  • Not a full streaming engine. LiveSeries is a bounded in-process buffer with bounded reorder tolerance — no watermarks, no exactly-once, no retraction. See Late data for the trade-offs.
  • Not a chart library. Rendering lives in the @pond-ts/charts branch; core stays render-agnostic and hands off via series.toPoints() and the chart data-adapters. (pond is a visualization platform because of that branch — not because core draws anything.)

Where to go next

  • New to the model? Start with the Mental model, then read the Concepts pages reference-style.
  • Ready to build a series? Creating series covers batch and live ingest.
  • Want exhaustive signatures? The generated API reference has every method and type.