Skip to content

Graph Studio: generate a starter project based on the workflow dsl and project metadata #960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks
Tracked by #180
robocanic opened this issue May 24, 2025 · 2 comments
Open
3 tasks
Tracked by #180
Assignees
Labels
area/graph enhancement New feature or request

Comments

@robocanic
Copy link
Collaborator

robocanic commented May 24, 2025

Feature backstory

In order to make it more convenient for developers to start their Spring AI Alibaba Graph journey, we are building a initializer to generate a starter project like Spring Initializr

How to make it

We are building the intializr on top of spring initializr.
There are three parts we need to take in consideration.

  1. code generate
    • Customize ProjectDescription, ProjectRequest, ProjectRequestToDescriptionConverter to make it compatible to graph project.
    • Import DSL and turn into into custom data structure.
    • Render the predefined template based on node(edge, state) data.
  2. dependency customize
    • Customize it in initializr.yml.
    • If you need more advanced feature, consider customize BuildCustomizer
  3. properties customize
    • Implements ApplicationPropertiesCustomizer

TODO Tasks

  • Render nodes from dsl into the template
  • Render edges from dsl into the template
  • ......
@robocanic robocanic changed the title WorkflowGenerator: generate a starter project based on the Workflow Model Graph Studio: generate a starter project based on the workflow dsl and project metadata May 24, 2025
@HY-love-sleep
Copy link
Contributor

@robocanic
I’ve identified two outstanding tasks in WorkflowProjectGenerator:

  • NodeSection Implementations: Add a @Component-annotated NodeSection for each NodeType, and implement the render(NodeData model) method to generate the correct Java code snippets based on the corresponding NodeData.

  • Edge Rendering: In the WorkflowProjectGenerator#renderEdgeSections(List edges) method, iterate over the edges list and emit corresponding stateGraph.addEdge(...) statements.

I’m keen to take these on and submit a PR. Could you please assign these tasks to me?

Thanks!

@robocanic
Copy link
Collaborator Author

@robocanic I’ve identified two outstanding tasks in WorkflowProjectGenerator:

  • NodeSection Implementations: Add a @Component-annotated NodeSection for each NodeType, and implement the render(NodeData model) method to generate the correct Java code snippets based on the corresponding NodeData.
  • Edge Rendering: In the WorkflowProjectGenerator#renderEdgeSections(List edges) method, iterate over the edges list and emit corresponding stateGraph.addEdge(...) statements.

I’m keen to take these on and submit a PR. Could you please assign these tasks to me?

Thanks!

Thank you for your enthusiasm. You can start working once the #961 is merged

@yuluo-yx yuluo-yx added enhancement New feature or request area/graph labels May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graph enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants