Striffs leverage the basic premise surrounding the utility of line-wise code diffs at an architectural level, and encourage a more natural understanding of code changes through a "top-down" approach which more closely resembles the lens from which the system was designed and intended to be understood.
- Ensure
graphvizis installed on your system. - Execute
mvn clean package assembly:singleto build jar. StriffAPITest.javademonstrates how to use this library to generate striff diagrams.- If you want to avoid rendering very large diagrams, configure a hard cap (defaults to 120 components) via
StriffConfig.setMaxComponentsPerDiagram(...); diagrams over the cap will return metadata only.
- Java 17 (see
maven.compiler.source/targetinpom.xml). - Maven 3.x.
- Graphviz (
dot) installed and on PATH.
Minimal example (full examples in src/test/java/striff/test/StriffAPITest.java):
ProjectFiles oldFiles = new ProjectFiles("/path/to/original/code");
ProjectFiles newFiles = new ProjectFiles("/path/to/modified/code");
List<StriffDiagram> striffs = new StriffOperation(
oldFiles, newFiles, new StriffConfig()).result().diagrams();
writeStriffsToDisk(striffs); // outputs SVGs to /tmp/striffs- Large codebases can produce very large diagrams; cap the output with
StriffConfig.setMaxComponentsPerDiagram(...)(default is 120). - If you see performance or memory issues, reduce scope by filtering files or increasing the component cap only for smaller modules.
