Skip to content

Architecture ​

Workspace ownership and dependency direction for contributors; public package usage belongs in the Embed Coral pages.

WorkspacePackageResponsibilityDirect Coral dependencies
packages/language@coral-viz/languageCoral parsing, printing, conversion, diagnostics, and repairNone
packages/render@coral-viz/renderDeterministic text metrics, layout, SVG, HTML, and raster foundationsNone
packages/viz@coral-viz/vizReact editing components and GraphIR-to-view adaptation@coral-viz/render
packages/diagram-editor@coral-viz/diagram-editorPrivate web application, document state, PWA, AI, and voice surfaces@coral-viz/language, @coral-viz/viz, @coral-viz/render
packages/mcp-server@coral-viz/mcp-serverMCP parsing, conversion, generation, layout, and rendering tools@coral-viz/language, @coral-viz/render
packages/tree-sitter-coraltree-sitter-coralIndependently generated syntax grammar and native parser bindingNone

Core boundary ​

GraphIR is the boundary between Coral text, visualization, rendering, and automation. @graph-ir/core is an external schema and validation dependency, not a Coral workspace. Authored GraphIR is semantic state; resolved layout is revision-keyed transient geometry and does not rewrite authored intent.

Dependency direction ​

Dependencies flow from application and adapters toward language, render, and the external graph core. Language and render do not depend on the editor or on React. Viz may depend on render. The private diagram editor composes language, viz, and render. The MCP server composes graph core, language, and render.

The MCP package retains a direct ELK dependency for 0.2.x compatibility, but runtime ELK construction belongs to the additive @coral-viz/render/layout entry point.

Runtime and tooling parsers ​

The TypeScript parser in @coral-viz/language is the 0.2 runtime parser. tree-sitter-coral is independent syntax tooling and does not replace that runtime boundary.

Product assembly ​

The private editor builds the application at /coral/. VitePress builds the three documentation audience trees under /coral/docs/. Static delivery freezes both into one integrity-checked directory before creating the ZIP and checksum. Published libraries remain separate npm artifacts.