Platform Help

Domain Model

The Platform uses a domain-oriented structure to keep shared behavior consistent across products and frameworks without duplicating logic across applications.

At a high level:

  • Domains define shared behavior once (typed, reusable building blocks).

  • Packages adapt that behavior to a specific runtime (React, Vue, Node, tooling).

  • Applications consume packages, not domains directly.

This is how the Platform avoids “utility drift” as the number of apps grows.

What a “Domain” Means Here

A domain in this repo is a package living under domains/* that exists to capture behavioral knowledge that should not be rewritten per application.

Examples found in the codebase:

  • domains/dev-experience/axios-client@kurocado-studio/axios-domain

  • domains/qa/storybook@kurocado-studio/storybook-domain

  • domains/iam/auth0@kurocado-studio/auth-zero-domain

What an “Adapter Package” Means Here

Adapter packages live under packages/* and provide runtime-facing entry points that apps can consume directly.

Examples found in the codebase:

  • packages/dev-experience/axios-react → depends on @kurocado-studio/axios-domain

  • packages/dev-experience/axios-vue → depends on @kurocado-studio/axios-domain

  • packages/dev-experience/axios-node → depends on @kurocado-studio/axios-domain

  • packages/qa/storybook-react → depends on @kurocado-studio/storybook-domain

This confirms the core pattern: apps import adapters; adapters depend on domains.

Derived Topology

This diagram is derived from the repo structure and package dependencies. It shows two complete domain→adapter flows (Axios + Storybook) and one evolving area (Auth0) where the adapter currently does not consume the domain.

apps/* (Product surfaces)
packages/* (Runtime adapters)
domains/* (Behavioral knowledge)
currently not wired to domain
(no dependency found)
FormKit (apps/*)
SystemHaus (apps/*)
StyleBook (apps/*)
@kurocado-studio/axios-react
(packages/dev-experience/axios-react)
@kurocado-studio/axios-vue
(packages/dev-experience/axios-vue)
@kurocado-studio/axios-node
(packages/dev-experience/axios-node)
@kurocado-studio/storybook-react
(packages/qa/storybook-react)
@kurocado-studio/auth-zero-react
(packages/iam/authO-react)
@kurocado-studio/axios-domain
(domains/dev-experience/axios-client)
@kurocado-studio/storybook-domain
(domains/qa/storybook)
@kurocado-studio/auth-zero-domain
(domains/iam/auth0)

What This Architecture Optimizes For

Consistency without coupling

When the “domain” is the single source of truth for a behavior (Axios rules, Storybook config primitives), adapters can evolve per runtime without re-implementing the rules.

Framework scalability

React and Vue can share the same behavior without copy/paste divergence. This is especially important when products span multiple frameworks.

Controlled complexity

Complexity is allowed to exist, but it is forced into well-defined layers:

  • Domains: what the system means

  • Packages: how the system is used

  • Apps: what the product does

Last modified: 18 December 2025