Why Rubick

Rubick 1.x was designed to solve its own problem: the need for a desktop app that supports custom plugins to make it easier for users to install bulky desktop apps. In addition, the plug-in can only be contributed on the Intranet of the company and cannot be made public due to data security issues.

In Rubick 2.0, a new nPM-based plug-in management system was designed to make it easier for developers to participate in plug-in development. By expanding the boundaries and types of plug-ins, developers can develop Rubick system plug-ins. At this time, Rubick becomes a electron advanced package, and developers can implement system capabilities with high freedom, without being limited to openAPI or having to search and use calls. As long as Rubick is running, The plug-in is running.

Rubick’s introduction

Rubick is an open-source toolkit based on ELECTRON that freely integrates rich plug-ins based on NPM plug-in management. Rubick is one of the heroes in Dota, whose core skill is to use other heroes’ abilities as plugins and run out of them. It fits the design philosophy of this tool so well that it is named Rubick.

Core Skills Demonstration

1. Manage plug-ins based on NPM

At the beginning, the way to design plug-in management is to package the plug-in into a.zip package, and then upload the compressed package to the CDN, click Install and download to decompress. But this has several drawbacks

  1. A data storage server is required to store these compressed files, which requires an expense that is difficult for an open source developer to sustain.
  2. The packaging and decompression mechanics are cumbersome and developer unfriendly

It was not until I saw the PicGo author’s article about the design idea of PicGo plug-in that I suddenly realized that the package management method based on NPM is exactly what I want, which is light and saves a sum of server storage overhead: However, there is another problem, because it is nPM-based management mode, so developers need to install the Node environment in advance to use NPM. But that’s ok for now, because Rubick is also currently positioned as an open source toolkit for developers.

NPM install XXX is actually executed when you click install plugin.

2. System plug-in ability

One of Rubick’s greatest capabilities is support for system plugins, so we don’t have to search for plug-ins to use. The plugins are running as long as Rubick is running. This can be very valuable for special situations, such as when I want to implement a plugin that reminds me to drink water at a certain time, which might not be possible if I quit the plugin interface. But once a system plug-in is made, Rubick will still run the hooks provided by the plug-in in the background even after the plug-in is exited. This was also inspired by PicGo’s plug-in lifecycle design. Here’s a demo of the system plug-in:

With the system plug-in, we can achieve the screen color plug-in, timer reminder plug-in, super panel plug-in… In addition, since Rubick’s system plug-in runs in the main process, we can achieve more capabilities through the system plug-in. For example, Rubick can be seen as the second encapsulation of ELECTRON, without any construction package of electron. Based on the system plug-in, We can implement another desktop application!

The last

The biggest motivation to do open source is because of love, completely non-profit, I hope to do something to provide some help and direction to partners in need, programmers are the most pure and lovely, I hope not malicious attacks to break the last part of open source motivation.

Attach:

Rubick making warehouse

Rubick uses documentation