GithubHelp home page GithubHelp logo

netease / tango Goto Github PK

View Code? Open in Web Editor NEW
1.9K 39.0 151.0 6.67 MB

A source code based low-code builder. Integrate low-code experience into your local development workflow seamlessly.

Home Page: https://netease.github.io/tango-site/

License: MIT License

JavaScript 1.23% HTML 0.01% TypeScript 98.72% Less 0.03% Shell 0.02%
builder low-code lowcode netease no-code nocode site-builder web-builder website-builder

tango's Introduction

Tango LowCode Builder

A source code based low-code builder.

license NPM version

preview

English | 简体中文

📄 Documentation

You can view the detailed usage guide through the following links:

✨ Features

  • Tested in the production environment of NetEase Cloud Music, can be flexibly integrated into low-code platforms, local development tools, etc.
  • Based on source code AST, with no private DSL and protocol Real-time code generation capability, supporting source code in and source code out
  • Out-of-the-box front-end low-code designer, providing flexible and easy-to-use designer React components
  • Developed using TypeScript, providing complete type definition files

🎯 Milestone

gantt
    dateFormat  YYYY-MM-DD
    title       Tango 1.0 Milestones
    excludes    weekends
    %% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)

    section Builder Release
    1.0 Alpha  : m1, 2023-10-01, 2024-01-31
    1.0 RC     : m2, 2024-02-01, 2024-04-30
    1.0 Stable : m3, 2024-04-30, 2024-12-31

Note

Alpha versions will continue to optimize some implementation protocols and continuously integrate new features from the internal version of NetEase; RC versions will provide a stable parsing protocol and implementation; The 1.0 official version is planned to be released in Q2 2024. After the release of the 1.0 official version, we will continue to iterate on versions and gradually incorporate core capabilities such as process design, component library, and AIGC from the internal version.

🌐 Compatibility

  • Modern browsers(Chrome >= 80, Edge >= 80, last 2 safari versions, last 2 firefox versions)

💻 Development

Environment

  • Node >= 18
  • Yarn >= 1.22 && < 2

Development Quick Start

# clone the repo
git clone https://github.com/NetEase/tango.git

# enter the project root
cd tango

# install dependencies
yarn

# start the designer playground app
yarn start

💬 Community

Join NetEase Tango Community to share your ideas, suggestions, or questions and connect with other users and contributors.

🤝 Contributing

Please read the github contribution guide first。

  • Clone the repository
  • Create a branch
  • Commit and push your code
  • Open a Pull Request

💗 Acknowledgments

Thanks to the NetEase Cloud Music Front-end team, Public Technology team, Live Broadcasting Technology team, and all the developers who participated in the Tango project.

Thank you to CodeSandbox for providing the Sandpack project, which provides powerful online code execution capabilities for Tango.

📣 Product Promotion

Don't waste your time restoring the UI, try the NetEase Cloud Music "Seal D2C" development tool! Easily turn your design into code, support React, RN, Vue, WeChat apps and other multi-end scenarios, what you see is what you get!

Experience "Seal D2C" now:

📄 License

This project is licensed under the terms of the MIT license

tango's People

Contributors

adagiomin avatar boboooooo avatar ccloli avatar cwtuan avatar jiyushao avatar natumsol avatar simon-he95 avatar sq800 avatar wwsun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tango's Issues

沙箱能起来 但是报错

首先感谢网易音乐云团队的服务

image

看这像是环境变量的问题,具体怎么解决啊 大佬

项目中使用的vue3 + element-plus 组件的二次封装, 具体怎么修改成 vue3 项目,希望大佬说一下思路

本地启动失败

tango和codesanbox 必须同源。否则codesanbox iframe中的window无法再tango环境里读取,如果无法读取,左边的物料面板是加载不全的

官方文档却介绍一个放在https://local.netease.com:6006(tango) 一个放在https://local.netease.com:8443(codesanbox)

使用caddy托管后,无法使用https://local.netease.com:8443/访问,只能使用http://local.netease.com:2019/或者http://localhost:2019访问

更改了Caddyfile中的:8080为local.netease.com
使用caddy托管后,无法使用https://local.netease.com:8443/访问,只能使用http://local.netease.com:2019/或者http://localhost:2019访问,访问效果及日志如下
image

