Every B2B platform claims to be modular. Very few are, because the claim is usually made about a codebase where the core imports the features directly. Remove one and the build breaks.
The rule
Our core never imports a plugin. Plugins register themselves through an SDK, and the core knows only interfaces. That is the whole architecture in one sentence.
core ◄──── registers ──── plugins
core ──── never imports ───► plugins ✗ forbiddenWhy a rule needs enforcement
A rule nobody checks becomes a suggestion within two sprints. Ours is enforced by a filesystem scan in the verification suite: if any file under the core directory imports from the plugins directory, the check fails and the build does not ship.
It caught us immediately
The first version of our plugin registry held all 63 manifests in one file inside the core. It violated the rule we had just written. We moved them out before writing another feature.
What it costs
Indirection. A plugin that wants to react to a payment cannot call the payments module — it subscribes to an event. That is more ceremony than a function call, and it is genuinely harder to trace the first time you read it.
The trade is worth it because of what becomes possible: a tenant who has not licensed a plugin has no routes for it, no menu entries and no settings. Not hidden — absent. And a third-party developer builds against exactly the same interface we do, because there is no privileged internal API for us to use instead.
The test that matters
Can you remove a plugin and have everything else keep working? We assert it: the verification suite builds navigation with a plugin removed and checks that its entries disappear and nothing else changes. 52 assertions run on every commit.
If we had needed a back door to build our own plugins, the abstraction would have been wrong.