Architecture
1. Workspace Layout
apps/
web/
admin/
examples/
order-billing/
domains/
src/
domains/
[<group>/...]
<domain>/
domain.json
client/
server/
shared/
mcp/
tests/
packages/
runtime/
ui/
infra/
config/
tooling/
crates/
core/
parser/
rules/
cli/
apps/ contains deployable product entry points owned by the repository.
examples/ contains self-contained learning and framework-verification
projects. An example must keep its own Boundra config, TypeScript config, and
domains so it can be checked through an explicit --root without treating the
framework repository itself as an application.
Domain manifests are discovered recursively below paths.domains. Optional
group directories organize the filesystem but do not become part of domain
identity; the manifest name remains the stable identity. See ADR 0011.
2. Domain Layers
client/: UI, hooks, browser-side orchestrationserver/: API handlers, business rules, data orchestrationshared/: schema, DTO, contract, pure utilitiesmcp/: AI adapter layer (tool/resource/prompt)tests/: 도메인 테스트 (unit/integration)
3. Dependency Direction
허용:
client -> sharedserver -> shareddomain -> other-domain public APIdomain -> declared dependency public API
금지:
client -> serverserver -> clientshared -> policy-denied capability(기본ui,database,runtime)domain -> other-domain internal pathdomain -> undeclared domain public API- cyclic domain dependency graphs
4. Runtime and Tooling
- 사용자 레벨: TypeScript
- 코어 엔진: Rust
- 브릿지: NAPI-RS (future candidate)
- 빌드/분석: Rust analyzer CLI first; TypeScript build integration later
- 모노레포: pnpm (초기), Nx는 선택적 도입
- 프레임워크 표면:
docs/framework-surface.md를 따른다.
5. Core Crates Responsibility
core: project config, domain manifest, shared diagnostic/domain typesparser: workspace file scanning and import extractionrules: boundary validationcli: command parsing, execution, graph output, and code generation
6. Package Responsibility
packages/runtime: pure TypeScript helper types used by generated contractspackages/ui: framework-neutral browser rendering for normalized Boundra diagnostics; published through the singleboundra/uinpm subpathpackages/config: TypeScript authoring types for the currently supported Boundra project config; published throughboundra/configwhile native config discovery remainsboundra.config.json
7. Expansion Strategy
MCP는 v3 이후 domains/<domain>/mcp에서 확장하며, 코어 로직과 분리한다.
확장 DSL은 실제 dogfooding 이후 검토한다. 코어 확장은 Lua보다 Starlark를 우선 후보로 둔다.