.md

TypeScript SDK

The dcupl SDK is the in-memory query engine under dcupl: define typed models, load data from any source and query them in the browser or in Node.js, with relationships, indexing, facets and change events built in.

npm install @dcupl/core

These docs describe @dcupl/core 2.1 and @dcupl/cli 2.0. The npm packages are published under the ISC license.

How it works

1

Define models

Create typed schemas with properties, relationships, and validation rules. Models define the structure of your data and how each property is parsed, validated and indexed.

dcupl.models.set({
  key: 'Product',
  properties: [
    { key: 'name', type: 'string' },
    { key: 'price', type: 'int' },
    { key: 'category', type: 'string' },
  ]
});

Key capabilities

Data models

Typed schemas with validation rules and computed properties

Relationships

Connect models via references — products to categories, orders to users

Indexed queries

Equality filters (eq, in) use inverse indexes — no full scan, no server round-trip

Analysis functions

Facets, aggregations, groupBy, pivot tables — built-in

Real-time updates

Upsert, delete, refresh data — lists refresh and notify you on update()

TypeScript first

TypeScript types included, IntelliSense, works with any framework

Explore the SDK

The SDK docs are organized into three tracks. Start with Learn if you're new, jump to Build when you're applying dcupl to a real project, and use Reference to look up exact APIs.

Learn

Build

Reference