A framework to help you quickly build local and cloud IDE

A framework to help you quickly build local and cloud IDE

2022-11-10 0 1,592
Resource Number 47828 Last Updated 2025-02-21
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue recommends OpenSumi, an underlying framework for quickly building Cloud and desktop IDE products.

A framework to help you quickly build local and cloud IDE插图

OpenSumi framework aims to solve the problem of repeated construction of IDE product research and development within Ali Economy, meet the customization capability of IDE in more vertical scenarios, and realize the sharing of the bottom layer between Web and local clients. Let IDE research and development from the early “slash-and-burn” era to the “machine mass production” era.

Function feature

  • Easy integration: Provides rapid integration solutions for container scenarios, Electron scenarios, and pure front-end scenarios, helping services quickly land
  • High scalability: Provides three-layer business solutions from VS Code plug-in, OpenSumi plug-in to OpenSumi module, perfectly supporting business customization requirements
  • UI customization: provides a layout system that can be customized at will, supporting various scenarios from simple view configuration to layout template development, and injecting custom views from plug-ins

Overall structure

In order to ensure that the framework can run in both Web and Electron environments, OpenSumi uses a project structure that separates the front and back ends and calls each other through an abstract communication layer.

On the Web, we use WebSockets as an implementation for communication.

On Electron, we are IPC communication.

Each communication connection corresponds to an independent DI (Dependence Inject) container on the front and back ends, so OpenSumi’s backend implementation is stateless, and different connections are strictly isolated.

There are three main core processes in OpenSumi:

  • Extension Process
  • Node Process
  • Browser Process

In order to ensure that plug-in problems will not affect the performance of the IDE, OpenSumi adopts a similar scheme to VS Code in terms of plug-in capabilities, which starts the plug-in through an independent plug-in process, and then communicates with the front-end process through the back-end process.

A framework to help you quickly build local and cloud IDE插图1

OpenSumi’s different capability implementations are split into different modules, which have weak Dependence on each other through Contribution Point mechanism and Dependence Inject mechanism. For some of the more core basic modules, such as theme services, layout services, etc., will also be directly dependent by other modules.

Therefore, it is necessary to ensure that some modules are introduced in order during the integrated development process.

The overall startup life cycle is shown as follows:

A framework to help you quickly build local and cloud IDE插图2

Fast Start (Web)

OpenSumi is based on Node.js 12.x +, so make sure you have the correct Node.js version installed locally. OpenSumi also relies on some Node.js addons. To ensure that these Addons can be compiled and run properly, it is recommended to refer to the installation guide in node-gyp to set up a local environment.

A framework to help you quickly build local and cloud IDE插图3

Local startup

Note: Due to the need to download a large number of packages during the compilation process, and some packages need to access GitHub to download source code, please keep GitHub access unblocked. Many 404 Not Found problems are caused by network access failures.

Run the following commands in sequence:

$ git clone git@github.com:opensumi/ide-startup.git

$ cd ide-startup

$ yarn # Install dependency 

$ yarn start # Start front-end and back-end in parallel 

Open your browser to http://127.0.0.1:8080 for preview or development.

Mirroring with Docker

# Pull image 

docker pull ghcr.io/opensumi/opensumi-web:latest

# Run 

docker run --rm -d -p 8080:8000/tcp  ghcr.io/opensumi/opensumi-web:latest

Open your browser to http://127.0.0.1:8080 for preview or development.

Fast Start (Electron)

OpenSumi includes a simple Electron framework that is designed to provide a desktop environment for quickly testing OpenSumi. You can use ide-electron as a template to build your own client.

