create-fullstack-scaffold 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/cli/index.js +5 -0
  2. package/dist/cli/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/template/dist/cli/index.js +237 -94
  5. package/template/dist/cli/index.js.map +1 -1
  6. package/template/dist/client/admin.html +15 -10
  7. package/template/dist/client/assets/App-BpFUIC-5.js +114 -0
  8. package/template/dist/client/assets/{CartPage-DESSHkaG.js → CartPage-DgDZP-R5.js} +2 -2
  9. package/template/dist/client/assets/{CategoriesPage-DqLZ_Mom.js → CategoriesPage-fuYNiSmE.js} +2 -2
  10. package/template/dist/client/assets/ContentDetailPage-BvvFU1Mr.js +1 -0
  11. package/template/dist/client/assets/ContentListPage-ShPxo6WG.js +1 -0
  12. package/template/dist/client/assets/DashboardPage-C1rZzZo4.js +11 -0
  13. package/template/dist/client/assets/{DeveloperDashboardPage-Cum7zFwO.js → DeveloperDashboardPage-_WtmbVoA.js} +2 -2
  14. package/template/dist/client/assets/{EmptyState-BK7ttK8D.js → EmptyState-DEyOQjbY.js} +1 -1
  15. package/template/dist/client/assets/LoadingSpinner-BcHjaM1m.js +6 -0
  16. package/template/dist/client/assets/LoginPage-CjeQqDdO.js +1 -0
  17. package/template/dist/client/assets/LogoutOutlined-ColFAHdd.js +1 -0
  18. package/template/dist/client/assets/NotificationPage-DRkEv02s.js +1 -0
  19. package/template/dist/client/assets/OrdersPage-7I3vPWLP.js +11 -0
  20. package/template/dist/client/assets/{PluginDetailPage-Br24YS4P.js → PluginDetailPage-CWyxdVCg.js} +3 -13
  21. package/template/dist/client/assets/PluginsPage-DRgWLeJT.js +6 -0
  22. package/template/dist/client/assets/ProfilePage-2FFkaii8.js +16 -0
  23. package/template/dist/client/assets/PublishPage-DW7yvROx.js +1 -0
  24. package/template/dist/client/assets/{RegisterPage-rPFG4Sry.js → RegisterPage-Dvaf9b0e.js} +2 -2
  25. package/template/dist/client/assets/SaveOutlined-CLQ2tsSY.js +2 -0
  26. package/template/dist/client/assets/{SearchPage-DQl1U5Uy.js → SearchPage-DvnEyswS.js} +2 -2
  27. package/template/dist/client/assets/{SettingsPage-DaYE80wj.js → SettingsPage-IrU-L9Zr.js} +2 -2
  28. package/template/dist/client/assets/{StatusBadge-BJ3W2Zc7.js → StatusBadge-CG7wVqpu.js} +1 -1
  29. package/template/dist/client/assets/{TodoPage-zC5wWNBa.js → TodoPage-B7D-bl65.js} +3 -3
  30. package/template/dist/client/assets/TopicsPage-CYCNr-mn.js +6 -0
  31. package/template/dist/client/assets/{WebSocketPage-B4NLdz1w.js → WebSocketPage-CGEg6QJE.js} +2 -2
  32. package/template/dist/client/assets/{activity-B94BUAsD.js → activity-CgTz9Mrd.js} +1 -1
  33. package/template/dist/client/assets/admin-D2iHWNOg.js +1 -0
  34. package/template/dist/client/assets/api-request-DIJocPxr.js +356 -0
  35. package/template/dist/client/assets/{arrow-left-H5JH0iU1.js → arrow-left-DtLQ3tTk.js} +1 -1
  36. package/template/dist/client/assets/{chevron-down-DwRh_wjD.js → chevron-down-CpIAV_yr.js} +1 -1
  37. package/template/dist/client/assets/{chevron-right-CpIWaqAL.js → chevron-right-CnU7oPQs.js} +1 -1
  38. package/template/dist/client/assets/{circle-check-big-CSElLscG.js → circle-check-big-CrZdwS75.js} +1 -1
  39. package/template/dist/client/assets/{circle-x-CYxr4RAw.js → circle-x-CvN9r3fW.js} +1 -1
  40. package/template/dist/client/assets/{clock-BseUJ7ex.js → clock-CTeSZBiH.js} +1 -1
  41. package/template/dist/client/assets/{download-BsGC_Xhq.js → download-OSVfVuNV.js} +1 -1
  42. package/template/dist/client/assets/{external-link-UTDzdjq8.js → external-link-fBsuHMby.js} +1 -1
  43. package/template/dist/client/assets/{eye-nR10ui7i.js → eye-CwlZZEsj.js} +1 -1
  44. package/template/dist/client/assets/index-09IqiOaE.css +1 -0
  45. package/template/dist/client/assets/index-B3CRby6r.js +51 -0
  46. package/template/dist/client/assets/index-CC_zy73y.js +17 -0
  47. package/template/dist/client/assets/main-Cn4IDo2I.js +92 -0
  48. package/template/dist/client/assets/merchant-DDDN9bMu.js +40 -0
  49. package/template/dist/client/assets/{message-square-CwWGL-Bh.js → message-square-BRaZfgbJ.js} +1 -1
  50. package/template/dist/client/assets/pluginStore-DDsWJPe6.js +1 -0
  51. package/template/dist/client/assets/{plus-pZld_nUL.js → plus-DDZfPiDJ.js} +1 -1
  52. package/template/dist/client/assets/sse-client-DGQ072hl.js +64 -0
  53. package/template/dist/client/assets/star-C7tO6w4H.js +11 -0
  54. package/template/dist/client/assets/{tag-DsiUPF90.js → tag-DBfpQDuJ.js} +1 -1
  55. package/template/dist/client/assets/tenant-CizbLaLJ.js +1 -0
  56. package/template/dist/client/assets/{trash-2-DRblNbnA.js → trash-2-BP7fkd5b.js} +1 -1
  57. package/template/dist/client/assets/{triangle-alert-D1CLh-Vd.js → triangle-alert-CrOQEdJ2.js} +1 -1
  58. package/template/dist/client/assets/{wifi-BwXjnCqI.js → wifi-CwYSE0J4.js} +1 -1
  59. package/template/dist/client/assets/{x-BH2rJdFq.js → x-t615pnNR.js} +1 -1
  60. package/template/dist/client/content/index.html +5 -4
  61. package/template/dist/client/index.html +4 -3
  62. package/template/dist/client/merchant.html +18 -0
  63. package/template/dist/client/notifications/index.html +6 -5
  64. package/template/dist/client/tenant.html +18 -0
  65. package/template/dist/client/todos/index.html +6 -5
  66. package/template/dist/client/websocket/index.html +6 -5
  67. package/template/dist/cloudflare/chunk-HX7DVRDX.js +1 -0
  68. package/template/dist/cloudflare/{chunk-QBHAPWIA.js → chunk-IXJL2LE4.js} +1 -1
  69. package/template/dist/cloudflare/chunk-Q34AN3RF.js +14 -0
  70. package/template/dist/cloudflare/{chunk-BHPTQ4K2.js → chunk-ZAMVL4EG.js} +2 -2
  71. package/template/dist/cloudflare/cloudflare.js +35 -29
  72. package/template/dist/cloudflare/db-4AQOSFAX.js +1 -0
  73. package/template/dist/cloudflare/{migrator-2ZYYKNI5.js → migrator-TEPBVUFO.js} +1 -1
  74. package/template/dist/cloudflare/permission-service-impl-RE7NPW3Q.js +1 -0
  75. package/template/dist/cloudflare/schema-DVEMT3X2.js +1 -0
  76. package/template/dist/cloudflare/test-setup-Z2RYE5B4.js +265 -0
  77. package/template/dist/server/chunk-27SIJSPF.js +1 -0
  78. package/template/dist/server/chunk-37QNGBQU.js +1 -0
  79. package/template/dist/server/chunk-FIY4CGJJ.js +1 -0
  80. package/template/dist/server/chunk-HZUDBIT4.js +1 -0
  81. package/template/dist/server/chunk-I6OBDFDU.js +1 -0
  82. package/template/dist/server/chunk-JHNYLNG7.js +1 -0
  83. package/template/dist/server/chunk-MDOVVKKD.js +1 -0
  84. package/template/dist/server/chunk-NSOCT7E5.js +1 -0
  85. package/template/dist/server/chunk-OU5IGVVO.js +1 -0
  86. package/template/dist/server/chunk-OYCBNRMK.js +1 -0
  87. package/template/dist/server/chunk-P2RJNNGD.js +1 -0
  88. package/template/dist/server/chunk-UMAQLNPE.js +1 -0
  89. package/template/dist/server/chunk-XZZTSRSN.js +1 -0
  90. package/template/dist/server/content-service-5QVHDR5X.js +1 -0
  91. package/template/dist/server/db-FLI5L5DD.js +1 -0
  92. package/template/dist/server/dispute-service-E2FCYUEM.js +1 -0
  93. package/template/dist/server/init-72JXJV3I.js +46 -0
  94. package/template/dist/server/init-FWYXSKPX.js +46 -0
  95. package/template/dist/server/node.js +34 -28
  96. package/template/dist/server/order-service-TKGG5S5K.js +1 -0
  97. package/template/dist/server/permission-service-impl-M3AKEYNY.js +1 -0
  98. package/template/dist/server/schema-V4UG7HMU.js +1 -0
  99. package/template/dist/server/tenant-service-JG6UUWXQ.js +1 -0
  100. package/template/dist/server/tenant-service-XJWZSEDX.js +1 -0
  101. package/template/dist/{cloudflare/test-setup-NMZJZLRV.js → server/test-setup-VFOPBGYM.js} +83 -2
  102. package/template/dist/server/ticket-service-3RSW7V2Z.js +1 -0
  103. package/template/dist/server/todo-service-S6BGIO7D.js +1 -0
  104. package/template/src/merchant/pages/DisputesPage.tsx +11 -11
  105. package/template/src/merchant/pages/OrdersPage.tsx +4 -3
  106. package/template/src/merchant/pages/ProductsPage.tsx +2 -2
  107. package/template/src/merchant/stores/merchantStore.ts +11 -6
  108. package/template/src/server/db/init.ts +5 -642
  109. package/template/src/server/module-plugin/services/plugin-seed-service.ts +623 -0
  110. package/template/src/server/module-tenant/routes/tenant-routes.ts +2 -2
  111. package/template/src/server/module-tenant/services/tenant-service.ts +63 -17
  112. package/template/src/shared/modules/merchant/index.ts +9 -0
  113. package/template/src/shared/modules/merchant/schemas.ts +37 -0
  114. package/template/src/shared/modules/tenant/index.ts +2 -0
  115. package/template/src/shared/schemas/index.ts +27 -0
  116. package/template/src/tenant/layouts/Header.tsx +1 -1
  117. package/template/src/tenant/layouts/Sidebar.tsx +1 -1
  118. package/template/src/tenant/pages/SettingsPage.tsx +4 -8
  119. package/template/src/tenant/stores/tenantStore.ts +41 -302
  120. package/template/tsconfig.json +1 -0
  121. package/template/tsup.config.ts +11 -3
  122. package/template/dist/client/assets/ContentDetailPage-DdltMANL.js +0 -1
  123. package/template/dist/client/assets/ContentListPage-B63sUB6N.js +0 -1
  124. package/template/dist/client/assets/DashboardPage-tUMilc7Z.js +0 -11
  125. package/template/dist/client/assets/LoadingSpinner-DVYOLSRM.js +0 -6
  126. package/template/dist/client/assets/LoginPage-g9mSLIMC.js +0 -6
  127. package/template/dist/client/assets/NotificationPage-COTzp-HD.js +0 -1
  128. package/template/dist/client/assets/OrdersPage-BsPh4oEI.js +0 -11
  129. package/template/dist/client/assets/PluginsPage-BNtAe_yo.js +0 -6
  130. package/template/dist/client/assets/ProfilePage-dL_iSuZN.js +0 -16
  131. package/template/dist/client/assets/PublishPage-D96FnbLA.js +0 -1
  132. package/template/dist/client/assets/TopicsPage-DyLjZa4D.js +0 -6
  133. package/template/dist/client/assets/admin-Bh1vfz_L.js +0 -486
  134. package/template/dist/client/assets/index-1bA-ixFv.js +0 -114
  135. package/template/dist/client/assets/index-CWh3vXC_.css +0 -1
  136. package/template/dist/client/assets/main-DHnArIp_.js +0 -82
  137. package/template/dist/client/assets/pluginStore-XQfsm3iR.js +0 -1
  138. package/template/dist/client/content/content-1/index.html +0 -18
  139. package/template/dist/client/content/content-13/index.html +0 -18
  140. package/template/dist/client/content/content-14/index.html +0 -18
  141. package/template/dist/client/content/content-15/index.html +0 -18
  142. package/template/dist/client/content/content-19/index.html +0 -18
  143. package/template/dist/client/content/content-2/index.html +0 -18
  144. package/template/dist/client/content/content-20/index.html +0 -18
  145. package/template/dist/cloudflare/chunk-YY6FRMAQ.js +0 -14
  146. package/template/dist/cloudflare/db-7J42RQ3T.js +0 -1
  147. package/template/dist/cloudflare/permission-service-impl-TGXVSSSA.js +0 -1
@@ -363,8 +363,8 @@ async function seedDevelopersIfEmpty() {
363
363
 
364
364
  log.info({}, 'Seeding developers...')
365
365
 
366
- const demoPasswordHash = await hash('demo123')
367
- const adminPasswordHash = await hash('admin123')
366
+ const demoPasswordHash = await hash('demo123', 10)
367
+ const adminPasswordHash = await hash('admin123', 10)
368
368
 
369
369
  const sampleDevelopers = [
370
370
  {
@@ -372,7 +372,7 @@ async function seedDevelopersIfEmpty() {
372
372
  username: 'demo',
373
373
  email: 'demo@biomimic.app',
374
374
  passwordHash: demoPasswordHash,
375
- role: 'developer',
375
+ role: 'developer' as const,
376
376
  apiKey: generateUUID(),
377
377
  },
378
378
  {
@@ -380,7 +380,7 @@ async function seedDevelopersIfEmpty() {
380
380
  username: 'superadmin',
381
381
  email: 'admin@biomimic.app',
382
382
  passwordHash: adminPasswordHash,
383
- role: 'admin',
383
+ role: 'admin' as const,
384
384
  apiKey: generateUUID(),
385
385
  },
386
386
  ]
@@ -401,643 +401,6 @@ async function seedDevelopersIfEmpty() {
401
401
  }
402
402
  }
403
403
 
404
- async function seedPluginsIfEmpty() {
405
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- dynamic import for presets that may not have plugin module
406
- let plugins: any
407
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
408
- let pluginVersions: any
409
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
410
- let pluginCategories: any
411
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
412
- let pluginCategoryMappings: any
413
- try {
414
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
415
- const schema = (await import('./schema')) as Record<string, any>
416
- plugins = schema.plugins
417
- pluginVersions = schema.pluginVersions
418
- pluginCategories = schema.pluginCategories
419
- pluginCategoryMappings = schema.pluginCategoryMappings
420
- if (!plugins) return
421
- } catch {
422
- return
423
- }
424
-
425
- const db = await getDb()
426
-
427
- const existing = await db.select().from(plugins)
428
- if (existing.length > 0) return
429
-
430
- log.info({}, 'Seeding plugins...')
431
-
432
- const sampleCategories = [
433
- {
434
- id: generateUUID(),
435
- name: 'UI & Design',
436
- slug: 'ui-design',
437
- description: 'Visual customization and theming',
438
- icon: 'palette',
439
- sortOrder: 1,
440
- },
441
- {
442
- id: generateUUID(),
443
- name: 'Analytics',
444
- slug: 'analytics',
445
- description: 'Data tracking and reporting',
446
- icon: 'chart',
447
- sortOrder: 2,
448
- },
449
- {
450
- id: generateUUID(),
451
- name: 'SEO & Marketing',
452
- slug: 'seo-marketing',
453
- description: 'Search optimization and growth tools',
454
- icon: 'trending-up',
455
- sortOrder: 3,
456
- },
457
- {
458
- id: generateUUID(),
459
- name: 'Developer Tools',
460
- slug: 'developer-tools',
461
- description: 'Utilities for developers',
462
- icon: 'code',
463
- sortOrder: 4,
464
- },
465
- {
466
- id: generateUUID(),
467
- name: 'Integration',
468
- slug: 'integration',
469
- description: 'Third-party service integrations',
470
- icon: 'plug',
471
- sortOrder: 5,
472
- },
473
- ]
474
-
475
- await db.insert(pluginCategories).values(sampleCategories)
476
-
477
- const samplePlugins = [
478
- {
479
- id: generateUUID(),
480
- name: 'Theme Engine',
481
- slug: 'theme-engine',
482
- description:
483
- 'Advanced theming system with dark mode, custom color palettes, and responsive layout controls.',
484
- readme:
485
- '# Theme Engine\n\nA powerful theming plugin for customizing the look and feel of your application.',
486
- authorId: '1',
487
- authorName: 'superadmin',
488
- repositoryUrl: 'https://github.com/example/theme-engine',
489
- homepageUrl: 'https://theme-engine.example.com',
490
- license: 'MIT',
491
- version: '2.1.0',
492
- status: 'approved' as const,
493
- downloadCount: 1520,
494
- viewCount: 4320,
495
- featured: true,
496
- screenshotUrl: 'https://picsum.photos/seed/theme/800/400',
497
- tags: '["theme","dark-mode","customization"]',
498
- },
499
- {
500
- id: generateUUID(),
501
- slug: 'analytics-dashboard',
502
- name: 'Analytics Dashboard',
503
- description:
504
- 'Real-time analytics dashboard with charts, heatmaps, and user behavior tracking.',
505
- readme: '# Analytics Dashboard\n\nTrack user engagement and visualize data in real time.',
506
- authorId: '1',
507
- authorName: 'superadmin',
508
- repositoryUrl: 'https://github.com/example/analytics-dashboard',
509
- homepageUrl: 'https://analytics.example.com',
510
- license: 'Apache-2.0',
511
- version: '1.5.3',
512
- status: 'approved' as const,
513
- downloadCount: 980,
514
- viewCount: 2100,
515
- featured: true,
516
- screenshotUrl: 'https://picsum.photos/seed/analytics/800/400',
517
- tags: '["analytics","dashboard","charts"]',
518
- },
519
- {
520
- id: generateUUID(),
521
- slug: 'seo-optimizer',
522
- name: 'SEO Optimizer',
523
- description:
524
- 'Automated SEO optimization with meta tags, sitemap generation, and structured data support.',
525
- authorId: '2',
526
- authorName: 'customerservice',
527
- repositoryUrl: 'https://github.com/example/seo-optimizer',
528
- license: 'MIT',
529
- version: '1.2.0',
530
- status: 'approved' as const,
531
- downloadCount: 740,
532
- viewCount: 1800,
533
- featured: false,
534
- screenshotUrl: 'https://picsum.photos/seed/seo/800/400',
535
- tags: '["seo","meta","sitemap"]',
536
- },
537
- {
538
- id: generateUUID(),
539
- slug: 'api-toolkit',
540
- name: 'API Toolkit',
541
- description:
542
- 'Developer toolkit for building and testing REST APIs with auto-documentation and mock servers.',
543
- authorId: '2',
544
- authorName: 'customerservice',
545
- repositoryUrl: 'https://github.com/example/api-toolkit',
546
- homepageUrl: 'https://api-toolkit.example.com',
547
- license: 'MIT',
548
- version: '3.0.1',
549
- status: 'approved' as const,
550
- downloadCount: 2100,
551
- viewCount: 5600,
552
- featured: true,
553
- screenshotUrl: 'https://picsum.photos/seed/apitoolkit/800/400',
554
- tags: '["api","developer","testing","documentation"]',
555
- },
556
- {
557
- id: generateUUID(),
558
- slug: 'notification-hub',
559
- name: 'Notification Hub',
560
- description:
561
- 'Unified notification management supporting email, SMS, push, and in-app notifications.',
562
- authorId: '3',
563
- authorName: 'user1',
564
- repositoryUrl: 'https://github.com/example/notification-hub',
565
- license: 'ISC',
566
- version: '1.0.0',
567
- status: 'pending' as const,
568
- downloadCount: 0,
569
- viewCount: 50,
570
- featured: false,
571
- screenshotUrl: 'https://picsum.photos/seed/notify/800/400',
572
- tags: '["notification","email","push"]',
573
- },
574
- {
575
- id: generateUUID(),
576
- slug: 'form-builder',
577
- name: 'Form Builder',
578
- description:
579
- 'Drag-and-drop form creation with validation rules, conditional logic, and file uploads.',
580
- readme:
581
- '# Form Builder\n\nCreate complex forms with ease using our visual drag-and-drop builder.',
582
- authorId: '1',
583
- authorName: 'superadmin',
584
- repositoryUrl: 'https://github.com/example/form-builder',
585
- homepageUrl: 'https://form-builder.example.com',
586
- license: 'MIT',
587
- version: '3.2.1',
588
- status: 'approved' as const,
589
- downloadCount: 3420,
590
- viewCount: 8900,
591
- featured: true,
592
- screenshotUrl: 'https://picsum.photos/seed/formbuilder/800/400',
593
- tags: '["forms","validation","drag-drop"]',
594
- },
595
- {
596
- id: generateUUID(),
597
- slug: 'image-optimizer',
598
- name: 'Image Optimizer',
599
- description:
600
- 'Automatic image compression and format conversion with lazy loading and responsive srcset support.',
601
- readme: '# Image Optimizer\n\nOptimize images automatically for faster page loads.',
602
- authorId: '2',
603
- authorName: 'customerservice',
604
- repositoryUrl: 'https://github.com/example/image-optimizer',
605
- license: 'MIT',
606
- version: '2.0.0',
607
- status: 'approved' as const,
608
- downloadCount: 2890,
609
- viewCount: 6500,
610
- featured: false,
611
- screenshotUrl: 'https://picsum.photos/seed/imgopt/800/400',
612
- tags: '["image","optimization","performance"]',
613
- },
614
- {
615
- id: generateUUID(),
616
- slug: 'cache-manager',
617
- name: 'Cache Manager',
618
- description:
619
- 'Redis-powered caching layer with TTL management, cache invalidation, and tag-based purging.',
620
- readme: '# Cache Manager\n\nSmart caching for high-performance applications.',
621
- authorId: '1',
622
- authorName: 'superadmin',
623
- repositoryUrl: 'https://github.com/example/cache-manager',
624
- homepageUrl: 'https://cache-manager.example.com',
625
- license: 'Apache-2.0',
626
- version: '1.8.0',
627
- status: 'approved' as const,
628
- downloadCount: 1560,
629
- viewCount: 4200,
630
- featured: true,
631
- screenshotUrl: 'https://picsum.photos/seed/cache/800/400',
632
- tags: '["cache","redis","performance"]',
633
- },
634
- {
635
- id: generateUUID(),
636
- slug: 'auth-guard',
637
- name: 'Auth Guard',
638
- description:
639
- 'Advanced authentication flows with OAuth2, SAML, and biometric support including session management.',
640
- readme: '# Auth Guard\n\nEnterprise-grade authentication for modern apps.',
641
- authorId: '1',
642
- authorName: 'superadmin',
643
- repositoryUrl: 'https://github.com/example/auth-guard',
644
- homepageUrl: 'https://auth-guard.example.com',
645
- license: 'MIT',
646
- version: '4.1.0',
647
- status: 'approved' as const,
648
- downloadCount: 4210,
649
- viewCount: 9800,
650
- featured: true,
651
- screenshotUrl: 'https://picsum.photos/seed/authguard/800/400',
652
- tags: '["auth","oauth","security"]',
653
- },
654
- {
655
- id: generateUUID(),
656
- slug: 'payment-gateway',
657
- name: 'Payment Gateway',
658
- description:
659
- 'Stripe and PayPal integration with subscription management, invoicing, and refund handling.',
660
- readme: '# Payment Gateway\n\nAccept payments globally with multiple providers.',
661
- authorId: '2',
662
- authorName: 'customerservice',
663
- repositoryUrl: 'https://github.com/example/payment-gateway',
664
- homepageUrl: 'https://payment-gateway.example.com',
665
- license: 'MIT',
666
- version: '2.3.0',
667
- status: 'approved' as const,
668
- downloadCount: 3100,
669
- viewCount: 7800,
670
- featured: true,
671
- screenshotUrl: 'https://picsum.photos/seed/payment/800/400',
672
- tags: '["payment","stripe","subscription"]',
673
- },
674
- {
675
- id: generateUUID(),
676
- slug: 'chat-widget',
677
- name: 'Chat Widget',
678
- description:
679
- 'Real-time customer support chat with AI-powered auto-replies and conversation routing.',
680
- readme: '# Chat Widget\n\nLive chat support for your customers.',
681
- authorId: '3',
682
- authorName: 'user1',
683
- repositoryUrl: 'https://github.com/example/chat-widget',
684
- license: 'ISC',
685
- version: '1.4.2',
686
- status: 'approved' as const,
687
- downloadCount: 1870,
688
- viewCount: 5200,
689
- featured: false,
690
- screenshotUrl: 'https://picsum.photos/seed/chatwidget/800/400',
691
- tags: '["chat","support","real-time"]',
692
- },
693
- {
694
- id: generateUUID(),
695
- slug: 'backup-manager',
696
- name: 'Backup Manager',
697
- description:
698
- 'Automated database backups with scheduling, encryption, and cloud storage integration.',
699
- readme: '# Backup Manager\n\nNever lose data with automated backups.',
700
- authorId: '1',
701
- authorName: 'superadmin',
702
- repositoryUrl: 'https://github.com/example/backup-manager',
703
- license: 'MIT',
704
- version: '1.1.0',
705
- status: 'approved' as const,
706
- downloadCount: 980,
707
- viewCount: 2900,
708
- featured: false,
709
- screenshotUrl: 'https://picsum.photos/seed/backup/800/400',
710
- tags: '["backup","database","scheduling"]',
711
- },
712
- {
713
- id: generateUUID(),
714
- slug: 'rate-limiter',
715
- name: 'Rate Limiter',
716
- description:
717
- 'API rate limiting middleware with sliding window, token bucket, and fixed window algorithms.',
718
- readme: '# Rate Limiter\n\nProtect your APIs from abuse.',
719
- authorId: '2',
720
- authorName: 'customerservice',
721
- repositoryUrl: 'https://github.com/example/rate-limiter',
722
- homepageUrl: 'https://rate-limiter.example.com',
723
- license: 'MIT',
724
- version: '2.0.0',
725
- status: 'approved' as const,
726
- downloadCount: 1340,
727
- viewCount: 3800,
728
- featured: false,
729
- screenshotUrl: 'https://picsum.photos/seed/ratelimit/800/400',
730
- tags: '["rate-limit","api","middleware"]',
731
- },
732
- {
733
- id: generateUUID(),
734
- slug: 'email-templates',
735
- name: 'Email Templates',
736
- description:
737
- 'Responsive email builder with template variables, preview mode, and SMTP integration.',
738
- readme: '# Email Templates\n\nBeautiful emails that work everywhere.',
739
- authorId: '3',
740
- authorName: 'user1',
741
- repositoryUrl: 'https://github.com/example/email-templates',
742
- license: 'Apache-2.0',
743
- version: '1.6.0',
744
- status: 'approved' as const,
745
- downloadCount: 2100,
746
- viewCount: 5600,
747
- featured: false,
748
- screenshotUrl: 'https://picsum.photos/seed/emailtpl/800/400',
749
- tags: '["email","templates","smtp"]',
750
- },
751
- {
752
- id: generateUUID(),
753
- slug: 'search-engine',
754
- name: 'Search Engine',
755
- description:
756
- 'Elasticsearch integration with faceted search, autocomplete, and relevance tuning.',
757
- readme: '# Search Engine\n\nPowerful full-text search for your application.',
758
- authorId: '1',
759
- authorName: 'superadmin',
760
- repositoryUrl: 'https://github.com/example/search-engine',
761
- homepageUrl: 'https://search-engine.example.com',
762
- license: 'MIT',
763
- version: '3.0.0',
764
- status: 'approved' as const,
765
- downloadCount: 2560,
766
- viewCount: 7100,
767
- featured: true,
768
- screenshotUrl: 'https://picsum.photos/seed/searcheng/800/400',
769
- tags: '["search","elasticsearch","full-text"]',
770
- },
771
- {
772
- id: generateUUID(),
773
- slug: 'cdn-manager',
774
- name: 'CDN Manager',
775
- description:
776
- 'Content delivery network controls with cache purging, URL signing, and geo-routing.',
777
- readme: '# CDN Manager\n\nDeliver content faster globally.',
778
- authorId: '2',
779
- authorName: 'customerservice',
780
- repositoryUrl: 'https://github.com/example/cdn-manager',
781
- license: 'MIT',
782
- version: '1.3.0',
783
- status: 'approved' as const,
784
- downloadCount: 870,
785
- viewCount: 2400,
786
- featured: false,
787
- screenshotUrl: 'https://picsum.photos/seed/cdn/800/400',
788
- tags: '["cdn","caching","delivery"]',
789
- },
790
- {
791
- id: generateUUID(),
792
- slug: 'logger-pro',
793
- name: 'Logger Pro',
794
- description:
795
- 'Structured logging with severity levels, log rotation, and remote aggregation support.',
796
- readme: '# Logger Pro\n\nEnterprise logging made simple.',
797
- authorId: '1',
798
- authorName: 'superadmin',
799
- repositoryUrl: 'https://github.com/example/logger-pro',
800
- license: 'BSD-3-Clause',
801
- version: '2.1.0',
802
- status: 'approved' as const,
803
- downloadCount: 1190,
804
- viewCount: 3300,
805
- featured: false,
806
- screenshotUrl: 'https://picsum.photos/seed/logger/800/400',
807
- tags: '["logging","monitoring","structured"]',
808
- },
809
- {
810
- id: generateUUID(),
811
- slug: 'task-scheduler',
812
- name: 'Task Scheduler',
813
- description:
814
- 'Cron job management with retry policies, concurrency controls, and execution history.',
815
- readme: '# Task Scheduler\n\nAutomate recurring tasks with confidence.',
816
- authorId: '3',
817
- authorName: 'user1',
818
- repositoryUrl: 'https://github.com/example/task-scheduler',
819
- homepageUrl: 'https://task-scheduler.example.com',
820
- license: 'MIT',
821
- version: '1.5.0',
822
- status: 'approved' as const,
823
- downloadCount: 1780,
824
- viewCount: 4900,
825
- featured: false,
826
- screenshotUrl: 'https://picsum.photos/seed/tasksched/800/400',
827
- tags: '["scheduler","cron","automation"]',
828
- },
829
- {
830
- id: generateUUID(),
831
- slug: 'ab-testing',
832
- name: 'A/B Testing',
833
- description:
834
- 'Experiment framework with statistical significance calculation and variant allocation.',
835
- readme: '# A/B Testing\n\nData-driven decisions through controlled experiments.',
836
- authorId: '1',
837
- authorName: 'superadmin',
838
- repositoryUrl: 'https://github.com/example/ab-testing',
839
- license: 'Apache-2.0',
840
- version: '1.0.0',
841
- status: 'approved' as const,
842
- downloadCount: 640,
843
- viewCount: 2100,
844
- featured: false,
845
- screenshotUrl: 'https://picsum.photos/seed/abtest/800/400',
846
- tags: '["testing","experiment","analytics"]',
847
- },
848
- {
849
- id: generateUUID(),
850
- slug: 'markdown-editor',
851
- name: 'Markdown Editor',
852
- description:
853
- 'Rich text editing with Markdown support, syntax highlighting, and live preview.',
854
- readme: '# Markdown Editor\n\nWrite beautifully with Markdown.',
855
- authorId: '2',
856
- authorName: 'customerservice',
857
- repositoryUrl: 'https://github.com/example/markdown-editor',
858
- homepageUrl: 'https://md-editor.example.com',
859
- license: 'MIT',
860
- version: '2.4.0',
861
- status: 'approved' as const,
862
- downloadCount: 2950,
863
- viewCount: 7400,
864
- featured: true,
865
- screenshotUrl: 'https://picsum.photos/seed/mdeditor/800/400',
866
- tags: '["markdown","editor","rich-text"]',
867
- },
868
- {
869
- id: generateUUID(),
870
- slug: 'webhook-manager',
871
- name: 'Webhook Manager',
872
- description:
873
- 'Outgoing webhook automation with retry logic, payload templating, and delivery tracking.',
874
- readme: '# Webhook Manager\n\nReliable webhook delivery for your integrations.',
875
- authorId: '3',
876
- authorName: 'user1',
877
- repositoryUrl: 'https://github.com/example/webhook-manager',
878
- license: 'MIT',
879
- version: '1.2.0',
880
- status: 'pending' as const,
881
- downloadCount: 520,
882
- viewCount: 1800,
883
- featured: false,
884
- screenshotUrl: 'https://picsum.photos/seed/webhook/800/400',
885
- tags: '["webhook","automation","integration"]',
886
- },
887
- {
888
- id: generateUUID(),
889
- slug: 'two-factor-auth',
890
- name: 'Two-Factor Auth',
891
- description: '2FA/MFA support with TOTP, SMS OTP, and hardware key authentication methods.',
892
- readme: '# Two-Factor Auth\n\nAdd an extra layer of security.',
893
- authorId: '1',
894
- authorName: 'superadmin',
895
- repositoryUrl: 'https://github.com/example/two-factor-auth',
896
- license: 'MIT',
897
- version: '1.7.0',
898
- status: 'approved' as const,
899
- downloadCount: 2340,
900
- viewCount: 6100,
901
- featured: false,
902
- screenshotUrl: 'https://picsum.photos/seed/2fa/800/400',
903
- tags: '["2fa","security","authentication"]',
904
- },
905
- {
906
- id: generateUUID(),
907
- slug: 'database-browser',
908
- name: 'Database Browser',
909
- description:
910
- 'GUI interface for browsing tables, running queries, and visualizing schema relationships.',
911
- readme: '# Database Browser\n\nExplore your data visually.',
912
- authorId: '2',
913
- authorName: 'customerservice',
914
- repositoryUrl: 'https://github.com/example/database-browser',
915
- license: 'GPL-3.0',
916
- version: '1.0.0',
917
- status: 'pending' as const,
918
- downloadCount: 340,
919
- viewCount: 1200,
920
- featured: false,
921
- screenshotUrl: 'https://picsum.photos/seed/dbbrowser/800/400',
922
- tags: '["database","gui","query"]',
923
- },
924
- {
925
- id: generateUUID(),
926
- slug: 'performance-monitor',
927
- name: 'Performance Monitor',
928
- description:
929
- 'Core Web Vitals tracking with real user monitoring, alerts, and performance budgets.',
930
- readme: '# Performance Monitor\n\nKeep your app fast and responsive.',
931
- authorId: '1',
932
- authorName: 'superadmin',
933
- repositoryUrl: 'https://github.com/example/performance-monitor',
934
- homepageUrl: 'https://perf-monitor.example.com',
935
- license: 'MIT',
936
- version: '2.0.0',
937
- status: 'approved' as const,
938
- downloadCount: 1890,
939
- viewCount: 5300,
940
- featured: true,
941
- screenshotUrl: 'https://picsum.photos/seed/perfmon/800/400',
942
- tags: '["performance","monitoring","web-vitals"]',
943
- },
944
- {
945
- id: generateUUID(),
946
- slug: 'i18n-manager',
947
- name: 'i18n Manager',
948
- description:
949
- 'Internationalization toolkit with translation memory, pluralization, and RTL support.',
950
- readme: '# i18n Manager\n\nGo global with multilingual support.',
951
- authorId: '3',
952
- authorName: 'user1',
953
- repositoryUrl: 'https://github.com/example/i18n-manager',
954
- license: 'MIT',
955
- version: '1.3.0',
956
- status: 'approved' as const,
957
- downloadCount: 1450,
958
- viewCount: 4100,
959
- featured: false,
960
- screenshotUrl: 'https://picsum.photos/seed/i18n/800/400',
961
- tags: '["i18n","translation","localization"]',
962
- },
963
- ]
964
-
965
- await db.insert(plugins).values(samplePlugins)
966
-
967
- const sampleVersions = [
968
- {
969
- id: generateUUID(),
970
- pluginId: samplePlugins[0].id,
971
- version: '2.1.0',
972
- changelog: 'Added responsive layout controls',
973
- status: 'approved' as const,
974
- },
975
- {
976
- id: generateUUID(),
977
- pluginId: samplePlugins[0].id,
978
- version: '2.0.0',
979
- changelog: 'Major rewrite with dark mode support',
980
- status: 'approved' as const,
981
- },
982
- {
983
- id: generateUUID(),
984
- pluginId: samplePlugins[1].id,
985
- version: '1.5.3',
986
- changelog: 'Fixed heatmap rendering',
987
- status: 'approved' as const,
988
- },
989
- {
990
- id: generateUUID(),
991
- pluginId: samplePlugins[1].id,
992
- version: '1.5.0',
993
- changelog: 'Added real-time tracking',
994
- status: 'approved' as const,
995
- },
996
- {
997
- id: generateUUID(),
998
- pluginId: samplePlugins[2].id,
999
- version: '1.2.0',
1000
- changelog: 'Structured data support',
1001
- status: 'approved' as const,
1002
- },
1003
- {
1004
- id: generateUUID(),
1005
- pluginId: samplePlugins[3].id,
1006
- version: '3.0.1',
1007
- changelog: 'Auto-documentation improvements',
1008
- status: 'approved' as const,
1009
- },
1010
- {
1011
- id: generateUUID(),
1012
- pluginId: samplePlugins[3].id,
1013
- version: '3.0.0',
1014
- changelog: 'Major version with mock server',
1015
- status: 'approved' as const,
1016
- },
1017
- {
1018
- id: generateUUID(),
1019
- pluginId: samplePlugins[4].id,
1020
- version: '1.0.0',
1021
- changelog: 'Initial release',
1022
- status: 'pending' as const,
1023
- },
1024
- ]
1025
-
1026
- await db.insert(pluginVersions).values(sampleVersions)
1027
-
1028
- const sampleMappings = [
1029
- { pluginId: samplePlugins[0].id, categoryId: sampleCategories[0].id },
1030
- { pluginId: samplePlugins[1].id, categoryId: sampleCategories[1].id },
1031
- { pluginId: samplePlugins[2].id, categoryId: sampleCategories[2].id },
1032
- { pluginId: samplePlugins[3].id, categoryId: sampleCategories[3].id },
1033
- { pluginId: samplePlugins[4].id, categoryId: sampleCategories[4].id },
1034
- ]
1035
-
1036
- await db.insert(pluginCategoryMappings).values(sampleMappings)
1037
-
1038
- log.info({}, 'Plugin seeding complete!')
1039
- }
1040
-
1041
404
  export async function initializeDatabase() {
1042
405
  const db = await getDb()
1043
406
 
@@ -1094,7 +457,7 @@ export async function initializeDatabase() {
1094
457
  () => import('../module-dispute/services/dispute-service').then(m => m.seedDisputesIfEmpty()),
1095
458
  () => import('../module-content/services/content-service').then(m => m.seedContentsIfEmpty()),
1096
459
  () => import('../module-tenant/services/tenant-service').then(m => m.seedTenantsIfEmpty()),
1097
- () => seedPluginsIfEmpty(),
460
+ () => import('../module-plugin/services/plugin-seed-service').then(m => m.seedPluginsIfEmpty()),
1098
461
  ]
1099
462
  await Promise.all(moduleSeeders.map(fn => fn().catch(() => {})))
1100
463
  log.info({}, 'Module data seeding complete!')