@upcsoft/ddd
v0.1.8
Published
CLI tool for create template files and folders for vue according to DDD architecture
Readme
DDD Project Generator
A command-line tool to generate a Domain-Driven Design (DDD) project structure according to the principles teach the UPC(Universidad Peruana de Ciencias Aplicadas).
with predefined folders for i18n support and a docs folder for documentation
You can install it globally using npm
npm install -g @upcsoft/dddor locally with the cmd
npm install @upcsoft/dddalso you can use npx to run it without installing
npx @upcsoft/ddd init domain-name1 domain-name2 ...Usage
ddd init <domain-names...>domain-names: List of domain names to create in the project structure.--help | -h: Display help information about the command.--version: Display the version of the tool.
Example output of the folder structure after running the command ddd init sales inventory
.
├── docs <-- documentation folder
│ ├── class-diagram.puml
│ └── user-stories.md
├── LICENSE.md <-- license file
├── README.md <-- readme file
└── src
├── inventory <-- domain folder
│ ├── application
│ ├── domain
│ │ └── model
│ │ └── name.entity.js <-- example entity file
│ ├── infrastructure
│ │ └── entity.assembler.js <-- example assembler file
│ └── presentation
│ └── components
├── locales <-- i18n folder
│ ├── en.json <-- english translations
│ └── es.json <-- spanish translations
├── sales <-- domain folder
│ ├── application
│ ├── domain
│ │ └── model
│ │ └── name.entity.js
│ ├── infrastructure
│ │ └── entity.assembler.js
│ └── presentation
│ └── components
└── shared <-- shared domain folder
├── application
├── domain
│ └── model
├── infrastructure
└── presentation
└── components
└── layout.vueNote: The cmd always creates a
docsfolder with a class diagram and a user stories template, aLICENSE.mdfile, aREADME.mdfile, and asrcfolder with the domain folders and alocalesfolder withen.jsonandes.jsonfiles. Theshareddomain folder is also always created inside thesrc.
Also if you forget the domain names you can run the following command inside your src directory
ddd create-domain <domain-names...>
or
ddd cd <domain-names...>