image
image
2023/11/01 09:40:12.310 INFO using adjacent Caddyfile
2023/11/01 09:40:12.312 WARN Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 3}
2023/11/01 09:40:12.324 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2023/11/01 09:40:12.326 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc0004bc100"}
2023/11/01 09:40:12.326 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 8443}
2023/11/01 09:40:12.326 WARN http.auto_https automatic HTTP->HTTPS redirects are disabled {"server_name": "srv0"}
2023/11/01 09:40:12.327 INFO http enabling HTTP/3 listener {"addr": ":8443"}
2023/11/01 09:40:12.327 INFO tls cleaning storage unit {"description": "FileStorage:/Users/01407142/Library/Application Support/Caddy"}
2023/11/01 09:40:12.328 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2023/11/01 09:40:12.328 INFO http enabling automatic TLS certificate management {"domains": ["local.netease.com"]}
2023/11/01 09:40:12.330 INFO tls finished cleaning storage units
2023/11/01 09:40:12.330 WARN tls stapling OCSP {"error": "no OCSP stapling for [local.netease.com]: no OCSP server specified in certificate", "identifiers": ["local.netease.com"]}
2023/11/01 09:40:12.333 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}
2023/11/01 09:40:12.334 INFO autosaved config (load with --resume flag) {"file": "/Users/01407142/Library/Application Support/Caddy/autosave.json"}
2023/11/01 09:40:12.334 INFO serving initial configuration

文档建设需求

  1. 架构体系设计说明
  2. 很多代码中文注释不全
  3. 低代码开发文档
  4. 二次开发扩展手册
  5. 路线图

是否可以将sandbox部署在相对路径上

目前sandbox是部署在根目录下,资源也是通过绝对路径加载的,导致部署在相对路径(比如/sandbox/)会失败。
但部署在根目录就需要有一个单独的域名。

codesandbox-client那边搜索了一下,也有相应的issue但没有提供好的解决方案,想知道这边有没有比较好的方案可以参考。

yarn start失败:digital envelope routines::unsupported

os: fedora 38
kernel: 6.5.5-200.fc38.x86_64
node: v18.18.0
code commit: 1a17ee1

$ yarn start
yarn run v1.22.19
$ yarn workspace playground start
$ umi dev
Starting the development server...

● Webpack █████████████████████████ building (10%) 1/2 modules 1 active
 babel-loader › src/.umi/umi.ts

