Convert Figma logo to code with AI

i5ting logoimove

INACTIVE: Move your mouse, generate code from flow chart

3,752
343
3,752
43

Top Related Projects

🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)

5,694

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.

6,804

mxGraph is a fully client side JavaScript diagramming library

a super simple, no-nonsense diagramming library written in react that just works

10,079

JavaScript framework for visual programming

8,494

A BPMN 2.0 rendering toolkit and web modeler.

Quick Overview

iMove is a visual programming tool for creating interactive flowcharts and logic diagrams. It allows users to design, test, and deploy workflows using a drag-and-drop interface, making it easier for both developers and non-technical users to create complex logic flows and business processes.

Pros

  • Intuitive drag-and-drop interface for creating visual workflows
  • Supports integration with various programming languages and frameworks
  • Provides real-time preview and testing of workflows
  • Exportable to code, making it easy to integrate with existing projects

Cons

  • Limited documentation and examples for advanced use cases
  • May have a learning curve for users unfamiliar with visual programming concepts
  • Dependency on specific versions of React and other libraries may cause compatibility issues
  • Limited community support compared to more established tools

Code Examples

// Creating a new iMove instance
import iMove from 'imove';

const imove = new iMove({
  container: document.getElementById('imove-container'),
  data: initialWorkflowData
});
// Adding a custom node type
imove.registerNodeType('customNode', {
  render: (props) => {
    return <CustomNodeComponent {...props} />;
  },
  validate: (node) => {
    // Custom validation logic
    return true;
  }
});
// Exporting the workflow to code
const exportedCode = imove.exportToCode('javascript');
console.log(exportedCode);

Getting Started

  1. Install iMove:

    npm install imove
    
  2. Create a new iMove instance in your React component:

    import React, { useEffect, useRef } from 'react';
    import iMove from 'imove';
    
    function WorkflowEditor() {
      const containerRef = useRef(null);
    
      useEffect(() => {
        const imove = new iMove({
          container: containerRef.current,
          data: {} // Initial workflow data
        });
    
        return () => {
          imove.destroy();
        };
      }, []);
    
      return <div ref={containerRef} style={{ width: '100%', height: '600px' }} />;
    }
    
    export default WorkflowEditor;
    
  3. Start using iMove in your application to create and manage workflows visually.

Competitor Comparisons

🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)

Pros of Butterfly

  • More comprehensive documentation and examples
  • Larger community and more frequent updates
  • Supports a wider range of diagram types and customization options

Cons of Butterfly

  • Steeper learning curve due to more complex API
  • Heavier package size, which may impact load times
  • Less focus on low-code/no-code development compared to iMove

Code Comparison

Butterfly:

import { Canvas } from 'butterfly-dag';

const canvas = new Canvas({
  root: document.getElementById('dag-canvas'),
  disLinkable: true,
  linkable: true,
  draggable: true,
});

iMove:

import { Graph } from '@antv/x6';

const graph = new Graph({
  container: document.getElementById('container'),
  grid: true,
  autoResize: true,
});

Both libraries provide ways to create and manipulate diagrams, but Butterfly offers more built-in features and configuration options out of the box. iMove, on the other hand, focuses on simplicity and ease of use for creating flow-based applications.

Butterfly is better suited for complex, large-scale diagramming needs, while iMove excels in creating simpler, flow-based applications with a low-code approach. The choice between the two depends on the specific requirements of your project and the level of customization needed.

5,694

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.

Pros of X6

  • More comprehensive and feature-rich graph visualization library
  • Better documentation and examples
  • Larger community and more frequent updates

Cons of X6

  • Steeper learning curve due to its extensive API
  • Potentially heavier and slower for simpler use cases

Code Comparison

X6:

import { Graph } from '@antv/x6';

const graph = new Graph({
  container: document.getElementById('container'),
  width: 800,
  height: 600,
});

graph.addNode({
  x: 100,
  y: 100,
  width: 80,
  height: 40,
  label: 'Hello',
});

imove:

import { Graph } from '@antv/g6';

