Config Authoring
Boundra exposes the currently supported configuration contract through the
boundra/config npm subpath.
import { defineConfig, type BoundraConfig } from "boundra/config";
const config = defineConfig({
paths: {
apps: "apps",
domains: "domains",
packages: "packages",
crates: "crates",
},
checkBoundaries: {
capabilities: {
external: {
react: ["ui"],
"@prisma/client": ["database"],
"node:*": ["runtime"],
},
packages: {
ui: ["ui"],
db: ["database"],
infra: ["runtime"],
},
apps: ["runtime"],
},
policy: {
shared: {
denyCapabilities: ["ui", "database", "runtime"],
},
},
},
});
const typedConfig: BoundraConfig = config;
defineConfig() is intentionally an identity helper. It preserves literal
inference and checks the object against the public TypeScript contract, while
the native CLI remains responsible for filesystem-aware validation such as
relative paths, domain-root existence, public API paths, and capability matcher
rules.
Canonical Config File
The native CLI continues to discover only:
boundra.config.json
boundra.config.ts is not a supported project entry point in this slice. Boundra
does not make the Rust CLI execute JavaScript or TypeScript merely to load
configuration, because that would make native CLI behavior depend on an
additional runtime.
The boundra/config surface is intended for framework adapters, editor tooling,
config generators, tests, and other TypeScript code that needs to construct or
share a Boundra configuration value without duplicating the schema.
Supported TypeScript Fields
The public type surface mirrors the fields currently consumed by the Rust project model:
project.workspaceRootpaths.appspaths.domainspaths.packagespaths.cratesdomain.manifestFiledomain.publicApi.clientdomain.publicApi.serverdomain.publicApi.sharedcheckBoundaries.includeExtensionscheckBoundaries.ignorecheckBoundaries.capabilities.externalcheckBoundaries.capabilities.packagescheckBoundaries.capabilities.appscheckBoundaries.policy.shared.denyCapabilities
Planned config fields are deliberately excluded from BoundraConfig until the
CLI consumes them. This prevents TypeScript from accepting configuration that
Boundra would silently ignore.
See docs/config-spec.md for defaults and native validation rules.