Modularity

How optional modules are enabled and what each module adds.

Workbase uses a company-scoped module platform. Core entities stay stable while optional capabilities are enabled per company.

How module state works

  • Registry source: src/modules/registry.ts
  • State storage: ModuleState table (companyId + moduleId)
  • Lifecycle engine: src/modules/core/module-lifecycle.ts

Enable flow can:

  • ensure state row
  • apply module SQL migrations
  • run module onEnable hooks

Disable flow can:

  • run module onDisable hooks
  • optionally drop module tables if no other company still uses them

Current module ids

blogs

  • Company blogs, categories, and markdown articles.

bulk_product_creator

  • Template-driven bulk product and variant creation flow.

discounts

  • Tier pricing behavior in pricing pipeline/UI extensions.

matrix

  • Matrix config and generated variant combinations.

matrix_type

  • Adds MATRIX option behavior with axis pairing tables.

moysklad

  • MoySklad settings, sync, mapping, and export tools.

opencart_import

  • OpenCart catalog import and image workflows.

product_lists

  • Curated ordered product lists for storefront blocks.

storefronts

  • Storefront profiles and static pages.

yarvet

  • Yarvet export/update operations.

Practical guidance

  • Treat module enable/disable as an operational change, not just a UI toggle.
  • Verify module table lifecycle when changing SQL migrations.
  • Keep module routes and module ids synchronized (route in module definition and admin pages).