const graph = new Graph({
  container: 'container',
  width: 800,
  height: 600,
});

graph.data({
  nodes: [{ id: 'node1', x: 100, y: 100, label: 'Hello' }],
});
graph.render();

Summary

X6 offers a more robust and feature-rich solution for graph visualization, with better documentation and community support. However, it may be overkill for simpler projects. imove, while less comprehensive, might be easier to get started with for basic graph needs. The code comparison shows that X6 has a more object-oriented approach, while imove uses a data-driven model for rendering graphs.

6,804

mxGraph is a fully client side JavaScript diagramming library

Pros of mxgraph

  • More mature and widely adopted project with extensive documentation
  • Supports a broader range of diagram types and use cases
  • Offers both client-side and server-side rendering options

Cons of mxgraph

  • Steeper learning curve due to its comprehensive feature set
  • Larger file size and potentially higher resource consumption
  • Less focus on modern web technologies and frameworks

Code Comparison

mxgraph:

var graph = new mxGraph(container);
var parent = graph.getDefaultParent();
graph.getModel().beginUpdate();
try {
  var v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30);
  var v2 = graph.insertVertex(parent, null, 'World!', 200, 150, 80, 30);
  var e1 = graph.insertEdge(parent, null, '', v1, v2);
} finally {
  graph.getModel().endUpdate();
}

imove:

import { Graph } from '@antv/x6';

const graph = new Graph({
  container: document.getElementById('container'),
  width: 800,
  height: 600,
});

const source = graph.addNode({
  x: 100,
  y: 100,
  label: 'Hello',
});

const target = graph.addNode({
  x: 300,
  y: 200,
  label: 'World',
});

graph.addEdge({
  source,
  target,
});

a super simple, no-nonsense diagramming library written in react that just works

Pros of react-diagrams

  • More mature and actively maintained project with frequent updates
  • Extensive documentation and examples for easier implementation
  • Highly customizable with a flexible API for advanced use cases

Cons of react-diagrams

  • Steeper learning curve due to its complexity and extensive features
  • Larger bundle size, which may impact performance in some applications
  • Less focused on low-code/no-code workflows compared to imove

Code Comparison

react-diagrams:

import createEngine, { DiagramModel, DefaultNodeModel } from '@projectstorm/react-diagrams';

const engine = createEngine();
const model = new DiagramModel();
const node1 = new DefaultNodeModel('Node 1', 'rgb(0,192,255)');
node1.setPosition(100, 100);
model.addAll(node1);

imove:

import { Graph } from '@antv/x6';

const graph = new Graph({
  container: document.getElementById('container'),
  width: 800,
  height: 600,
});
const node = graph.addNode({ x: 100, y: 100, label: 'Node 1' });

Both libraries provide ways to create and manipulate diagram elements, but react-diagrams offers a more object-oriented approach with its engine and model system, while imove (based on AntV X6) provides a simpler API for basic diagram creation.

10,079

JavaScript framework for visual programming

Pros of Rete

  • More versatile and can be used for various types of visual programming
  • Extensive documentation and examples available
  • Larger community and more frequent updates

Cons of Rete

  • Steeper learning curve due to its flexibility
  • May require more setup and configuration for specific use cases

Code Comparison

Rete:

const numComponent = new Rete.Component('Number');
numComponent.addOutput(new Rete.Output('num', 'Number'));
numComponent.addControl(new NumControl(this.editor, 'num'));

iMove:

const node = {
  type: 'number',
  outputs: { result: 'number' },
  data: { value: 0 },
};

Key Differences

  • Rete offers a more modular approach, allowing for custom components and controls
  • iMove focuses on workflow automation and has a simpler API
  • Rete provides more granular control over node behavior and appearance
  • iMove is tailored for React applications, while Rete is framework-agnostic

Use Cases

  • Rete: Visual programming editors, node-based interfaces, complex data flow systems
  • iMove: Workflow automation, simple drag-and-drop interfaces, React-based applications

Both projects aim to provide visual programming interfaces, but Rete offers more flexibility at the cost of complexity, while iMove provides a simpler solution specifically for React-based workflow automation.

