mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-09 13:35:12 +09:00
Introduce a first-class plugin contribution system and SDK, plus frontend integration and installer enhancements. Backend: - Add /plugins/manifest-spec and /plugins/contributions endpoints to expose the plugin.json contract and merged active-plugin UI contributions. - Add app/plugins_sdk for plugin authors (current_user, logger, audit, jwt helpers). - Add ContributionService to aggregate active plugin contributions (nav, routes, page_titles, command_palette, widgets). - Marketplace now hands off to plugin installer when an extension has a source URL and enforces admin-only installs in the marketplace API. - PluginService: run lifecycle hooks (install/uninstall) and install declared template dependencies (best-effort, recorded/logged) during plugin installs; surface template/manifest fields on InstalledPlugin.to_dict; surface linked InstalledPlugin status on ExtensionInstall.to_dict. Frontend: - Add runtime contributions loader (plugins/contributions.js) with useContributions hook and resolveComponent/getPluginModule helpers. - Add SDK re-exports for plugin frontends (plugins/sdk/index.js) and Vite alias 'serverkit-sdk'. - Integrate contributions across UI: Sidebar, CommandPalette, PluginLoader (declared widgets + legacy fallback), PageTitleUpdater, DashboardLayout (refreshContributions), and route injection via new ExtensionRoutes hook loaded in App.jsx. - Add API client getPluginContributions and adjust PluginLoader discovery patterns. Other: - Add .extension-platform-plan/ to .gitignore. Overall this enables declarative plugin-driven UI integration (sidebar items, SPA routes, page titles, command palette entries, and widgets), lifecycle hooks, and template dependency installs while keeping legacy behavior for older plugins.