Getting Started
Installation
Prerequisites
Node.js version 18 or higher
An IDE you're comfortable with (same as your actual project)
Install the CLI globally using your package manager:
npm i -g @ddd-tool/domain-designer-clipnpm i -g @ddd-tool/domain-designer-cli# Not supported - I don't like yarnbun i -g @ddd-tool/domain-designer-cliAfter installation, run the following command to verify:
domain-designer-cliRepo Addr: https://github.com/ddd-tool/domain-designer-cli-node.git
Script Version: [version number]
Usage: domain-designer-cli [options] [command]
...
...Initialize Workspace
A workspace is a folder dedicated to storing design tool files. For example, if your actual project is called ProjectName, create an empty docs folder for design and run:
cd ProjectName/docs
domain-designer-cli initFor Linux / macOS users, also run:
chmod +x *.shFile Structure
Assuming the project name is ProjectName and the workspace is the docs directory, the workspace file structure is as follows:
ProjectName
├─ docs // Workspace
│ ├─ .output // Code generation output directory, only created after running GenCode script
│ │ ├─ esm
│ │ │ └─ example.mjs
│ │ ├─ csharp
│ │ │ └─ ...
│ │ ├─ go
│ │ │ └─ ...
│ │ ├─ java
│ │ │ └─ ...
│ │ ├─ kotlin
│ │ │ └─ ...
│ │ └─ ts
│ │ └─ ...
│ ├─ node_modules // Only contains helper .d.ts files for IDE hints, safe for version control
│ │ ├─ @ddd-tool
│ │ │ └─ ...
│ │ └─ version.txt
│ ├─ .gitignore // Default git ignore configuration
│ ├─ example.ts // A sample module
│ ├─ GenCode.(bat|sh) // Code generation script
│ └─ RunWeb.(bat|sh) // Web server script
└─ ...Run Web Server
Run the RunWeb script in your workspace and wait for dependencies to install.
Open the URL printed in the console with your browser. (Default:
http://127.0.0.1:5173/, auto-increments if port is occupied)For changes within ts files, refresh the page to see effects. For adding/removing ts files, restart the RunWeb script.