An open API service indexing awesome lists of open source software.

https://github.com/domainlang/domainlang

DomainLang DSL and LSP server
https://github.com/domainlang/domainlang

cli ddd domain-driven-design dsl langium vscode

Last synced: 3 months ago
JSON representation

DomainLang DSL and LSP server

Awesome Lists containing this project

README

          



DomainLang Logo

# A DSL for Domain Driven Design

[![CI](https://github.com/DomainLang/DomainLang/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/DomainLang/DomainLang/actions/workflows/ci-cd.yml)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DomainLang_DomainLang&metric=coverage)](https://sonarcloud.io/summary/new_code?id=DomainLang_DomainLang)[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=DomainLang_DomainLang&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=DomainLang_DomainLang)[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=DomainLang_DomainLang&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=DomainLang_DomainLang)[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DomainLang_DomainLang&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=DomainLang_DomainLang)
[![VS Marketplace](https://vsmarketplacebadges.dev/version/DomainLang.vscode-domainlang.svg)](https://marketplace.visualstudio.com/items?itemName=DomainLang.vscode-domainlang)![NPM Version](https://img.shields.io/npm/v/%40domainlang%2Flanguage?label=%40domainlang%2Flanguage)![NPM Version](https://img.shields.io/npm/v/%40domainlang%2Fcli?label=%40domainlang%2Fcli)

> [!WARNING]
> **๐Ÿšง Prerelease Software** โ€” DomainLang is in active development and has not reached v1.0 yet. The language syntax and tooling may change. We welcome feedback and contributionsโ€”see the [roadmap](https://domainlang.net/roadmap) for planned features.

A small DSL for Domain-Driven Design (DDD) architecture models, with first-class IDE support.

Use DomainLang to keep domains, bounded contexts, ownership, terminology, and context maps close to the codebase (and easy to review in pull requests).

DomainLang CLI

## Quick Start

1. Install the VS Code extension:
2. Create a `.dlang` file and start modeling
3. Read the documentation:

```dlang
Classification CoreDomain
Team SalesTeam

Domain Sales {
description: "Revenue generation and customer acquisition"
vision: "Make it easy to buy"
}

bc Orders for Sales as CoreDomain by SalesTeam {
description: "Order lifecycle and orchestration"

terminology {
term Order: "A customer's request to purchase"
}
}

ContextMap SalesLandscape {
contains Orders
}
```

## Who this is for

- Architects and tech leads who want lightweight, reviewable DDD models
- Teams doing DDD who need a shared ubiquitous language in the repo
- Developers who want IDE feedback while evolving architecture

## What you get

- A DDD-aligned language for architecture models
- VS Code support (syntax highlighting, completion, hover, go-to-definition)
- Validation to catch common modeling issues early
- Model Query SDK for analysis and automation

## Documentation

Full documentation is available at ****:

- [Getting Started](https://domainlang.net/guide/getting-started) โ€” Build your first model
- [Language Reference](https://domainlang.net/reference/language) โ€” Complete syntax and semantics
- [Quick Reference](https://domainlang.net/reference/quick-reference) โ€” Syntax cheat sheet
- [Examples](https://domainlang.net/examples/) โ€” Real-world model examples

## Build from Source

Development uses Node.js 20+ (Volta is configured).

```bash
cd dsl/domain-lang
npm install
npm run langium:generate
npm run build
npm test
```

See [dsl/domain-lang/README.md](dsl/domain-lang/README.md) for workspace commands and package layout.

## Contributing

Ideas, bug reports, and pull requests are welcome!

- ๐Ÿ’ฌ [Discussions](https://github.com/DomainLang/DomainLang/discussions) โ€” Ask questions and share ideas
- ๐Ÿ› [Issues](https://github.com/DomainLang/DomainLang/issues) โ€” Report bugs or propose features
- ๐Ÿ“– [Contributing Guide](https://domainlang.net/guide/getting-started) โ€” Get started contributing

Before submitting code, run `npm test` and `npm run lint` from `dsl/domain-lang/`.

## License

Apache 2.0 (see LICENSE)

---



thinkability

This project is sponsored by [thinkability](https://thinkability.dk)