DreamDBv0.2.0bec026

Installation

DreamDB ships as a single npm package for both Node.js and browser environments.

npm / pnpm / yarn

bash
npm install @dreamlake/dreamdb
bash
pnpm add @dreamlake/dreamdb
bash
yarn add @dreamlake/dreamdb

Then import the SDK in your application:

ts
import { Schema, Dataset } from "@dreamlake/dreamdb";

Browser via CDN

For quick prototypes or standalone HTML pages, load DreamDB from a CDN:

html
<script src="https://unpkg.com/@dreamlake/dreamdb"></script>

The script exposes a global DreamDB object:

html
<script>
  const space = await DreamDB.DreamDBSpace.fromUri(
    "https://s3.us-east-1.amazonaws.com/my-bucket/refs/my-dataset"
  );
  const samples = await space.samples();
  console.log(`Loaded ${samples.length} samples`);
</script>

Requirements

EnvironmentMinimum versionNotes
Node.js18+Uses the native fetch API (stable since Node 18)
BrowserAny modern browserChrome 66+, Firefox 57+, Safari 12.1+, Edge 79+
TypeScript5.0+Type declarations are bundled in the package

The only runtime dependency is a standards-compliant fetch implementation. No native add-ons or WebAssembly modules are required.

Backend setup

DreamDB stores data on any S3-compatible object store. For local development, the fastest path is MinIO:

bash
docker run -d --name dreamdb-minio \
  -p 9000:9000 -p 9001:9001 \
  -e MINIO_ROOT_USER=dreamdb \
  -e MINIO_ROOT_PASSWORD=dreamdbsecret \
  minio/minio:latest server /data --console-address ":9001"

# Create a bucket and make it publicly readable.
docker exec dreamdb-minio mc alias set local http://localhost:9000 dreamdb dreamdbsecret
docker exec dreamdb-minio mc mb local/demo
docker exec dreamdb-minio mc anonymous set public local/demo

For production, point at any S3-compatible endpoint (AWS S3, Cloudflare R2, Backblaze B2, Wasabi). Set the standard AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables and the HTTP connector auto-signs requests with SigV4.

Next steps

  • Quick Start -- a 10-minute end-to-end walkthrough with ingest, query, and time-travel.
  • TypeScript SDK Reference -- the full API surface for the @dreamlake/dreamdb package.
  • Browser Demo -- try DreamDB in the browser without installing anything.