SketchDDD bridges the gap between domain experts and developers by providing two ways to build the same precise domain model:
| π©βπΌ Domain Experts | π¨βπ» Developers |
|---|---|
| Visual drag-and-drop builder | Text-based DSL |
| Guided wizards | Full expressiveness |
| Templates to start fast | Version control friendly |
| Plain English rules | CI/CD integration |
Both interfaces produce the same model, validated by category theory to ensure precision.
Visit app.sketchddd.dev and start building.
# Install
cargo install sketchddd
# Create a new project
sketchddd init my-domain
# Validate your model
sketchddd check my-domain.sddd
# Generate code
sketchddd codegen my-domain.sddd --target rust
# Start visual builder locally
sketchddd serveFile Extension: SketchDDD uses
.sdddfiles - short for SketchDDD. See examples/ for sample models.
context Commerce {
objects { Customer, Order, LineItem, Product, Money }
morphisms {
placedBy: Order -> Customer
items: Order -> List<LineItem>
product: LineItem -> Product
price: LineItem -> Money
}
aggregate Order {
root: Order
contains: [LineItem]
invariant: totalPrice = sum(items.price)
}
value Money {
amount: Decimal
currency: Currency
}
}
- π¨ Visual Builder - Drag-and-drop for non-technical users
- π Text DSL - Full control for developers
- β Validation - Catch errors before runtime
- π Context Maps - Model system integration
- π Code Generation - Rust, TypeScript, Kotlin, Python, Java, Clojure
- π Diagrams - Auto-generated visualizations
- π Templates - Start with common patterns
First-class editor support for .sddd files:
| Editor | Status | Features |
|---|---|---|
| VS Code | β Available | Syntax highlighting, snippets, bracket matching |
| Sublime Text | β Available | Syntax highlighting |
| Vim/Neovim | β Available | Syntax highlighting, indentation |
| Any LSP Client | β Available | Full LSP support |
The sketchddd-lsp binary provides:
- Real-time diagnostics and error reporting
- Auto-completion for keywords, types, and morphisms
- Go to definition and find references
- Hover documentation
- Document symbols and outline
- Code formatting
# Install LSP server
cargo install sketchddd-lsp
# For Neovim (add to your config)
# lua: require('lspconfig').sketchddd.setup{}See editors/ for installation instructions
DDD concepts like "aggregate" and "bounded context" are often vague. SketchDDD uses category theory to give them precise mathematical definitions:
| DDD Concept | Mathematical Definition |
|---|---|
| Bounded Context | Sketch (graph + equations + limits) |
| Aggregate | Limit cone with root |
| Value Object | Limit with structural equality |
| Context Map | Sketch morphism |
This precision enables automated validation and code generation that actually works.
We welcome contributions! See CONTRIBUTING.md for guidelines.
We're building this in the open! Join the conversation:
- Visual Builder Frontend Framework - Help us choose React, Vue, Svelte, or Solid
Licensed under either of:
at your option.