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:
ModuleStatetable (companyId + moduleId) - Lifecycle engine:
src/modules/core/module-lifecycle.ts
Enable flow can:
- ensure state row
- apply module SQL migrations
- run module
onEnablehooks
Disable flow can:
- run module
onDisablehooks - 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
MATRIXoption 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 (
routein module definition and admin pages).