Design a Plugin System for a Confluence-Like Document Editor
Problem Design a plugin/extension system for a Confluence-like wiki editor that lets third-party developers add new macro types, content renderers, and panel components.
Requirements
- Plugin registration:
registerPlugin(manifest). - Lifecycle hooks:
onLoad,onUnload,onRender. - Sandboxed execution — a faulty plugin must not crash the host.
- Plugin communication via an event bus (no direct host access).
- Marketplace: install / uninstall plugins at runtime.
Areas to design
- The key interfaces (Plugin, PluginManifest, PluginRegistry, PluginSandbox, EventBus, RenderContext).
- The isolation boundary that contains a misbehaving plugin.
- Versioning and how the host handles breaking API changes.
added …