Skip to content
DomainKit
Esc
navigateopen⌘Jpreview
On this page

Migrate to 0.3

Move from the 0.2 package hierarchy to the Effect-first 0.3 root and align the core and React packages.

DomainKit 0.3 made the Effect API canonical at the package root and moved Promise APIs to an explicit secondary entrypoint. It also removed provider-specific and compatibility subpaths.

Align package versions

Install matching core and React versions:

npm install domainkit@0.3.1 @domainkit/react@0.3.1 effect@rc @effect/atom-react@rc

Use the React package only when your application needs its UI surfaces. Both packages currently require Effect 4 RC versions; @domainkit/react requires React 19.

Update imports

Before 0.3 0.3
domainkit/effect domainkit
Promise APIs from domainkit domainkit/promise
domainkit/cloudflare Cloudflare namespace from domainkit or domainkit/promise
domainkit/vercel Vercel namespace from domainkit or domainkit/promise
compatibility or adapter subpaths canonical root namespaces only

Example Effect import:

import { Cloudflare, Connection, Provisioning, Verification } from "domainkit";

Example Promise import:

import { Cloudflare, Connection, Provisioning, Verification } from "domainkit/promise";

Replace handwritten transport tags

Use the constructors exported by Transport.Method for in-process connection choices:

Transport.Method.OAuth();
Transport.Method.Token({ token, parameters });

Serialized transport outcomes remain schema-backed tagged values. Decode untrusted HTTP or database input at the server boundary before passing it to React.

Use the shared React transport

@domainkit/react consumes Transport.Service from the core package. Remove duplicate application wire types and implement one complete host transport, or adapt a Promise client with Transport.layerFromAsync.

Verify the packed consumer

After updating imports:

  1. Typecheck the host against the packed domainkit and @domainkit/react artifacts.
  2. Build the host application in its production bundler.
  3. Exercise connection, plan review, apply, receipt persistence, verification, cleanup, and domain disconnect at the host boundary.
  4. Confirm the installed core and React versions are aligned.

Do not use historical ADR 0002 as the current package map; it is superseded by the Effect-first package-root decision.

Was this page helpful?