candy-doc-maven-plugin
candy-doc-maven-plugin copied to clipboard

β¨ Candy Doc Maven plugin β¨
Candy Doc is a documentation generator plugin for projects built with the Domain-Driven-Design approach.
"Domain-Driven Design is an approach to software development that centers the development on programming a domain model that has a rich understanding of the processes and rules of a domain." - Martin Fowler See more

Table of Contents
-
Installation π
- With Maven
-
Usage βπ
-
DDD Annotations βοΈ
- Strategic patterns
- Tactical patterns
- Documentation generation ποΈ
- UI Manipulation πΉοΈ
-
DDD Annotations βοΈ
-
Support π
- Roadmap πΊοΈ
- References π
- Join us π
- Contributors β¨
- License
Installation π
With Maven
To run this plugin, import the following in your project pom.xml :
<dependency>
<groupId>io.candy-doc</groupId>
<artifactId>candy-doc</artifactId>
<version>${candy-doc.version}</version>
</dependency>
<plugin>
<groupId>io.candy-doc</groupId>
<artifactId>candy-doc</artifactId>
<version>${candy-doc.version}</version>
<executions>
<execution>
<goals>
<goal>ubiquitous-language</goal>
</goals>
</execution>
</executions>
<configuration>
<packagesToScan>
<packageToScan>com.foo.bar</packageToScan>
</packagesToScan>
<outputFormat>json</outputFormat>
</configuration>
</plugin>
Then, specify the configuration parameters:
-
outputFormat: The output format in which the documentation is generated.
- Output format can be either
json
oryml
.
- Output format can be either
- packagesToScan: The chosen packages to scan to generate a documentation for, as shown below :
<packagesToScan>
<packageToScan>com.foo.bar.baz</packageToScan>
<packageToScan>com.foo.qux</packageToScan>
</packagesToScan>
Usage βπ
To use the plugin, you need to annotate your project with the DDD annotations described below :
DDD Annotations βοΈ
Domain-Driven-Design concepts are identified with annotations.
Strategic patterns
Only package-info.java
files can be annotated with @BoundedContext
or @SharedKernel
. Every
other concepts must belong to a strategic pattern.
@BoundedContext(name = "", description = "")
@SharedKernel(name = "", description = "")
Nested bounded contexts or nested shared kernels are forbidden and prevented by the plugin when processing classes.
Tactical patterns
@Aggregate(name = "", description = "")
@DomainCommand(description = "")
@DomainEvent(description = "")
@ValueObject(description = "")
Documentation generation ποΈ
Once your project is correctly annotated with the DDD Annotations, use Maven to run the plugin :
mvn clean install
A JSON file will be generated in the target/candy-doc
directory. The next step is the candy-board downloading. Use the following commands :
npm i @candy-doc/cli
candy-doc build /target/candy-doc/ubiquitous-language/
Those two lines will download the Candy-doc CLI and download the Candy-doc UI called Candy-board.
Now, a candy-build
repository appeared in your root directory.
You can display your documentation by opening the index.html
file in your favorite browser.
UI Manipulation πΉοΈ
Here's some features of Candy-board. Feel free to use them at your convenience.
- Node move
- SVG export
- Focus on direct neighbors (by checking
Enable hiding neigbors
) - Node position storage
- New graph generation (by clicking
Reset graph
)
Support π
If you face any issue feel free to create an issue on the GitHub repository or to contact us on our Discord server, join us !
Roadmap πΊοΈ
To know on what the team are actually working on, you can see the different milestones here
References π
- DDD (Martin Fowler): https://martinfowler.com/tags/domain%20driven%20design.html
- DDD, en vrai pour le dΓ©veloppeur (Cyrille Martraire): https://www.youtube.com/watch?v=h3DLKrvp5V8
- Summary of a 4 days DDD Training (Thomas Ferro): https://thomasferro.medium.com/summary-of-a-four-days-ddd-training-74103a6d99a1
Join us π
If you want to get in touch with our community there is a Discord server, join us !
Contributors β¨
- Contribute to the project
Thanks goes to these wonderful people (emoji key):
Maxime Deroullers π |
Charles Tacquet π π π» π£ π¨ π‘ π€ π¬ π β οΈ |
Edouard CATTEZ π |
Tiflo π π π β π π€ π§ π¬ π¦ |
Maji π π€ π |
Pierre π π π π¦ |
FranΓ§ois Delbrayelle π |
AVernholles π π» π β οΈ π€ π π‘ π¨ π |
aginesy π π» π β οΈ π€ π π‘ π¨ π |
Antony Derache π π» π β οΈ π€ π π¨ π |
Dylan Masquelier π π» π β οΈ π€ π π¨ π |
Yugo Cartron π π» π β οΈ π€ π π¨ π |
Kevin Prevost π |
This project follows the all-contributors specification. Contributions of any kind welcome!
License
GPL-3