domain
Getting started

Installation

Install the Domain0 package for TypeScript or JavaScript.

bun add domain0

The package includes its own TypeScript declarations and depends on Zod for runtime contract validation. No separate @types package is required.

First release pending

The first public release is moving through the reviewed release process. Until it reaches npm, the install commands return a package-not-found error.

Runtime support

  • Node.js 22 or newer for server code.
  • Modern browsers with fetch, Web Crypto, and native <dialog> support.
  • ESM and CommonJS package exports.
  • TypeScript and plain JavaScript from the same domain0 package.

Entry points

import { createDomain0Client, createDomain0PlatformClient, domain0 } from 'domain0'
import { ConnectionSchema, Domain0WebhookEventSchema } from 'domain0/contracts'
import { mountDomain0Connect } from 'domain0/ui'

Use the root package for the usual integration. Import domain0/contracts when you need schemas without UI code, and domain0/ui for lower-level mounting.

On this page