feat: plugin auto-discovery system and stripe admin enhancements#781
Open
feat: plugin auto-discovery system and stripe admin enhancements#781
Conversation
Replace hardcoded plugin lists across 5+ files with a manifest-driven auto-discovery system. Enrich all 26 plugin manifests with standardized fields. Add Stripe subscription sync, webhook event logging, and tabbed admin UI. Plugin auto-discovery: - Rewrite generate-plugin-registry.mjs to scan manifest.json files and produce manifest-registry.ts as single source of truth - Replace hardcoded AVAILABLE_PLUGINS in admin-plugins.ts with registry - Replace CORE_PLUGINS in plugin-bootstrap.ts with registry - Replace MENU_PLUGINS in plugin-menu.ts with registry - Add icon resolution (text name -> Heroicon SVG) in plugin menu middleware - Enrich all 26 manifest.json files with codeName, iconEmoji, is_core, defaultSettings, and adminMenu fields Stripe plugin enhancements: - Add subscription sync from Stripe API (listAllSubscriptions + upsert) - Add stripe_events table and StripeEventService for webhook event logging - Webhook handler now logs all events as processed/failed/ignored - Add events log admin page with stats, type/status filters, pagination - Add publishable key field to settings page - Add shared tab bar (Subscriptions / Events / Settings) across all pages - Fix route registration order (stripe routes before catch-all) - Wrap admin pages in renderAdminLayoutCatalyst for proper styling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Mock manifest-registry in tests so test plugin names are recognized - Move auth check before PLUGINS_WITH_ADMIN_PAGES check in /:id route Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Plugins with custom admin routes (e.g., stripe) are already registered before the catch-all in app.ts, so the check was redundant and caused plugins like turnstile that use the generic settings page to 404. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
manifest-registry.tsmanifest.jsonfiles with standardized fields (codeName,iconEmoji,is_core,defaultSettings,adminMenu)Changes
Plugin Auto-Discovery
packages/scripts/generate-plugin-registry.mjs— Rewritten to scan allmanifest.jsonfiles and producemanifest-registry.tsas single source of truthpackages/core/src/plugins/manifest-registry.ts— Auto-generated registry withPLUGIN_REGISTRY,ALL_PLUGIN_IDS,PLUGINS_WITH_ADMIN_PAGES,findPluginByCodeName()packages/core/src/routes/admin-plugins.ts— Replaced ~174-line hardcodedAVAILABLE_PLUGINSand ~400-line switch/case install handler with registry-driven codepackages/core/src/services/plugin-bootstrap.ts— Replaced hardcodedCORE_PLUGINSwith registry lookuppackages/core/src/middleware/plugin-menu.ts— Replaced hardcodedMENU_PLUGINSwith registry; added icon name → Heroicon SVG resolutionmanifest.jsonfiles — Enriched with standardized fieldsStripe Plugin Enhancements
listAllSubscriptions()in StripeAPI +upsert()in SubscriptionService +POST /api/stripe/sync-subscriptionsendpoint + "Sync from Stripe" buttonstripe_eventstable viaStripeEventService, webhook handler logs all events (processed/failed/ignored), admin events page with stats + filters + pagination/admin/pluginscatch-all to prevent 404renderAdminLayoutCatalystTesting
tsc --noEmit)🤖 Generated with Claude Code