---
title: Migrate to 0.3
description: Move from the 0.2 package hierarchy to the Effect-first 0.3 root and align the core and React packages.
seo:
  title: Migrate DomainKit from 0.2 to 0.3
---

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:

```sh
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:

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

Example Promise import:

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

## Replace handwritten transport tags

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

```ts
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.

## Related documentation

- [Package reference](/docs/reference/packages)
- [React transport](/docs/react/transport)
- [Troubleshooting package alignment](/docs/guides/troubleshooting#installation-and-exports)
