Skip to content

Candy-Doc/candy-doc-maven-plugin

Repository files navigation

CandyDoc

✨ Candy Doc Maven plugin ✨

Maven central release License Discord members

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

Candy-board sample

Table of Contents

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 or yml.
  • 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 !

Discord

Roadmap πŸ—ΊοΈ

To know on what the team are actually working on, you can see the different milestones here

References πŸ“š

Join us πŸ™‹

If you want to get in touch with our community there is a Discord server, join us !

Discord

Contributors ✨

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