Skip to content

Frontend development guidelines

Alexey edited this page Jan 28, 2023 · 7 revisions

Structure

|-webapp
  |-node_modules                  # dependencies
  |-packages                      # packages folder (contains core-* and plugin-*)
    |-(plugin|core)-name          # plugin name (without @cloudbeaver/)
      |-node_modules              # dependencies
      |-lib                       # after the build will contain the artifact
      |-public                    # put static assets to this folder
      |-src                       # keep source files here
        |-locales                 # contains localization files
          |-en.ts                 # contains array of token localizations
        |-index.ts                # contains re-exports
        |-manifest.ts             # contains list of services, plugin name and description
        |-PluginBootstrap.ts      # common plugin registration and initialization logic
        |-LocaleBootstrap.ts      # plugin localization 
      |-package.json
      |-tsconfig.json
    |-plugin-name-administration  # administration plugin name (without @cloudbeaver/), structure are the same as for core/plugin packages
    |-product-name                # product name (without @cloudbeaver/)
      |-node_modules
      |-lib
      |-public
      |-src
        |-config.json5            # product default configuration
        |-index.html.ejs          # html page template
        |-index.ts                # plugins import & application bootstrap
        |-manifest.ts             # contains list of services, product name and description
        |-ProductBootstrap.ts     # common product registration and initialization logic
      |-package.json
      |-tsconfig.json

Dependencies flow

core-* <- plugin-* <- plugin-*-administration
Core packages can depends only on another core packages.
Plugins can depends only on another plugins or core packages.
Administration plugins can depends on any package.

Please avoid circular dependencies.

Static content

Every package can have public folder at root folder.
Content of this folder will be copyed to lib folder.
Make sure that plugin in the product dependencies list, othervise static content won't be coppied.

CloudBeaver Documentation

Clone this wiki locally