crossflow_diagram_editor

This contains a SPA React web app to create and edit a crossflow diagram and an axum router to serve it.
Embedding the Diagram Editor into a crossflow app
crossflow_diagram_editor contains an embedded version of the frontend. An axum router is provided
that can be used to serve the embedded frontend.
use ;
Standalone Diagram Editor API server
The embedded frontend can be disabled:
[]
= { = "*", = false, = ["router"] }
This will cause the router to serve only the rest API.
See the calculator demo for more examples.
WebAssembly Local Backend
If the bevy app can be compiled into a WebAssembly blob, the diagram editor can use it in place of an API server.
See crossflow_diagram_editor_wasm for more info.
Local development server
Normally the web stack is not required by using this crate as a dependency, but it is required when developing the frontend.
Requirements:
- nodejs
- pnpm
Setup
Install pnpm and nodejs:
|
Install the dependencies:
First start the dev backend server:
then in another terminal, start the frontend dev server:
When there are breaking changes in crossflow, the typescript definitions need to be regenerated:
Live Demo
We host a live demo of the diagram editor at this link. The diagram editor and workflow executor both run in the client's web browser. The node catalog includes simple math operations.
[!NOTE] Repo maintainers that want to update the web-hosted demo should run these commands: