Registry
Explore community-led codemods to migrate, optimize, and transform your codebase.
Ready to contribute?
Build your own codemod and share it with the community.
Explore community-led codemods to migrate, optimize, and transform your codebase.
Build your own codemod and share it with the community.
Install and configure the Paddle billing plugin for MakerKit
npx codemod @makerkit/next-supabase-paddle
This is one example from the codemod's test cases. The codemod may handle many more cases.
Build your own codemod and share it with the community.
1 import 'server-only';
2
3 import { z } from 'zod';
4
5 import {
6 type BillingProviderSchema,
7 BillingStrategyProviderService,
8 } from '@kit/billing';
9 import { createRegistry } from '@kit/shared/registry';
10
11 // Create a registry for billing strategy providers
12 export const billingStrategyRegistry = createRegistry<
13 BillingStrategyProviderService,
14 z.infer<typeof BillingProviderSchema>
15 >();
16
17 // Register the Stripe billing strategy
18 billingStrategyRegistry.register('stripe', async () => {
19 const { StripeBillingStrategyService } = await import('@kit/stripe');
20 return new StripeBillingStrategyService();
21 });
22
23 // Register Paddle billing strategy (not implemented yet)
24 billingStrategyRegistry.register('paddle', () => {
25 throw new Error('Paddle is not supported yet');
26 });
27