0001-cortex-structure-rfc #971
Replies: 0 comments 2 replies
-
Here is my second thought: During the development, I discovered that the develop and release of the I think we should make them as single package.
|
Beta Was this translation helpful? Give feedback.
-
If we combine
|
Beta Was this translation helpful? Give feedback.
-
Summary
To sync between the cloud version app and the open-source app, we set up a monorepo to store necessary components, toolkits, and views across these two apps. It named is Cortex.
Motivation
We have dozen of duplicated views and components between the cloud version app and the open-source app. During the process of development, it becomes cumbersome to sync between these two repositories. We need to find a way to maintain the reusable components, views, and toolkits (helpers) across these two apps.
Detailed design
design-system
,toolkit
, andview
The cortex contains three main packages:
design-system
,toolkit
, andview
. In the dependency graph, thedesign-system
andtoolkit
are independent butview
will be dependent on both thedesign-system
andtoolkit
.design-system
: the basic level components in the instill-ai like Select, Button, Input, and more.toolkit
: the tools to build the proper functionality of our user interface, like the SDK of the VDP API, the react-query wrapper, and the Zustand stores. It won't have any kind of components.view
: combined the help of thedesign-system
and thetoolkit
. Theview
will store the high-level components or views like ConfigureProfileForm or other resources' tables.About the release flow
The release flow is constructed by google release-please and contains two steps:
JS-DevTools/npm-publish
action will be triggered. If the version is the same as the newest version in the npm, the action will abandon the release procedure. If the version is new, this action will publish it.About the usage
Normally, the cloud version app and the open-source app will use the
design-system
,toolkit
, andview
at the same time. But in some circumstances like chrome extension or other user interfaces, we can only use thedesign-system
to build the UI and use thetoolkit
to access the VDP API.Drawbacks
design-system
into three packages.toolkit
andview
package's size will grow overtimeAlternatives
Submodules
In the cloud version app, we can use submodules to access the open-source app to sync between these two apps. But this lead to some greater drawbacks like
Caveats
Unsolved questions
view
anddesign-system
Beta Was this translation helpful? Give feedback.
All reactions