Skip to content

Latest commit

 

History

History
239 lines (179 loc) · 16.2 KB

README.md

File metadata and controls

239 lines (179 loc) · 16.2 KB

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