Skip to content

feat: plugin auto-discovery system and stripe admin enhancements#781

Open
lane711 wants to merge 3 commits intomainfrom
feat/plugin-auto-discovery-and-stripe-enhancements
Open

feat: plugin auto-discovery system and stripe admin enhancements#781
lane711 wants to merge 3 commits intomainfrom
feat/plugin-auto-discovery-and-stripe-enhancements

Conversation

@lane711
Copy link
Copy Markdown
Collaborator

@lane711 lane711 commented Apr 10, 2026

Summary

  • Replace hardcoded plugin lists across 5+ files with a manifest-driven auto-discovery system powered by manifest-registry.ts
  • Enrich all 26 plugin manifest.json files with standardized fields (codeName, iconEmoji, is_core, defaultSettings, adminMenu)
  • Add Stripe subscription sync from API, webhook event logging, tabbed admin UI, and publishable key setting

Changes

Plugin Auto-Discovery

  • packages/scripts/generate-plugin-registry.mjs — Rewritten to scan all manifest.json files and produce manifest-registry.ts as single source of truth
  • packages/core/src/plugins/manifest-registry.ts — Auto-generated registry with PLUGIN_REGISTRY, ALL_PLUGIN_IDS, PLUGINS_WITH_ADMIN_PAGES, findPluginByCodeName()
  • packages/core/src/routes/admin-plugins.ts — Replaced ~174-line hardcoded AVAILABLE_PLUGINS and ~400-line switch/case install handler with registry-driven code
  • packages/core/src/services/plugin-bootstrap.ts — Replaced hardcoded CORE_PLUGINS with registry lookup
  • packages/core/src/middleware/plugin-menu.ts — Replaced hardcoded MENU_PLUGINS with registry; added icon name → Heroicon SVG resolution
  • 26 manifest.json files — Enriched with standardized fields

Stripe Plugin Enhancements

  • Subscription SynclistAllSubscriptions() in StripeAPI + upsert() in SubscriptionService + POST /api/stripe/sync-subscriptions endpoint + "Sync from Stripe" button
  • Events Log — New stripe_events table via StripeEventService, webhook handler logs all events (processed/failed/ignored), admin events page with stats + filters + pagination
  • Settings — Added publishable key field to match Stripe dashboard
  • Tab Bar — Shared Subscriptions / Events / Settings tabs across all Stripe admin pages
  • Route Fix — Stripe routes registered before /admin/plugins catch-all to prevent 404
  • Layout Fix — All Stripe admin pages wrapped in renderAdminLayoutCatalyst

Testing

  • TypeScript compiles clean (tsc --noEmit)
  • Plugin auto-discovery generates correct registry
  • Stripe admin pages render with tab navigation
  • Subscription sync pulls data from Stripe API
  • Webhook events logged to stripe_events table

🤖 Generated with Claude Code

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>
@lane711 lane711 deployed to internal April 10, 2026 01:37 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant