Skip to content

Package map

Use this page when deciding which package belongs in which layer.

PackageRoleInstall when
@xndrjs/domainValidator-agnostic domain coreYou want primitives, shapes, proofs, capabilities.forShape / forPrimitive, compose, or pipe
@xndrjs/domain-zodZod 4 adapterYour boundary already uses Zod or needs Zod transforms
@xndrjs/domain-valibotValibot adapterYou prefer Valibot schemas or small function-first validators
@xndrjs/domain-ajvAJV adapterYour contracts are JSON Schema or OpenAPI
@xndrjs/contentful-to-zodContentful CMA to Zod 4 codegenYou want typed field schemas from Contentful content types (flat CMA and/or delivery locale records)
@xndrjs/tasksLazy async tasks with retryYou want composable async effects in infrastructure code
@xndrjs/bench-perfPrivate benchmark CLI (apps/bench-perf)Internal monorepo performance comparisons

If you use an adapter, import domain APIs from the adapter package:

import { domain, zodToValidator } from "@xndrjs/domain-zod";

If you do not use an adapter, import from the core:

import { compose, domain, pipe } from "@xndrjs/domain";
  • @xndrjs/domain-zod expects Zod 4.
  • @xndrjs/domain-valibot expects Valibot matching the adapter major.
  • @xndrjs/domain-ajv expects AJV and ajv-formats.
  • @xndrjs/contentful-to-zod expects Zod 4 and a Contentful Management API token for live fetch (or JSON snapshots for offline codegen). Pair with @xndrjs/domain-zod when modeling generated schemas as domain kits. See Contentful to Zod.