Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Include any relevant information about the test environment (e.g. Browser or Pla

## Checklist

- [ ] The PR follows the branch and commit styles outlined in the [CONTRIBUTING](/OctoConsulting/keip-canvas/blob/main/docs/CONTRIBUTING.md) doc
- [ ] The PR follows the branch and commit styles outlined in the [CONTRIBUTING](/codice/keip-canvas/blob/main/docs/CONTRIBUTING.md) doc
- [ ] (UI changes only) Linting and formatting checks pass locally with the new changes (`npm run precommit` from the `ui` directory)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Keip Canvas

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub Pages Pipeline](https://github.com/OctoConsulting/keip-canvas/actions/workflows/deploy-canvas-webapp.yaml/badge.svg)](https://github.com/OctoConsulting/keip-canvas/actions/workflows/deploy-canvas-webapp.yaml)
[![GitHub Pages Pipeline](https://github.com/codice/keip-canvas/actions/workflows/deploy-canvas-webapp.yaml/badge.svg)](https://github.com/codice/keip-canvas/actions/workflows/deploy-canvas-webapp.yaml)

Intuitive drag and drop UI for creating deployable integration flow diagrams.

Expand All @@ -17,13 +17,13 @@ understandability of a diagram. Consequently, Keip Canvas is designed to let you

- Rapidly create data flows with
full [Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/patterns/messaging/) support
- Easily deploy diagrams to a Kubernetes cluster powered by [keip](https://github.com/OctoConsulting/keip)
- Easily deploy diagrams to a Kubernetes cluster powered by [keip](https://github.com/codice/keip)
- Focus on a flow's business logic rather than XML boilerplate
- Share and collaborate on visual models rather than verbose XML

## Usage

Keip Canvas is hosted at https://octoconsulting.github.io/keip-canvas/
Keip Canvas is hosted at https://codice.org/keip-canvas/

## Development

Expand Down
2 changes: 1 addition & 1 deletion assistant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ clean:


clean-config:
@rm ../ui/.env.development.local
@rm ../ui/.env.development.local

config-ollama:
@echo "Configuring for remote Ollama instance..."
Expand Down
4 changes: 2 additions & 2 deletions assistant/Modelfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ FROM {{BASE_MODEL}}

SYSTEM """
You are an expert in Enterprise Integration Patterns (EIP). You return integration flows as JSON using the keip-canvas
format. These integration flows will be implemented usin Spring Integration. The list of valid components is built from
format. These integration flows will be implemented using Spring Integration. The list of valid components is built from
a subset of the available Spring Integration components. You should strive to use them in a manner that will work within
the Spring Integration Framework.

Violating these rules will result in an invalid response.
START RULES
1. Respond only using the nodes-and-edges JSON structure shown in thexamples. Do not include explanatory text.
1. Respond only using the nodes-and-edges JSON structure shown in the examples. Do not include explanatory text.
2. Do not add any extraneous fields or properties to the response.
3. If you're unsure which namespace to use, fail silently and omit the node. Do NOT guess.
4. Ensure that all `nodes` are connected by `edges`—no node should be orphaned.
Expand Down
6 changes: 3 additions & 3 deletions assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ The Keip Canvas UI provides experimental support for generative AI models to aid
The `keip-assistant:32b` model is designed to help users create and modify flow diagrams through natural language interactions.

### Prerequisites
- [Ollama](https://github.com/ollama/ollama) installed on your system
- [Ollama](https://github.com/ollama/ollama) installed on your system (`v0.9+`)
- The Modelfile and Makefile from this repository

### Install Ollama
Install [Ollama](https://github.com/ollama/ollama?tab=readme-ov-file#ollama) following the instructions for your platform.
- To allow the Canvas UI to access the local Ollama server, add the following web origin:
```shell
OLLAMA_ORIGINS="https://octoconsulting.github.io"
OLLAMA_ORIGINS="https://codice.org"
```
[See here](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server) for
details on configuring the Ollama server.
Expand All @@ -42,7 +42,7 @@ make status
```

### Navigate to Keip Canvas
In a web browser, navigate to the [Canvas](https://octoconsulting.github.io/keip-canvas/).
In a web browser, navigate to the [Canvas](https://codice.org/keip-canvas/).
The `KeipAssistant` button should be enabled in the bottom toolbar. Click it to open a chat panel.

### Example Prompts
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pull request.

### Reporting Bugs

If you find a bug, please report it by opening a [GitHub Issue](https://github.com/OctoConsulting/keip-canvas/issues).
If you find a bug, please report it by opening a [GitHub Issue](https://github.com/codice/keip-canvas/issues).
When you do so, please include:

- A clear and descriptive title.
Expand Down
18 changes: 9 additions & 9 deletions flow-translator/flow-translator-lib/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ flowchart LR

```

The [FlowTranslator](src/main/java/com/octo/keip/flow/FlowTranslator.java) class is the entrypoint to the library's main
The [FlowTranslator](src/main/java/org/codice/keip/flow/FlowTranslator.java) class is the entrypoint to the library's main
translation functionality.
The translator provides a `toXml` method that accepts an [EIP Flow](src/main/java/com/octo/keip/flow/model/Flow.java)
The translator provides a `toXml` method that accepts an [EIP Flow](src/main/java/org/codice/keip/flow/model/Flow.java)
object (comprised of nodes and edges) and a [Writer](https://devdocs.io/openjdk~21/java.base/java/io/writer) for storing
the output.

The `Flow` object is first translated to an intermediate representation,
an [EIP Graph](src/main/java/com/octo/keip/flow/model/EipGraph.java), which is then converted to the target XML. The IR
an [EIP Graph](src/main/java/org/codice/keip/flow/model/EipGraph.java), which is then converted to the target XML. The IR
decouples the Flow from the target and exposes a more developer-friendly API for generating the target.

## Choosing a Target

To customize the generated XML, extend
the [GraphTransformer](src/main/java/com/octo/keip/flow/xml/GraphTransformer.java) base class. It is an abstract class
the [GraphTransformer](src/main/java/org/codice/keip/flow/xml/GraphTransformer.java) base class. It is an abstract class
that handles the common parts of the XML generation logic. Implementations can specify the required XML namespaces by
overriding the abstract methods, in addition to controlling
individual [EIP Node](src/main/java/com/octo/keip/flow/model/EipNode.java) transformations by providing a
custom-configured [NodeTransformerFactory](src/main/java/com/octo/keip/flow/xml/NodeTransformerFactory.java). An
individual [EIP Node](src/main/java/org/codice/keip/flow/model/EipNode.java) transformations by providing a
custom-configured [NodeTransformerFactory](src/main/java/org/codice/keip/flow/xml/NodeTransformerFactory.java). An
instance of the custom `GraphTransformer` can then be injected into the `FlowTranslator` constructor.

For an example of a `GraphTransformer` implementation, see
the [IntegrationGraphTransformer](src/main/java/com/octo/keip/flow/xml/spring/IntegrationGraphTransformer.java) which
the [IntegrationGraphTransformer](src/main/java/org/codice/keip/flow/xml/spring/IntegrationGraphTransformer.java) which
targets Spring Integration XMLs.

## The EIP Graph
Expand All @@ -49,8 +49,8 @@ As mentioned above, the graph provides an intermediate representation between th
is currently implemented using the [Guava Graphs](https://github.com/google/guava/wiki/GraphsExplained) library as it
provides a simple, well-documented API for building immutable graphs, with built-in support for common graph
algorithms (e.g. BFS, DFS). Nonetheless, all external access to the graph is through
the [EIP Graph](src/main/java/com/octo/keip/flow/model/EipGraph.java) interface (which
the [GuavaGraph](src/main/java/com/octo/keip/flow/graph/GuavaGraph.java) implements), so it should be straightforward to
the [EIP Graph](src/main/java/org/codice/keip/flow/model/EipGraph.java) interface (which
the [GuavaGraph](src/main/java/org/codice/keip/flow/graph/GuavaGraph.java) implements), so it should be straightforward to
use a different library if the need arises.

## Future Work
Expand Down
10 changes: 5 additions & 5 deletions flow-translator/flow-translator-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To use, add as a dependency in `pom.xml`:
```xml

<dependency>
<groupId>com.octo.keip</groupId>
<groupId>org.codice.keip</groupId>
<artifactId>flow-translator-lib</artifactId>
<version>0.1.0</version>
</dependency>
Expand All @@ -28,10 +28,10 @@ To use, add as a dependency in `pom.xml`:
## Usage

```java
import com.octo.keip.flow.FlowTranslator;
import com.octo.keip.flow.error.TransformationError;
import com.octo.keip.flow.xml.GraphTransformer;
import com.octo.keip.flow.xml.spring.IntegrationGraphTransformer;
import org.codice.keip.flow.FlowTranslator;
import org.codice.keip.flow.error.TransformationError;
import org.codice.keip.flow.xml.GraphTransformer;
import org.codice.keip.flow.xml.spring.IntegrationGraphTransformer;

// Specify a translation target by initializing a GraphTransformer implementation
// e.g. for Spring Integration XML:
Expand Down
4 changes: 2 additions & 2 deletions flow-translator/flow-translator-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.octo.keip</groupId>
<groupId>org.codice.keip</groupId>
<artifactId>flow-translator-lib</artifactId>
<version>0.1.0</version>

Expand Down Expand Up @@ -46,7 +46,7 @@
<!-- Adds EIP JSON schemas to classpath (under 'schemas/') -->
<!-- Used for validating the Flow model -->
<dependency>
<groupId>com.octo.keip.schemas</groupId>
<groupId>org.codice.keip.schemas</groupId>
<artifactId>validation</artifactId>
<version>0.1.0</version>
<scope>test</scope>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.octo.keip.flow;
package org.codice.keip.flow;

import com.octo.keip.flow.error.TransformationError;
import com.octo.keip.flow.graph.GuavaGraph;
import com.octo.keip.flow.model.EipGraph;
import com.octo.keip.flow.model.EipId;
import com.octo.keip.flow.model.Flow;
import com.octo.keip.flow.xml.GraphTransformer;
import com.octo.keip.flow.xml.NodeTransformer;
import org.codice.keip.flow.error.TransformationError;
import org.codice.keip.flow.graph.GuavaGraph;
import org.codice.keip.flow.model.EipGraph;
import org.codice.keip.flow.model.EipId;
import org.codice.keip.flow.model.Flow;
import org.codice.keip.flow.xml.GraphTransformer;
import org.codice.keip.flow.xml.NodeTransformer;
import java.io.Writer;
import java.util.List;
import javax.xml.transform.TransformerException;
Expand Down Expand Up @@ -38,7 +38,7 @@ public List<TransformationError> toXml(Flow flow, Writer outputXml) throws Trans
*
* @param id EipId of the target node
* @param transformer responsible for transforming the target node to an {@link
* com.octo.keip.flow.xml.XmlElement}
* org.codice.keip.flow.xml.XmlElement}
*/
public void registerNodeTransformer(EipId id, NodeTransformer transformer) {
this.graphTransformer.registerNodeTransformer(id, transformer);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.octo.keip.flow.error;
package org.codice.keip.flow.error;

public record TransformationError(String source, Exception exception) {}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.octo.keip.flow.graph;
package org.codice.keip.flow.graph;

import com.google.common.collect.Streams;
import com.google.common.graph.Graphs;
import com.google.common.graph.ImmutableValueGraph;
import com.google.common.graph.ImmutableValueGraph.Builder;
import com.google.common.graph.Traverser;
import com.google.common.graph.ValueGraphBuilder;
import com.octo.keip.flow.model.Flow;
import com.octo.keip.flow.model.FlowEdge;
import com.octo.keip.flow.model.EdgeProps;
import com.octo.keip.flow.model.EipGraph;
import com.octo.keip.flow.model.EipNode;
import org.codice.keip.flow.model.Flow;
import org.codice.keip.flow.model.FlowEdge;
import org.codice.keip.flow.model.EdgeProps;
import org.codice.keip.flow.model.EipGraph;
import org.codice.keip.flow.model.EipNode;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

public enum ConnectionType {
CONTENT_BASED_ROUTER,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

public record EdgeProps(String id, EdgeType type) {
public enum EdgeType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

import java.util.Optional;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

public record EipId(String namespace, String name) {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

import com.octo.keip.flow.model.EdgeProps.EdgeType;
import org.codice.keip.flow.model.EdgeProps.EdgeType;

public record FlowEdge(String id, String source, String target, EdgeType type) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.model;
package org.codice.keip.flow.model;

public enum Role {
CHANNEL,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.octo.keip.flow.xml;
package org.codice.keip.flow.xml;

import static javax.xml.XMLConstants.XML_NS_PREFIX;

import com.ctc.wstx.stax.WstxEventFactory;
import com.ctc.wstx.stax.WstxOutputFactory;
import com.octo.keip.flow.error.TransformationError;
import com.octo.keip.flow.model.EipGraph;
import com.octo.keip.flow.model.EipId;
import com.octo.keip.flow.model.EipNode;
import org.codice.keip.flow.error.TransformationError;
import org.codice.keip.flow.model.EipGraph;
import org.codice.keip.flow.model.EipId;
import org.codice.keip.flow.model.EipNode;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.octo.keip.flow.xml;
package org.codice.keip.flow.xml;

public record NamespaceSpec(String eipNamespace, String xmlNamespace, String schemaLocation) {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.octo.keip.flow.xml;
package org.codice.keip.flow.xml;

import com.octo.keip.flow.model.EipGraph;
import com.octo.keip.flow.model.EipNode;
import org.codice.keip.flow.model.EipGraph;
import org.codice.keip.flow.model.EipNode;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.octo.keip.flow.xml;
package org.codice.keip.flow.xml;

import com.octo.keip.flow.model.EipId;
import org.codice.keip.flow.model.EipId;
import java.util.HashMap;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.xml;
package org.codice.keip.flow.xml;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.octo.keip.flow.xml.spring;
package org.codice.keip.flow.xml.spring;

public class AttributeNames {
public static final String ID = "id";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.octo.keip.flow.xml.spring;
package org.codice.keip.flow.xml.spring;

import com.octo.keip.flow.model.EipChild;
import com.octo.keip.flow.model.EipNode;
import com.octo.keip.flow.xml.XmlElement;
import org.codice.keip.flow.model.EipChild;
import org.codice.keip.flow.model.EipNode;
import org.codice.keip.flow.xml.XmlElement;
import java.util.List;

/**
* Handles simple conversion from an {@link EipNode} to an {@link XmlElement}. No additions or
* modifications are made to the input node's attributes or children. The helper methods defined
* here are intended for use by {@link com.octo.keip.flow.xml.NodeTransformer} implementations as
* here are intended for use by {@link org.codice.keip.flow.xml.NodeTransformer} implementations as
* the first step in the transformation.
*/
public final class BaseNodeTransformation {
Expand Down
Loading