Architecture and modules
kUML is a Gradle multi-module project. Every module is published to Maven Central under
dev.kuml (see Installation); you normally depend on a handful of them, or just
install the CLI. This page maps the modules by layer so you can find the one you need.
The pipeline
A model travels left to right through four layers:
| Layer | Role |
|---|---|
Core and metamodels |
The type-safe Kotlin DSL builds a pure-Kotlin metamodel (sealed hierarchies, no EMF in the core).
|
Layout and rendering |
A layout bridge turns a model into an engine-agnostic layout graph, an engine (ELK by default, or the pure-Kotlin grid engine) positions it, and a writer emits SVG, PNG, LaTeX/TikZ or an animated SVG. |
Transformation and I/O |
Code generators, M2M transformers, reverse engineers and import/export adapters read and write models and other formats (Java, Kotlin, SQL, XMI, ARXML, Structurizr, BPMN XML). |
Runtime and tooling |
Behaviour simulation and live execution, the CLI, Gradle plugin, IDE plugins, Desktop app, web editor, MCP server and the AI assistant sit on top. |
Core
| Module | Purpose |
|---|---|
|
Sealed Kotlin metamodel base types shared by all notations. |
|
DSL builder infrastructure and the UML and C4 builders. The SysML 2 and BPMN DSLs live with their metamodels ( |
|
Kotlin scripting host for |
|
The |
|
OCL 2.4/2.5 interpreter that evaluates constraints directly on the Kotlin model. |
|
Typed expression AST, parser and evaluator for guards, effects and parametric constraints. |
Metamodels
| Module | Purpose |
|---|---|
|
UML 2.x hierarchy, all 14 diagram types. |
|
C4 hierarchy and |
|
KerML foundation and SysML 2 on top of it, all 8 diagram types. |
|
BPMN 2.0: processes, collaborations, events, gateways, tasks, pools and lanes, with a constraint checker. |
|
Entity-relationship model for database schemas. |
|
User journey maps and service blueprints. |
Layout and rendering
| Module | Purpose |
|---|---|
|
Engine-agnostic layout contract ( |
|
Translates UML, C4, SysML 2 and BPMN models into a layout graph. |
|
Adapter for the Eclipse Layout Kernel (layered/Sugiyama, the default). |
|
Pure-Kotlin grid layout engine (multiplatform; opt-in with |
|
Framework-neutral theme data (Plain, kUML, Elegant, Playful) and its Compose adapter. |
|
Compose Multiplatform rendering backend. |
|
Direct SVG writer for UML, SysML 2, C4, BPMN and blueprints. |
|
SVG to PNG via Apache Batik. |
|
LaTeX/TikZ export for UML, SysML 2, C4 and BPMN. |
|
Pure-SMIL animated SVG from execution traces, and export of animations to APNG, WebP or MP4 (the JVM distribution only; WebP and MP4 need external |
|
Browser-hosted (wasm) entry points that turn an already parsed diagram plus a layout, both as JSON from |
Import, export and I/O
| Module | Purpose |
|---|---|
|
Model persistence through kotlinx.serialization. |
|
BPMN 2.0 XML import and export (no JAXB, XXE-protected). |
|
XMI import/export through Eclipse EMF/UML2 (JVM only). |
|
AUTOSAR ARXML import and export. |
|
Structurizr DSL round-trip for C4. |
Code generation, transformation and reverse engineering
| Module | Purpose |
|---|---|
|
Plugin interface for code generators ( |
|
Kotlin, Java (POJO, records, Lombok) and SQL DDL generators. |
|
Model-to-model transformation foundation with the built-in transformers. |
|
Class diagram to Kotlin Exposed tables, UML to ERM, and BPMN to UML activity. |
|
Language-agnostic reverse-engineering interface and source-file filtering. |
|
Java (JavaParser), Kotlin (compiler PSI) and SQL DDL (JSqlParser) reverse engines. |
Profiles
| Module | Purpose |
|---|---|
|
Profile SPI and stereotype application. |
|
The built-in UML profiles. See Profiles. |
|
Mapping profiles used by the ERM and Exposed generators. |
Behaviour runtime
| Module | Purpose |
|---|---|
|
State-machine and activity runtime with snapshot/restore and migration policies. |
|
Token-flow engine shared by UML activities, SysML 2 ACT and BPMN processes. |
|
Trace replay and OTLP-JSON export. |
|
Sandbox guarantees for guards and effects (time limits, validation). |
|
Blockchain adapters; see Chain Adapters. |
Documentation and workspaces
| Module | Purpose |
|---|---|
|
Pre-renderers for Markdown and AsciiDoc/Antora (see Markdown and AsciiDoc & Antora). |
|
Open Knowledge Format workspaces (see Knowledge Workspaces). |
|
Shared scaffolding engine behind |
Plugins
| Module | Purpose |
|---|---|
|
The plugin API: one core module plus one per plugin category. |
|
Discovery, Ed25519 signature verification and permission handling for plugin JARs. |
|
Example plugins (themes, renderers, generators and reverse engines) used as templates. |
AI
| Module | Purpose |
|---|---|
|
Koog-based multi-LLM agent, API-key vault, audit log and multi-agent orchestration. |
|
The DSL exposed as Koog tool sets, including the MCP bridge. |
|
|
|
LLM backend abstraction, provider backends and the accuracy benchmark. |
|
MCP server over stdio: 6 authoring tools and 5 behaviour-runtime tools. |
Applications and integrations
| Module | Purpose |
|---|---|
|
The command-line interface (see CLI). |
|
Browser editor served by |
|
Compose Desktop editor with live preview, workspaces, plugin manager and AI panel. |
|
Executable behaviour widget for Compose Multiplatform. |
|
Gradle plugin with |
|
JetBrains IDE plugin: annotator, quick fixes, live preview, structure view. |
|
Editor-agnostic completion and diagnostics, and the LSP server used by the IDE plugin and the separate VS Code extension. |
|
jpackage installers (DMG, MSI, DEB, RPM), Docker image and jlink runtime bundles. |
|
Child JVM that runs style checks in isolation. |
Build and test support
kuml-detekt-rules holds the project’s own static-analysis rules, kuml-examples the runnable
examples, and kuml-tests/* the cross-module test suites (DSL, renderer snapshots, codegen, CLI
end-to-end, MCP, OCL, LLM and the vault-examples smoke tests that render every documented example).