{"id":13929802,"url":"https://github.com/ContextMapper/context-mapper-examples","last_synced_at":"2025-07-19T12:30:23.838Z","repository":{"id":39311308,"uuid":"157884019","full_name":"ContextMapper/context-mapper-examples","owner":"ContextMapper","description":"ContextMapper DSL: Examples","archived":false,"fork":false,"pushed_at":"2025-05-15T14:45:03.000Z","size":2377,"stargazers_count":216,"open_issues_count":3,"forks_count":82,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-15T15:49:35.677Z","etag":null,"topics":["contextmapper","ddd","domain-driven-design","dsl","examples"],"latest_commit_sha":null,"homepage":"https://contextmapper.org/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ContextMapper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"stefan-ka"}},"created_at":"2018-11-16T15:12:26.000Z","updated_at":"2025-05-15T14:45:06.000Z","dependencies_parsed_at":"2023-01-22T14:15:55.529Z","dependency_job_id":"1206187b-a650-47f2-b935-a0905d64302a","html_url":"https://github.com/ContextMapper/context-mapper-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ContextMapper/context-mapper-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContextMapper%2Fcontext-mapper-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContextMapper%2Fcontext-mapper-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContextMapper%2Fcontext-mapper-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContextMapper%2Fcontext-mapper-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ContextMapper","download_url":"https://codeload.github.com/ContextMapper/context-mapper-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContextMapper%2Fcontext-mapper-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265934184,"owners_count":23852086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contextmapper","ddd","domain-driven-design","dsl","examples"],"created_at":"2024-08-07T18:02:33.853Z","updated_at":"2025-07-19T12:30:23.465Z","avatar_url":"https://github.com/ContextMapper.png","language":null,"funding_links":["https://github.com/sponsors/stefan-ka"],"categories":["others","Others"],"sub_categories":[],"readme":"![Context Mapper](https://raw.githubusercontent.com/wiki/ContextMapper/context-mapper-dsl/logo/cm-logo-github-small.png)  \n# DSL Examples ![Build](https://github.com/ContextMapper/context-mapper-examples/workflows/Build/badge.svg) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ContextMapper/context-mapper-examples) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\nThis project contains example DDD Context Maps written in the ContextMapper DSL. The examples are provided for two different types of users. The simpler business analysis examples should be easy to understand for business analysts without technical background, while the detailed examples are meant for software architects and/or engineers.  \n\nFind out more about our DSL and tools on our website [https://contextmapper.org/](https://contextmapper.org/) and [papers](https://contextmapper.org/background-and-publications/) published by [OST (former HSR)](https://www.ost.ch).\n\nStart exploring the examples in the Context Mapper online IDE right now:\n\n\u003ca href=\"https://gitpod.io/#https://github.com/ContextMapper/context-mapper-examples\" style=\"padding: 10px;\"\u003e\n    \u003cimg src=\"https://gitpod.io/button/open-in-gitpod.svg\" width=\"150\" alt=\"Push\" align=\"center\"\u003e\n\u003c/a\u003e\n\n## IDE Requirements\nThis is a Gradle project and can easily be imported into any IDE (ideally VS Code or Eclipse with Context Mapper installed) that supports Gradle.\n\n### Context Mapper\nIn order to have language support for editing the CML files (Context Mapper Language), you need to install ContextMapper in Eclipse, Visual Studio Code, or use the online IDE Gitpod:\n\n * [Context Mapper for VS Code](https://marketplace.visualstudio.com/items?itemName=contextmapper.context-mapper-vscode-extension) (Marketplace)\n * [Context Mapper for Eclipse](https://marketplace.eclipse.org/content/context-mapper) (Marketplace)\n   * Alternatively use this Eclipse update site URL for manual installation: \n     \u003cbr\u003e[https://dl.bintray.com/contextmapper/context-mapping-dsl/updates/](https://dl.bintray.com/contextmapper/context-mapping-dsl/updates/)\n * [VS Code Extension in Open VSX](https://open-vsx.org/extension/contextmapper/context-mapper-vscode-extension)\n   * Can be found easily in your Gitpod's.\n   * Or: [Start right now by using our demo repository](https://contextmapper.org/demo/).\n\n## The examples:\nThe following graphical illustrations of the context maps are inspired by [Vernon][2] and [Brandolini][3]. Once you modelled your context map in CML you can [generate such graphical representations](https://contextmapper.org/docs/context-map-generator/).\n\n * [Insurance Example](#insurance-example)\n * [Lakeside Mutual](#lakeside-mutual)\n * [Context Mapper Example](#context-mapper-example)\n * [DDD Cargo Sample](#ddd-cargo-sample)\n * [Architectural Refactoring (AR) Examples](#architectural-refactoring-ar-examples)\n\n### [Insurance Example](./src/main/cml/insurance-example)\nIn the folder [src/main/cml/insurance-example](./src/main/cml/insurance-example) you find example context maps for a fictitious insurance company, inspired by [Lakeside Mutual](https://github.com/Microservice-API-Patterns/LakesideMutual).\n\n#### Context Map\nThe insurance example contains an example for a classic DDD context map written in the ContextMapper DSL (CML).\n\n\u003cimg alt=\"Insurance Company Example Context Map\" src=\"./src/main/cml/insurance-example/images/ContextMap-Illustration.png\" width=\"600px\"\u003e\n\n#### Team Map\nIt further contains a team map, illustrating the teams and their relationships. Additionally, CML allows to define which bounded contexts are implemented by which teams.\n\n\u003cimg alt=\"Insurance Company Example Context Map\" src=\"./src/main/cml/insurance-example/images/TeamMap-Illustration-1.png\"\u003e\n\n### [Lakeside Mutual](./src/main/cml/lakeside-mutual)\nThe [Lakeside Mutual](https://github.com/Microservice-API-Patterns/LakesideMutual) microservice project is another fictitious insurance application that demonstrates microservices and the application of \n[Microservice API Patterns (MAP)](https://microservice-api-patterns.org/). \n\nWe reverse engineered the initial CML model of the project by using our [discovery library](https://github.com/ContextMapper/context-map-discovery). In addition we conducted an Event Storming (tutorial coming soon) for a future \n_claim processing feature_ and modeled the results in the CML model. The model and the Event Storming result can be found in the following folder: [src/main/cml/lakeside-mutual](./src/main/cml/lakeside-mutual)\n\nThe following graphical Context Map of the model has been generated with our [Context Map generator](https://contextmapper.org/docs/context-map-generator/):\n\n\u003cimg alt=\"Lakeside Mutual Context Map\" src=\"./src/main/cml/lakeside-mutual/images/ContextMap-Illustration.png\" width=\"600px\"\u003e\n\n### [Context Mapper Example](./src/main/cml/context-mapper-example)\nIn the folder [src/main/cml/context-mapper-example](./src/main/cml/context-mapper-example) we modelled our own tool and framework with CML. The following context map illustration of our bounded contexts and framework components is generated out of the CML model with the [Context Map generator](https://contextmapper.org/docs/context-map-generator/):\n\n\u003cimg alt=\"Context Mapper Example Context Map\" src=\"./src/main/cml/context-mapper-example/images/ContextMapper-Example-Simple_ContextMap.png\" width=\"600px\"\u003e\n\n### [DDD Cargo Sample](./src/main/cml/ddd-sample)\nThe folder [src/main/cml/ddd-sample](./src/main/cml/ddd-sample) contains a context map based on the [DDD sample](https://github.com/citerus/dddsample-core) from [Eric Evans DDD book][1]. \n\nTo make the sample interesting for our context mapping language, we splitted the Cargo application into three bounded contexts.\n\n\u003cimg alt=\"Insurance Company Example Context Map\" src=\"./src/main/cml/ddd-sample/images/DDD-Cargo-Tracking-ContextMap-Illustration.png\" width=\"300px\"\u003e\n\n### [Architectural Refactoring (AR) Examples](./src/main/cml/architectural-refactorings)\nThe Context Mapper tool provides several [Architectural Refactorings][4] which can be applied to your models. A documentation of all available refactorings can be found under [https://contextmapper.org/docs/architectural-refactorings](https://contextmapper.org/docs/architectural-refactorings). The folder [src/main/cml/architectural-refactorings](./src/main/cml/architectural-refactorings) contains example CML models (input and ouput) to illustrate the architectural refactorings purposes.\n\n## Contributing\nContribution is always welcome! Here are some ways how you can contribute:\n * Create Github issues if you find bugs or just want to give suggestions for improvements.\n * This is an open source project: if you want to code, [create pull requests](https://help.github.com/articles/creating-a-pull-request/) from [forks of this repository](https://help.github.com/articles/fork-a-repo/). Please refer to a Github issue if you contribute this way.\n * If you want to contribute to our documentation and user guides on our website [https://contextmapper.org/](https://contextmapper.org/), create pull requests from forks of the corresponding page repo [https://github.com/ContextMapper/contextmapper.github.io](https://github.com/ContextMapper/contextmapper.github.io) or create issues [there](https://github.com/ContextMapper/contextmapper.github.io/issues).\n\n## Licence\nContextMapper is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\n[1]: https://www.oreilly.com/library/view/domain-driven-design-tackling/0321125215/\n[2]: https://www.amazon.de/Implementing-Domain-Driven-Design-Vaughn-Vernon/dp/0321834577\n[3]: https://www.infoq.com/articles/ddd-contextmapping\n[4]: https://link.springer.com/article/10.1007%2Fs00607-016-0520-y\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FContextMapper%2Fcontext-mapper-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FContextMapper%2Fcontext-mapper-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FContextMapper%2Fcontext-mapper-examples/lists"}