8,494

A BPMN 2.0 rendering toolkit and web modeler.

Pros of bpmn-js

  • More mature and widely adopted in the BPMN modeling community
  • Extensive documentation and examples available
  • Supports BPMN 2.0 standard out of the box

Cons of bpmn-js

  • Steeper learning curve for developers new to BPMN
  • Less flexibility for custom workflow implementations
  • Heavier library size due to comprehensive BPMN support

Code Comparison

bpmn-js:

import BpmnModeler from 'bpmn-js/lib/Modeler';

const modeler = new BpmnModeler({
  container: '#canvas',
  keyboard: { bindTo: document }
});

modeler.importXML(bpmnXML);

imove:

import { Graph } from '@antv/x6';

const graph = new Graph({
  container: document.getElementById('container'),
  width: 800,
  height: 600,
});

graph.fromJSON(data);

Summary

bpmn-js is a specialized tool for BPMN modeling, offering robust support for the BPMN 2.0 standard. It's well-documented and widely adopted but may be overkill for simpler workflow needs. imove, on the other hand, is more flexible and lightweight, making it easier to customize for specific workflow requirements. However, it lacks built-in BPMN support and may require more development effort for complex BPMN implementations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

gitter NPM version build status Test coverage PR's Welcome

INACTIVE: iMove 是一个逻辑可复用的,面向函数的,流程可视化的 JavaScript 工具库。

English | 简体中文

iMove是一个面向前端开发者的逻辑编排工具,核心解决的是复杂逻辑复用的问题。

iMove由2部分组成:画布和imove-sdk。通过本地起一个http服务运行画布,在画布上完成代码编写和节点编排,最终将流程导出dsl,放到项目中,通过imove-sdk调用执行。

特性

  • 流程可视化:上手简单,绘图方便,逻辑表达更直观,易于理解
  • **逻辑复用**:iMove 节点支持复用,单节点支持参数配置
  • 灵活可扩展:仅需写一个函数,节点可扩展,支持插件集成
  • **适用于JavaScript所有场景**:比如前端点击事件,Ajax 请求和 Node.js 后端 API等
  • 多语言编译:无语言编译出码限制(例:支持 JavaScript, Java 编译出码)

使用场景

usage

  1. 前端流程:比如点击事件,组件生命周期回调等。
  2. 后端流程:比如 Node.js 或 Serverless 领域。
  3. 前端+后端:比如前端点击事件,Ajax 请求和后端 API。

快速开始

步骤 1. 准备

下载仓库,安装并启动

$ git clone https://github.com/ykfe/imove.git
$ cd imove/example
$ npm install
$ npm start

此时浏览器会自动打开 http://localhost:8000/ ,可以看到运行效果。

步骤 2. 绘制流程图

从左侧拖动节点至中央画布,绘制流程图

flowchart

步骤 3. 配置节点

选择节点,修改节点名,编辑节点代码

flowchart-usage1

flowchart-usage2

Authors

  • qilei0529 - 飞羽「Leader」
  • SmallStoneSK - 菉竹「Core Team」
  • suanmei - 拾邑「Core Team」
  • iloveyou11 - 冷卉「Core Team」
  • i5ting - 狼叔「Core Team」

团队博客,各种原理,设计初衷,实现,思考等都在这里: https://www.yuque.com/imove/blog

See also the list of contributors who participated in this project.

贡献

  1. Fork 仓库
  2. 创建分支 (git checkout -b my-new-feature)
  3. 提交修改 (git commit -am 'Add some feature')
  4. 推送 (git push origin my-new-feature)
  5. 创建 PR

欢迎 fork 和反馈

如有建议或意见,欢迎在 github issues 区提问

协议

本仓库遵循 MIT 协议

贡献者 ✨

感谢 蚂蚁 X6 团队 提供的绘图引擎

感谢所有贡献的人 (emoji key):

本仓库遵循 all-contributors 规范,欢迎贡献!

项目 Star 数增长趋势

Stargazers over time