(node:48865) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node-18 --trace-deprecation ...` to show where the warning was created)
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports.__webpack_modules__.57442.module.exports (/home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:135907:62)
    at NormalModule._initBuildHash (/home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109317:16)
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109352:10
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109223:13
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61151:11
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61017:18
    at context.callback (/home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:60895:13)
    at /home/wencan/Projects/github.com/NetEase/tango/node_modules/@umijs/deps/compiled/babel-loader/index.js:1:130029 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.18.0
Done in 2.85s.

renderXXX 写法不支持

import React from "react";
import { definePage } from "@music163/tango-boot";
import { Page, Section, Button, Input, FormilyForm } from "@music163/antd";
class App extends React.Component {
  renderX(){
    return <Button>666</Button>
  }
  render() {
    return (
      <Page title={tango.stores.app.title}>
        <Section title="Section Title">
        {this.renderX()}</Section>
        <Section>
          <Button>button</Button>
          <Input />
        </Section>
      </Page>
    );
  }
}
export default definePage(App);

把这个丢到tango里, renderX里的组件可以拖拽,到另一个地方, 但表现上是复制,而不是移动

运行sandbox是否可以用nginx替换Caddy

目前看到以下命令会构建出www的静态资源

yarn install
yarn build:deps
yarn build:sandpack

Caddy依赖的配置是以下几项

  1. https的设置
  2. local.netease.com的域名设置
  3. Origin-Agent-Cluster ?0 的 header设置

请问如果替换成nginx的话,是否只要满足以上3点就可以了?
是否还依赖Caddy的其他特性?

沙箱运行起来了 但是报错

首先感谢网易音乐云团队的付出。
image
1、看着像是环境变量的问题,请大佬指正
2、正式版咱们准备什么时候发行呢
3、项目中使用的是vue3 + element-plus 的二次封装, 怎么把项目修改成 vue3 的项目, 大佬能否说一下方案,或者应该注意的地方,愿意为社区贡献一份薄利

本地沙箱docker启动,修改了domain,无法链接

host做了修改

1、替换了:8080为local.netease.com

2、7f9beb0b21f9 docker.io/library/tango-codesandbox:latest "caddy run --config …" 3 minutes ago Up 0.0.0.0:8443->8443/tcp tango-codesandbox-7f9be

3、镜像启动日志
{"level":"info","ts":1695257316.437854,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1695257316.4388368,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":3}
{"level":"info","ts":1695257316.4394667,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1695257316.4397707,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x400009f180"}
{"level":"info","ts":1695257316.4407623,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":8443}
{"level":"warn","ts":1695257316.4407756,"logger":"http.auto_https","msg":"automatic HTTP->HTTPS redirects are disabled","server_name":"srv0"}
{"level":"info","ts":1695257316.4409783,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"}
{"level":"info","ts":1695257316.4410226,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1695257316.440989,"logger":"http","msg":"enabling HTTP/3 listener","addr":":8443"}
{"level":"info","ts":1695257316.44109,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details."}
{"level":"info","ts":1695257316.4412634,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1695257316.4412718,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["local.netease.com"]}
{"level":"info","ts":1695257316.441771,"logger":"tls.obtain","msg":"acquiring lock","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.4428742,"logger":"tls.obtain","msg":"lock acquired","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.4429135,"logger":"tls.obtain","msg":"obtaining certificate","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.4434357,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":"local.netease.com"}
{"level":"info","ts":1695257316.443454,"logger":"tls.obtain","msg":"releasing lock","identifier":"local.netease.com"}
{"level":"warn","ts":1695257316.4435532,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [local.netease.com]: no OCSP server specified in certificate","identifiers":["local.netease.com"]}
{"level":"warn","ts":1695257316.4476962,"logger":"pki.ca.local","msg":"installing root certificate (you might be prompted for password)","path":"storage:pki/authorities/local/root.crt"}
{"level":"info","ts":1695257316.447804,"msg":"warning: "certutil" is not available, install "certutil" with "apt install libnss3-tools" or "yum install nss-tools" and try again"}
{"level":"info","ts":1695257316.4478083,"msg":"define JAVA_HOME environment variable to use the Java trust"}
{"level":"info","ts":1695257316.4613037,"msg":"certificate installed properly in linux trusts"}
{"level":"info","ts":1695257316.4615793,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1695257316.4615903,"msg":"serving initial configuration"}

是否有方法将CDN资源替换为离线资源

由于网络原因,经常无法访问cdn资源,导致项目运行不起来
请问有没有手段使用本地的资源?

目前只看到 apps/playground/.umirc.ts 里面有一点点可以更改的地方

关于[vscode 插件]形态的疑问

因为在另外的问题下面提到了以后也会提供[vscode 插件]

想咨询一个这个插件的形态

  1. 是用vscode的编码能力替代设计器当中的源码视图吗?
  2. 因为vscode本身就能安装依赖启动服务,是否也能替代sandbox的角色?

低代码平台提效的点在哪里

首先感谢网易云团队将低代码平台核心代码开源,其次我想问下,低代码平台一般都是给开发同学使用的,这种方式和传统的直接写代码的方式提效的点在哪,方便透露下内部使用了之后降本增效的数据吗?感谢🙏

本地已有沙箱,如何接入?

我本地已经启动了一个sandpack沙箱,如何用它来替换sandbox?
我改写了bundlerURL,但问题是没法打通整个拖拽及事件系统

Nice try...

看起来更像是 JSX 界面设计器。

这种设计的问题是完全没法摆脱代码编辑,比如

let button;
if (isLoggedIn) {
  button = <Button children="按钮1" />;
} else {
  button = <Button children="按钮2" />;
}
return (
  <Page title="页面标题">
    <Section></Section>
    <Section>{button}</Section>
  </Page>
);

可视化编辑器永远看不到另一个了,必须切换到代码编辑模式

AST: 是否支持随意改动,包括结构改动、使用自定义组件、使用社区开源(Antd、Element) 等

首先非常感谢 tango 团队的付出!我有几个问题还没想明白,所以开个 issues 问一下

问题1:看起来是有物料约束的,虽然说摆脱了 JSON Schema 的约束

image

问题2:生成代码看起来是有一定的结构约束的

image

问题3:是否支持 .vue template,是否可以在与已有的业务页面代码兼容?还是说必须符合 Tango 提供的页面结构。

执行 yarn start,启动不了项目

MacOS 之下启动,遇到下面的提示

yarn run v1.22.19
$ yarn workspace playground start
$ HTTPS=1 umi dev
Starting the development server...

● Webpack █████████████████████████ building (10%) 1/2 modules 1 active
 babel-loader › src/.umi/umi.ts

(node:24976) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND local.netease.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
Emitted 'error' event on Server instance at:
    at Server.emit (/Users/www/node_modules/@umijs/deps/compiled/spdy/spdy.js:1:211183)
    at GetAddrInfoReqWrap.doListen (node:net:2066:12)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:17) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'local.netease.com'
}

Node.js v20.5.0
✨  Done in 3.20s.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.