You can also Release (
https://github.com/opensumi/ide-electron/releases) in the list for the relevant installation package for rapid experience.

A framework to help you quickly build local and cloud IDE插图4

Compatible environment

  • Electron 11.4.3+
  • macOS & Windows 7+
  • Node.js 12+

Local start

Note: Due to the need to download a large number of packages during the compilation process, and some packages need to access GitHub to download source code, please keep GitHub access unblocked. Many 404 Not Found problems are caused by network access failures. If mainland users can not install the dependency properly due to network problems, they can switch to the main-cn branch: git checkout main-cn, or refer to the appendix at the end of the article to configure the npm image.

Run the following commands in sequence:

$ git clone git@github.com:opensumi/ide-electron.git

$ cd ide-electron

$ yarn

$ yarn build

$ yarn rebuild-native -- --force-rebuild=true

$ yarn download-extension # Install built-in plug-in (optional) 

$ yarn start

Development

Run in project root:

$ yarn watch

Start:

$ yarn start

Packing

Run yarn pack to package the project. The packaged installation package will be output to the out directory.

npm mirroring configuration

Open ide-electron/.npmrc and add the following npm image configuration to solve the installation dependency failure problem:

registry=https://registry.npmmirror.com/
disturl=https://npmmirror.com/mirrors/node
chromedriver-cdnurl=https://npmmirror.com/mirrors/chromedriver
couchbase-binary-host-mirror=https://npmmirror.com/mirrors/couchbase/v{version}
debug-binary-host-mirror=https://npmmirror.com/mirrors/node-inspector
flow-bin-binary-host-mirror=https://npmmirror.com/mirrors/flow/v{version}
fse-binary-host-mirror=https://npmmirror.com/mirrors/fsevents
fuse-bindings-binary-host-mirror=https://npmmirror.com/mirrors/fuse-bindings/v{version}
git4win-mirror=https://npmmirror.com/mirrors/git-for-windows
gl-binary-host-mirror=https://npmmirror.com/mirrors/gl/v{version}
grpc-node-binary-host-mirror=https://npmmirror.com/mirrors
hackrf-binary-host-mirror=https://npmmirror.com/mirrors/hackrf/v{version}
leveldown-binary-host-mirror=https://npmmirror.com/mirrors/leveldown/v{version}
leveldown-hyper-binary-host-mirror=https://npmmirror.com/mirrors/leveldown-hyper/v{version}
mknod-binary-host-mirror=https://npmmirror.com/mirrors/mknod/v{version}
node-sqlite3-binary-host-mirror=https://npmmirror.com/mirrors
node-tk5-binary-host-mirror=https://npmmirror.com/mirrors/node-tk5/v{version}
nodegit-binary-host-mirror=https://npmmirror.com/mirrors/nodegit/v{version}/
operadriver-cdnurl=https://npmmirror.com/mirrors/operadriver
phantomjs-cdnurl=https://npmmirror.com/mirrors/phantomjs
profiler-binary-host-mirror=https://npmmirror.com/mirrors/node-inspector/
python-mirror=https://npmmirror.com/mirrors/python
rabin-binary-host-mirror=https://npmmirror.com/mirrors/rabin/v{version}
sass-binary-site=https://npmmirror.com/mirrors/node-sass
sodium-prebuilt-binary-host-mirror=https://npmmirror.com/mirrors/sodium-prebuilt/v{version}
sqlite3-binary-site=https://npmmirror.com/mirrors/sqlite3
utf-8-validate-binary-host-mirror=https://npmmirror.com/mirrors/utf-8-validate/v{version}
utp-native-binary-host-mirror=https://npmmirror.com/mirrors/utp-native/v{version}
zmq-prebuilt-binary-host-mirror=https://npmmirror.com/mirrors/zmq-prebuilt/v{version}
bin-mirrors-prefix=https://npmmirror.com/mirrors
canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas
electron-mirror=https://npmmirror.com/mirrors/electron/
electron_custom_dir={{ version }}
electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/

Fast Start (pure front-end)

OpenSumi provides a pure front-end version of the access ability, can let you out of the node environment, in a pure browser environment, through a simple B/S architecture to provide relatively complete IDE capabilities.

Before running, ensure that Node.js 10.15.x or later has been installed on the local environment. OpenSumi also relies on some Node.js addons. To ensure that these Addons can be compiled and run properly, it is recommended to refer to the installation guide in node-gyp to set up a local environment.

Fast start

Clone project opensumi/ide-startup-lite, go to the directory and run the following command to start the IDE:

$ git clone https://github.com/opensumi/ide-startup-lite.git

$ cd ide-startup-lite

$ npm install # Install dependency 

$ npm run compile:ext-worker # Compile webworker plug-in environment 

$ npm run start # 

Open your browser to http://127.0.0.1:8080 for preview or development.

A framework to help you quickly build local and cloud IDE插图5

Product Case

Alipay small program development tool

Small program Developer tool is a one-stop small program development tool created by Alipay open platform, providing coding, debugging, testing, uploading, project management and other functions. Not only support the development of Alipay small programs, the same code is also commonly used in Ant open ecology, can be directly released to Taobao, Dingding, Autonavi and other application platforms.

A framework to help you quickly build local and cloud IDE插图6

Taobao Developer tools

Developer tool IDE is a local development tool to assist Taobao developers to develop business applications, including local debugging, code editing, real machine preview, release and other functions, covering the complete process of application development.

A framework to help you quickly build local and cloud IDE插图7

—END—

Open Source protocol: MIT

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code A framework to help you quickly build local and cloud IDE https://ictcoder.com/a-framework-to-help-you-quickly-build-local-and-cloud-ide/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services