@digilogiclabs/create-saas-app 2.11.0 → 2.12.0

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 (358) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/cli/index.js +1 -1
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/generators/template-generator.d.ts.map +1 -1
  6. package/dist/generators/template-generator.js +15 -8
  7. package/dist/generators/template-generator.js.map +1 -1
  8. package/dist/templates/shared/admin/web/src/components/admin-nav.tsx +3 -3
  9. package/dist/templates/shared/auth/supabase/web/src/lib/auth-session.ts +36 -16
  10. package/dist/templates/shared/auth/supabase/web/src/middleware.ts +6 -0
  11. package/dist/templates/shared/cookie-consent/web/components/cookie-consent.tsx +5 -5
  12. package/dist/templates/shared/design/web/src/components/ui/button.tsx +56 -0
  13. package/dist/templates/shared/email/web/src/lib/email/client.ts +1 -1
  14. package/dist/templates/shared/error-pages/web/src/app/error.tsx +13 -11
  15. package/dist/templates/shared/error-pages/web/src/app/global-error.tsx +2 -0
  16. package/dist/templates/shared/error-pages/web/src/app/not-found.tsx +6 -6
  17. package/dist/templates/shared/legal/web/src/app/(legal)/privacy/page.tsx +4 -4
  18. package/dist/templates/shared/legal/web/src/app/(legal)/terms/page.tsx +4 -4
  19. package/dist/templates/shared/loading/web/components/skeleton.tsx +4 -4
  20. package/dist/templates/shared/mock/web/.env.local +55 -0
  21. package/dist/templates/shared/mock/web/src/components/mock-auth-provider.tsx +72 -0
  22. package/dist/templates/shared/mock/web/src/components/mock-banner.tsx +29 -0
  23. package/dist/templates/shared/mock/web/src/lib/mock.ts +147 -0
  24. package/dist/templates/shared/payments/web/src/app/api/webhooks/stripe/route.ts +10 -4
  25. package/dist/templates/shared/redis/web/src/lib/redis.ts +1 -1
  26. package/dist/templates/web/base/template/eslint.config.mjs +14 -0
  27. package/dist/templates/web/base/template/src/app/auth/callback/route.ts +1 -1
  28. package/dist/templates/web/base/template/src/app/checkout/page.tsx +76 -103
  29. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +145 -329
  30. package/dist/templates/web/base/template/src/app/layout.tsx +40 -38
  31. package/dist/templates/web/base/template/src/app/login/page.tsx +116 -66
  32. package/dist/templates/web/base/template/src/app/page.tsx +97 -193
  33. package/dist/templates/web/base/template/src/app/settings/page.tsx +154 -0
  34. package/dist/templates/web/base/template/src/app/signup/page.tsx +117 -66
  35. package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +8 -3
  36. package/dist/templates/web/base/template/src/components/shared/header.tsx +229 -63
  37. package/dist/templates/web/ui-auth/template/eslint.config.mjs +14 -0
  38. package/dist/templates/web/ui-auth/template/src/app/checkout/page.tsx +3 -3
  39. package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +81 -91
  40. package/dist/templates/web/ui-auth/template/src/app/layout.tsx +38 -36
  41. package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +22 -45
  42. package/dist/templates/web/ui-auth/template/src/app/page.tsx +106 -306
  43. package/dist/templates/web/ui-auth/template/src/app/setup/page.tsx +387 -402
  44. package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +24 -47
  45. package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +8 -3
  46. package/dist/templates/web/ui-auth/template/src/components/shared/header.tsx +229 -94
  47. package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +38 -45
  48. package/dist/templates/web/ui-auth-ai/template/src/app/login/page.tsx +86 -0
  49. package/dist/templates/web/ui-auth-ai/template/src/app/page.tsx +107 -193
  50. package/dist/templates/web/ui-auth-ai/template/src/app/signup/page.tsx +105 -0
  51. package/dist/templates/web/ui-auth-ai/template/src/components/ai/audio-generator.tsx +144 -140
  52. package/dist/templates/web/ui-auth-ai/template/src/components/ai/video-generator.tsx +156 -157
  53. package/dist/templates/web/ui-auth-ai/template/src/components/auth/login-form.tsx +7 -3
  54. package/dist/templates/web/ui-auth-ai/template/src/components/providers/app-providers.tsx +25 -0
  55. package/dist/templates/web/ui-auth-ai/template/src/components/shared/footer.tsx +36 -0
  56. package/dist/templates/web/ui-auth-ai/template/src/components/shared/header.tsx +228 -0
  57. package/dist/templates/web/ui-auth-ai/template/src/components/ui/button.tsx +5 -5
  58. package/dist/templates/web/ui-auth-ai/template/src/components/ui/input.tsx +1 -1
  59. package/dist/templates/web/ui-auth-ai/template/src/components/ui/select.tsx +1 -1
  60. package/dist/templates/web/ui-auth-ai/template/src/components/ui/textarea.tsx +1 -1
  61. package/dist/templates/web/ui-auth-ai/template/src/components/ui/theme-toggle.tsx +34 -0
  62. package/dist/templates/web/ui-auth-ai/template/src/lib/supabase.ts +6 -4
  63. package/dist/templates/web/ui-auth-ai/template/src/providers/auth-provider.tsx +7 -5
  64. package/dist/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +63 -192
  65. package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +104 -296
  66. package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +27 -27
  67. package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +70 -81
  68. package/dist/templates/web/ui-auth-payments/template/src/app/layout.tsx +38 -36
  69. package/dist/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +9 -9
  70. package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +4 -104
  71. package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +69 -337
  72. package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +55 -68
  73. package/dist/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +13 -13
  74. package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +4 -123
  75. package/dist/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +37 -52
  76. package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +49 -103
  77. package/dist/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +4 -4
  78. package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +60 -140
  79. package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +25 -28
  80. package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +229 -230
  81. package/dist/templates/web/ui-auth-payments/template/src/lib/actions/auth.ts +245 -245
  82. package/dist/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +339 -339
  83. package/dist/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +305 -309
  84. package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +62 -312
  85. package/dist/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +109 -125
  86. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +27 -27
  87. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +68 -83
  88. package/dist/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +40 -38
  89. package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +20 -20
  90. package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +140 -394
  91. package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +28 -27
  92. package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +51 -66
  93. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +37 -52
  94. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +50 -79
  95. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +58 -111
  96. package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +8 -3
  97. package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +229 -252
  98. package/dist/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +245 -245
  99. package/dist/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +63 -192
  100. package/dist/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +109 -125
  101. package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +27 -27
  102. package/dist/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +40 -38
  103. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +122 -385
  104. package/dist/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +340 -344
  105. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +37 -52
  106. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +49 -103
  107. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +60 -140
  108. package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +8 -3
  109. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +229 -252
  110. package/dist/templates/web/ui-auth-payments-audio/template/src/lib/actions/auth.ts +3 -3
  111. package/dist/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +63 -192
  112. package/dist/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +109 -125
  113. package/dist/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +38 -36
  114. package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +9 -109
  115. package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +132 -392
  116. package/dist/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +346 -350
  117. package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +9 -128
  118. package/dist/templates/web/ui-auth-payments-video/template/src/components/client/login-form.tsx +90 -0
  119. package/dist/templates/web/ui-auth-payments-video/template/src/components/client/signup-form.tsx +105 -0
  120. package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +8 -3
  121. package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +229 -246
  122. package/dist/templates/web/ui-only/template/eslint.config.mjs +14 -0
  123. package/dist/templates/web/ui-only/template/src/app/checkout/page.tsx +2 -2
  124. package/dist/templates/web/ui-only/template/src/app/login/page.tsx +69 -63
  125. package/dist/templates/web/ui-only/template/src/app/page.tsx +69 -91
  126. package/dist/templates/web/ui-only/template/src/app/signup/page.tsx +94 -79
  127. package/dist/templates/web/ui-only/template/src/components/providers/app-providers.tsx +1 -6
  128. package/dist/templates/web/ui-only/template/src/components/shared/header.tsx +90 -53
  129. package/dist/templates/web/ui-package-test/template/package.json +19 -23
  130. package/dist/templates/web/ui-package-test/template/postcss.config.mjs +8 -0
  131. package/dist/templates/web/ui-package-test/template/src/app/globals.css +88 -0
  132. package/dist/templates/web/ui-package-test/template/src/app/layout.tsx +27 -0
  133. package/dist/templates/web/ui-package-test/template/src/app/page.tsx +46 -106
  134. package/package.json +1 -1
  135. package/src/templates/shared/admin/web/src/components/admin-nav.tsx +3 -3
  136. package/src/templates/shared/auth/supabase/web/src/lib/auth-session.ts +36 -16
  137. package/src/templates/shared/auth/supabase/web/src/middleware.ts +6 -0
  138. package/src/templates/shared/cookie-consent/web/components/cookie-consent.tsx +5 -5
  139. package/src/templates/shared/design/web/src/components/ui/button.tsx +56 -0
  140. package/src/templates/shared/email/web/src/lib/email/client.ts +1 -1
  141. package/src/templates/shared/error-pages/web/src/app/error.tsx +13 -11
  142. package/src/templates/shared/error-pages/web/src/app/global-error.tsx +2 -0
  143. package/src/templates/shared/error-pages/web/src/app/not-found.tsx +6 -6
  144. package/src/templates/shared/legal/web/src/app/(legal)/privacy/page.tsx +4 -4
  145. package/src/templates/shared/legal/web/src/app/(legal)/terms/page.tsx +4 -4
  146. package/src/templates/shared/loading/web/components/skeleton.tsx +4 -4
  147. package/src/templates/shared/mock/web/.env.local +55 -0
  148. package/src/templates/shared/mock/web/src/components/mock-auth-provider.tsx +72 -0
  149. package/src/templates/shared/mock/web/src/components/mock-banner.tsx +29 -0
  150. package/src/templates/shared/mock/web/src/lib/mock.ts +147 -0
  151. package/src/templates/shared/payments/web/src/app/api/webhooks/stripe/route.ts +10 -4
  152. package/src/templates/shared/redis/web/src/lib/redis.ts +1 -1
  153. package/src/templates/web/base/template/eslint.config.mjs +14 -0
  154. package/src/templates/web/base/template/src/app/auth/callback/route.ts +1 -1
  155. package/src/templates/web/base/template/src/app/checkout/page.tsx +76 -103
  156. package/src/templates/web/base/template/src/app/dashboard/page.tsx +145 -329
  157. package/src/templates/web/base/template/src/app/layout.tsx +40 -38
  158. package/src/templates/web/base/template/src/app/login/page.tsx +116 -66
  159. package/src/templates/web/base/template/src/app/page.tsx +97 -193
  160. package/src/templates/web/base/template/src/app/settings/page.tsx +154 -0
  161. package/src/templates/web/base/template/src/app/signup/page.tsx +117 -66
  162. package/src/templates/web/base/template/src/components/providers/app-providers.tsx +8 -3
  163. package/src/templates/web/base/template/src/components/shared/header.tsx +229 -63
  164. package/src/templates/web/ui-auth/template/eslint.config.mjs +14 -0
  165. package/src/templates/web/ui-auth/template/src/app/checkout/page.tsx +3 -3
  166. package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +81 -91
  167. package/src/templates/web/ui-auth/template/src/app/layout.tsx +38 -36
  168. package/src/templates/web/ui-auth/template/src/app/login/page.tsx +22 -45
  169. package/src/templates/web/ui-auth/template/src/app/page.tsx +106 -306
  170. package/src/templates/web/ui-auth/template/src/app/setup/page.tsx +387 -402
  171. package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +24 -47
  172. package/src/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +8 -3
  173. package/src/templates/web/ui-auth/template/src/components/shared/header.tsx +229 -94
  174. package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +38 -45
  175. package/src/templates/web/ui-auth-ai/template/src/app/login/page.tsx +86 -0
  176. package/src/templates/web/ui-auth-ai/template/src/app/page.tsx +107 -193
  177. package/src/templates/web/ui-auth-ai/template/src/app/signup/page.tsx +105 -0
  178. package/src/templates/web/ui-auth-ai/template/src/components/ai/audio-generator.tsx +144 -140
  179. package/src/templates/web/ui-auth-ai/template/src/components/ai/video-generator.tsx +156 -157
  180. package/src/templates/web/ui-auth-ai/template/src/components/auth/login-form.tsx +7 -3
  181. package/src/templates/web/ui-auth-ai/template/src/components/providers/app-providers.tsx +25 -0
  182. package/src/templates/web/ui-auth-ai/template/src/components/shared/footer.tsx +36 -0
  183. package/src/templates/web/ui-auth-ai/template/src/components/shared/header.tsx +228 -0
  184. package/src/templates/web/ui-auth-ai/template/src/components/ui/button.tsx +5 -5
  185. package/src/templates/web/ui-auth-ai/template/src/components/ui/input.tsx +1 -1
  186. package/src/templates/web/ui-auth-ai/template/src/components/ui/select.tsx +1 -1
  187. package/src/templates/web/ui-auth-ai/template/src/components/ui/textarea.tsx +1 -1
  188. package/src/templates/web/ui-auth-ai/template/src/components/ui/theme-toggle.tsx +34 -0
  189. package/src/templates/web/ui-auth-ai/template/src/lib/supabase.ts +6 -4
  190. package/src/templates/web/ui-auth-ai/template/src/providers/auth-provider.tsx +7 -5
  191. package/src/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +63 -192
  192. package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +104 -296
  193. package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +27 -27
  194. package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +70 -81
  195. package/src/templates/web/ui-auth-payments/template/src/app/layout.tsx +38 -36
  196. package/src/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +9 -9
  197. package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +4 -104
  198. package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +69 -337
  199. package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +55 -68
  200. package/src/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +13 -13
  201. package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +4 -123
  202. package/src/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +37 -52
  203. package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +49 -103
  204. package/src/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +4 -4
  205. package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +60 -140
  206. package/src/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +25 -28
  207. package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +229 -230
  208. package/src/templates/web/ui-auth-payments/template/src/lib/actions/auth.ts +245 -245
  209. package/src/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +339 -339
  210. package/src/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +305 -309
  211. package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +62 -312
  212. package/src/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +109 -125
  213. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +27 -27
  214. package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +68 -83
  215. package/src/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +40 -38
  216. package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +20 -20
  217. package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +140 -394
  218. package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +28 -27
  219. package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +51 -66
  220. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +37 -52
  221. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +50 -79
  222. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +58 -111
  223. package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +8 -3
  224. package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +229 -252
  225. package/src/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +245 -245
  226. package/src/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +63 -192
  227. package/src/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +109 -125
  228. package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +27 -27
  229. package/src/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +40 -38
  230. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +122 -385
  231. package/src/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +340 -344
  232. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +37 -52
  233. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +49 -103
  234. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +60 -140
  235. package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +8 -3
  236. package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +229 -252
  237. package/src/templates/web/ui-auth-payments-audio/template/src/lib/actions/auth.ts +3 -3
  238. package/src/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +63 -192
  239. package/src/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +109 -125
  240. package/src/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +38 -36
  241. package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +9 -109
  242. package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +132 -392
  243. package/src/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +346 -350
  244. package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +9 -128
  245. package/src/templates/web/ui-auth-payments-video/template/src/components/client/login-form.tsx +90 -0
  246. package/src/templates/web/ui-auth-payments-video/template/src/components/client/signup-form.tsx +105 -0
  247. package/src/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +8 -3
  248. package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +229 -246
  249. package/src/templates/web/ui-only/template/eslint.config.mjs +14 -0
  250. package/src/templates/web/ui-only/template/src/app/checkout/page.tsx +2 -2
  251. package/src/templates/web/ui-only/template/src/app/login/page.tsx +69 -63
  252. package/src/templates/web/ui-only/template/src/app/page.tsx +69 -91
  253. package/src/templates/web/ui-only/template/src/app/signup/page.tsx +94 -79
  254. package/src/templates/web/ui-only/template/src/components/providers/app-providers.tsx +1 -6
  255. package/src/templates/web/ui-only/template/src/components/shared/header.tsx +90 -53
  256. package/src/templates/web/ui-package-test/template/package.json +19 -23
  257. package/src/templates/web/ui-package-test/template/postcss.config.mjs +8 -0
  258. package/src/templates/web/ui-package-test/template/src/app/globals.css +88 -0
  259. package/src/templates/web/ui-package-test/template/src/app/layout.tsx +27 -0
  260. package/src/templates/web/ui-package-test/template/src/app/page.tsx +46 -106
  261. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/README.md +0 -655
  262. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/(tabs)/ai.tsx +0 -683
  263. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +0 -124
  264. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app.json +0 -74
  265. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/babel.config.js +0 -25
  266. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/docs/MOBILE-SETUP.md +0 -787
  267. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/eas.json +0 -25
  268. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/expo-env.d.ts +0 -3
  269. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -346
  270. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/jest-setup.ts +0 -37
  271. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -180
  272. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/metro.config.js +0 -11
  273. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/package.json +0 -122
  274. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -599
  275. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/tsconfig.json +0 -32
  276. package/dist/templates/web/base/template/.eslintrc.js +0 -8
  277. package/dist/templates/web/base/template/src/components/__tests__/example.test.tsx +0 -49
  278. package/dist/templates/web/base/template/src/test/setup.ts +0 -74
  279. package/dist/templates/web/base/template/vitest.config.ts +0 -17
  280. package/dist/templates/web/ui-auth/template/.eslintrc.js +0 -8
  281. package/dist/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +0 -49
  282. package/dist/templates/web/ui-auth/template/src/test/setup.ts +0 -74
  283. package/dist/templates/web/ui-auth/template/vitest.config.ts +0 -17
  284. package/dist/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +0 -49
  285. package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +0 -74
  286. package/dist/templates/web/ui-auth-payments/template/vitest.config.ts +0 -17
  287. package/dist/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +0 -49
  288. package/dist/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +0 -74
  289. package/dist/templates/web/ui-auth-payments-ai/template/vitest.config.ts +0 -17
  290. package/dist/templates/web/ui-auth-payments-ai-rag/template/README.md +0 -434
  291. package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/KnowledgeManager.tsx +0 -642
  292. package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGAnalytics.tsx +0 -466
  293. package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGChatInterface.tsx +0 -393
  294. package/dist/templates/web/ui-auth-payments-ai-rag/template/docs/GETTING-STARTED.md +0 -457
  295. package/dist/templates/web/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -478
  296. package/dist/templates/web/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -250
  297. package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +0 -73
  298. package/dist/templates/web/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -622
  299. package/dist/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +0 -396
  300. package/dist/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +0 -49
  301. package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +0 -74
  302. package/dist/templates/web/ui-auth-payments-audio/template/vitest.config.ts +0 -17
  303. package/dist/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +0 -49
  304. package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +0 -74
  305. package/dist/templates/web/ui-auth-payments-video/template/vitest.config.ts +0 -17
  306. package/dist/templates/web/ui-only/template/.eslintrc.js +0 -8
  307. package/dist/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +0 -49
  308. package/dist/templates/web/ui-only/template/src/test/setup.ts +0 -74
  309. package/dist/templates/web/ui-only/template/vitest.config.ts +0 -17
  310. package/src/templates/mobile/ui-auth-payments-ai-rag/template/README.md +0 -655
  311. package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/(tabs)/ai.tsx +0 -683
  312. package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +0 -124
  313. package/src/templates/mobile/ui-auth-payments-ai-rag/template/app.json +0 -74
  314. package/src/templates/mobile/ui-auth-payments-ai-rag/template/babel.config.js +0 -25
  315. package/src/templates/mobile/ui-auth-payments-ai-rag/template/docs/MOBILE-SETUP.md +0 -787
  316. package/src/templates/mobile/ui-auth-payments-ai-rag/template/eas.json +0 -25
  317. package/src/templates/mobile/ui-auth-payments-ai-rag/template/expo-env.d.ts +0 -3
  318. package/src/templates/mobile/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -346
  319. package/src/templates/mobile/ui-auth-payments-ai-rag/template/jest-setup.ts +0 -37
  320. package/src/templates/mobile/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -180
  321. package/src/templates/mobile/ui-auth-payments-ai-rag/template/metro.config.js +0 -11
  322. package/src/templates/mobile/ui-auth-payments-ai-rag/template/package.json +0 -122
  323. package/src/templates/mobile/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -599
  324. package/src/templates/mobile/ui-auth-payments-ai-rag/template/tsconfig.json +0 -32
  325. package/src/templates/web/base/template/.eslintrc.js +0 -8
  326. package/src/templates/web/base/template/src/components/__tests__/example.test.tsx +0 -49
  327. package/src/templates/web/base/template/src/test/setup.ts +0 -74
  328. package/src/templates/web/base/template/vitest.config.ts +0 -17
  329. package/src/templates/web/ui-auth/template/.eslintrc.js +0 -8
  330. package/src/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +0 -49
  331. package/src/templates/web/ui-auth/template/src/test/setup.ts +0 -74
  332. package/src/templates/web/ui-auth/template/vitest.config.ts +0 -17
  333. package/src/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +0 -49
  334. package/src/templates/web/ui-auth-payments/template/src/test/setup.ts +0 -74
  335. package/src/templates/web/ui-auth-payments/template/vitest.config.ts +0 -17
  336. package/src/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +0 -49
  337. package/src/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +0 -74
  338. package/src/templates/web/ui-auth-payments-ai/template/vitest.config.ts +0 -17
  339. package/src/templates/web/ui-auth-payments-ai-rag/template/README.md +0 -434
  340. package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/KnowledgeManager.tsx +0 -642
  341. package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGAnalytics.tsx +0 -466
  342. package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGChatInterface.tsx +0 -393
  343. package/src/templates/web/ui-auth-payments-ai-rag/template/docs/GETTING-STARTED.md +0 -457
  344. package/src/templates/web/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -478
  345. package/src/templates/web/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -250
  346. package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +0 -73
  347. package/src/templates/web/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -622
  348. package/src/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +0 -396
  349. package/src/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +0 -49
  350. package/src/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +0 -74
  351. package/src/templates/web/ui-auth-payments-audio/template/vitest.config.ts +0 -17
  352. package/src/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +0 -49
  353. package/src/templates/web/ui-auth-payments-video/template/src/test/setup.ts +0 -74
  354. package/src/templates/web/ui-auth-payments-video/template/vitest.config.ts +0 -17
  355. package/src/templates/web/ui-only/template/.eslintrc.js +0 -8
  356. package/src/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +0 -49
  357. package/src/templates/web/ui-only/template/src/test/setup.ts +0 -74
  358. package/src/templates/web/ui-only/template/vitest.config.ts +0 -17
@@ -1,351 +1,347 @@
1
- 'use client'
2
-
3
- import {
4
- Card,
5
- Button,
6
- PageTransition,
7
- MobileContainer,
8
- ResponsiveGrid,
9
- useAnimationTokens,
10
- useGlassmorphism
11
- } from '@digilogiclabs/saas-factory-ui'
12
- import {
13
- ArrowLeft,
14
- CheckCircle,
15
- AlertCircle,
16
- ExternalLink,
17
- Copy,
18
- Database,
19
- CreditCard,
20
- Shield,
21
- Video,
22
- Key,
23
- Settings,
24
- BookOpen,
25
- Zap,
26
- Code2,
27
- FileText,
28
- Monitor
29
- } from 'lucide-react'
30
- import Link from 'next/link'
31
- import { useState } from 'react'
32
-
33
- export default function SetupPage() {
34
- const animations = useAnimationTokens()
35
- const glass = useGlassmorphism()
36
- const [copiedVar, setCopiedVar] = useState<string | null>(null)
37
-
38
- const projectName = "{{projectName}}"
39
- const templateName = "Video Platform with Payments"
40
- const templateDescription = "UI + Authentication + Payments + Video Features"
41
-
42
- const envVars = [
43
- { name: "NEXT_PUBLIC_SUPABASE_URL", example: "https://your-project.supabase.co", required: true },
44
- { name: "NEXT_PUBLIC_SUPABASE_ANON_KEY", example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", required: true },
45
- { name: "SUPABASE_SERVICE_ROLE_KEY", example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", required: false },
46
- { name: "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY", example: "pk_test_51234567890abcdef...", required: true },
47
- { name: "STRIPE_SECRET_KEY", example: "sk_test_51234567890abcdef...", required: true },
48
- { name: "STRIPE_WEBHOOK_SECRET", example: "whsec_1234567890abcdef...", required: true },
49
- { name: "REPLICATE_API_TOKEN", example: "r8_1234567890abcdef...", required: false },
50
- { name: "OPENAI_API_KEY", example: "sk-1234567890abcdef...", required: false }
51
- ]
52
-
53
- const copyToClipboard = async (text: string, varName: string) => {
54
- await navigator.clipboard.writeText(text)
55
- setCopiedVar(varName)
56
- setTimeout(() => setCopiedVar(null), 2000)
57
- }
58
-
59
- return (
60
- <PageTransition type="slide" direction="up" duration={300}>
61
- <main className={`min-h-screen ${glass.background.primary} relative overflow-hidden`}>
62
- <div className={`absolute inset-0 ${glass.background.accent} opacity-30`} />
63
- <div className="relative z-10">
64
- <MobileContainer className="py-8">
65
- {/* Header */}
66
- <div className="flex items-center justify-between mb-8">
67
- <div className="flex items-center gap-4">
68
- <Link href="/" className={`${glass.card} ${glass.border} p-2 rounded-xl ${animations.hover.scale}`}>
69
- <ArrowLeft className="w-5 h-5" />
70
- </Link>
71
- <div>
72
- <h1 className="text-2xl font-bold">Setup Guide</h1>
73
- <p className="text-gray-600 dark:text-gray-300">{templateName}</p>
74
- </div>
75
- </div>
76
- <div className={`${glass.card} ${glass.border} px-4 py-2 rounded-xl`}>
77
- <span className="text-sm font-medium">{projectName}</span>
78
- </div>
79
- </div>
80
-
81
- {/* Template Overview */}
82
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
83
- <div className="flex items-center gap-4 mb-4">
84
- <div className={`w-12 h-12 rounded-xl bg-gradient-to-r from-red-500 to-purple-500 flex items-center justify-center`}>
85
- <Video className="w-6 h-6 text-white" />
86
- </div>
87
- <div>
88
- <h2 className="text-xl font-semibold">{templateName}</h2>
89
- <p className="text-gray-600 dark:text-gray-300">{templateDescription}</p>
90
- </div>
91
- </div>
92
- <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mt-6">
93
- <div className="text-center p-3 rounded-xl bg-blue-500/10">
94
- <Shield className="w-6 h-6 text-blue-400 mx-auto mb-2" />
95
- <div className="text-sm font-medium">Authentication</div>
96
- </div>
97
- <div className="text-center p-3 rounded-xl bg-green-500/10">
98
- <CreditCard className="w-6 h-6 text-green-400 mx-auto mb-2" />
99
- <div className="text-sm font-medium">Payments</div>
100
- </div>
101
- <div className="text-center p-3 rounded-xl bg-red-500/10">
102
- <Monitor className="w-6 h-6 text-red-400 mx-auto mb-2" />
103
- <div className="text-sm font-medium">Video Platform</div>
104
- </div>
105
- <div className="text-center p-3 rounded-xl bg-orange-500/10">
106
- <Code2 className="w-6 h-6 text-orange-400 mx-auto mb-2" />
107
- <div className="text-sm font-medium">Modern UI</div>
108
- </div>
109
- </div>
110
- </div>
111
-
112
- {/* Quick Start */}
113
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
114
- <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
115
- <Zap className="w-5 h-5 text-yellow-400" />
116
- Quick Start
117
- </h3>
118
- <div className="space-y-3 text-sm">
119
- <div className="flex items-center gap-3">
120
- <CheckCircle className="w-5 h-5 text-green-400" />
121
- <span>1. Set up Supabase for database and authentication</span>
122
- </div>
123
- <div className="flex items-center gap-3">
124
- <CheckCircle className="w-5 h-5 text-green-400" />
125
- <span>2. Configure Stripe for payment processing</span>
126
- </div>
127
- <div className="flex items-center gap-3">
128
- <CheckCircle className="w-5 h-5 text-green-400" />
129
- <span>3. (Optional) Add video AI providers like Replicate</span>
130
- </div>
131
- <div className="flex items-center gap-3">
132
- <CheckCircle className="w-5 h-5 text-green-400" />
133
- <span>4. Configure environment variables below</span>
134
- </div>
135
- <div className="flex items-center gap-3">
136
- <CheckCircle className="w-5 h-5 text-green-400" />
137
- <span>5. Run <code className="px-2 py-1 bg-gray-800 rounded text-green-400">npm run dev</code></span>
138
- </div>
139
- </div>
140
- </div>
141
-
142
- {/* Environment Variables */}
143
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
144
- <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
145
- <Key className="w-5 h-5 text-blue-400" />
146
- Environment Variables
147
- </h3>
148
- <p className="text-sm text-gray-600 dark:text-gray-300 mb-4">
149
- Copy these to your <code className="px-2 py-1 bg-gray-800 rounded">.env.local</code> file:
150
- </p>
151
- <div className="bg-gray-900 rounded-xl p-4 overflow-x-auto">
152
- <pre className="text-sm text-green-400">
153
- {envVars.map(envVar => (
154
- `${envVar.name}=${envVar.example}${envVar.required ? ' # Required' : ' # Optional'}`
155
- )).join('\n')}
156
- </pre>
157
- <button
158
- onClick={() => copyToClipboard(
159
- envVars.map(envVar => `${envVar.name}=${envVar.example}`).join('\n'),
160
- 'all-env-vars'
161
- )}
162
- className="mt-3 flex items-center gap-2 text-xs text-gray-400 hover:text-white transition-colors"
163
- >
164
- <Copy className="w-4 h-4" />
165
- {copiedVar === 'all-env-vars' ? 'Copied!' : 'Copy all environment variables'}
166
- </button>
167
- </div>
168
- </div>
169
-
170
- {/* Services Overview */}
171
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
172
- <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
173
- <Settings className="w-5 h-5 text-gray-400" />
174
- Required Services
175
- </h3>
176
- <div className="space-y-4">
177
- {/* Supabase */}
178
- <div className="flex items-center gap-4 p-4 bg-blue-500/10 rounded-xl">
179
- <Database className="w-8 h-8 text-blue-400" />
180
- <div className="flex-1">
181
- <h4 className="font-semibold">Supabase</h4>
182
- <p className="text-sm text-gray-600 dark:text-gray-300">Database and authentication</p>
183
- </div>
184
- <span className="px-3 py-1 bg-red-500/20 text-red-400 rounded-full text-xs">Required</span>
185
- <a href="https://supabase.com/dashboard" className="text-blue-400 hover:text-blue-300">
186
- <ExternalLink className="w-4 h-4" />
187
- </a>
188
- </div>
189
-
190
- {/* Stripe */}
191
- <div className="flex items-center gap-4 p-4 bg-green-500/10 rounded-xl">
192
- <CreditCard className="w-8 h-8 text-green-400" />
193
- <div className="flex-1">
194
- <h4 className="font-semibold">Stripe</h4>
195
- <p className="text-sm text-gray-600 dark:text-gray-300">Payment processing</p>
196
- </div>
197
- <span className="px-3 py-1 bg-red-500/20 text-red-400 rounded-full text-xs">Required</span>
198
- <a href="https://dashboard.stripe.com" className="text-green-400 hover:text-green-300">
199
- <ExternalLink className="w-4 h-4" />
200
- </a>
201
- </div>
202
-
203
- {/* Video Services */}
204
- <div className="flex items-center gap-4 p-4 bg-red-500/10 rounded-xl">
205
- <Video className="w-8 h-8 text-red-400" />
206
- <div className="flex-1">
207
- <h4 className="font-semibold">Video Services</h4>
208
- <p className="text-sm text-gray-600 dark:text-gray-300">Replicate, OpenAI for video generation</p>
209
- </div>
210
- <span className="px-3 py-1 bg-yellow-500/20 text-yellow-400 rounded-full text-xs">Optional</span>
211
- </div>
212
- </div>
213
- </div>
214
-
215
- {/* Database Setup */}
216
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
217
- <h3 className="text-lg font-semibold mb-4">Database Setup</h3>
218
- <p className="text-sm text-gray-600 dark:text-gray-300 mb-4">
219
- Run this SQL in your Supabase SQL editor to set up the required tables:
220
- </p>
221
- <div className="bg-gray-900 rounded-xl p-4 overflow-x-auto">
222
- <pre className="text-xs text-green-400">
223
- {`-- User profiles table
224
- CREATE TABLE profiles (
225
- id UUID REFERENCES auth.users(id) PRIMARY KEY,
226
- email TEXT,
227
- full_name TEXT,
228
- avatar_url TEXT,
229
- stripe_customer_id TEXT,
230
- subscription_status TEXT DEFAULT 'inactive',
231
- created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
232
- );
233
-
234
- -- Video content table
235
- CREATE TABLE video_content (
236
- id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
237
- user_id UUID REFERENCES profiles(id),
238
- title TEXT NOT NULL,
239
- description TEXT,
240
- video_url TEXT,
241
- thumbnail_url TEXT,
242
- duration INTEGER,
243
- file_size BIGINT,
244
- resolution TEXT,
245
- status TEXT DEFAULT 'processing',
246
- created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
247
- );
248
-
249
- -- Enable RLS
250
- ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
251
- ALTER TABLE video_content ENABLE ROW LEVEL SECURITY;
252
-
253
- -- RLS Policies
254
- CREATE POLICY "Users can view own profile" ON profiles FOR SELECT USING (auth.uid() = id);
255
- CREATE POLICY "Users can update own profile" ON profiles FOR UPDATE USING (auth.uid() = id);
256
- CREATE POLICY "Users can manage own video content" ON video_content FOR ALL USING (auth.uid() = user_id);`}
257
- </pre>
258
- <button
259
- onClick={() => copyToClipboard(`-- User profiles table
260
- CREATE TABLE profiles (
261
- id UUID REFERENCES auth.users(id) PRIMARY KEY,
262
- email TEXT,
263
- full_name TEXT,
264
- avatar_url TEXT,
265
- stripe_customer_id TEXT,
266
- subscription_status TEXT DEFAULT 'inactive',
267
- created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
268
- );
269
-
270
- -- Video content table
271
- CREATE TABLE video_content (
272
- id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
273
- user_id UUID REFERENCES profiles(id),
274
- title TEXT NOT NULL,
275
- description TEXT,
276
- video_url TEXT,
277
- thumbnail_url TEXT,
278
- duration INTEGER,
279
- file_size BIGINT,
280
- resolution TEXT,
281
- status TEXT DEFAULT 'processing',
282
- created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
283
- );
284
-
285
- -- Enable RLS
286
- ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
287
- ALTER TABLE video_content ENABLE ROW LEVEL SECURITY;
288
-
289
- -- RLS Policies
290
- CREATE POLICY "Users can view own profile" ON profiles FOR SELECT USING (auth.uid() = id);
291
- CREATE POLICY "Users can update own profile" ON profiles FOR UPDATE USING (auth.uid() = id);
292
- CREATE POLICY "Users can manage own video content" ON video_content FOR ALL USING (auth.uid() = user_id);`, 'sql-setup')}
293
- className="mt-3 flex items-center gap-2 text-xs text-gray-400 hover:text-white transition-colors"
294
- >
295
- <Copy className="w-4 h-4" />
296
- {copiedVar === 'sql-setup' ? 'Copied!' : 'Copy SQL setup'}
297
- </button>
298
- </div>
299
- </div>
300
-
301
- {/* Additional Resources */}
302
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mt-8`}>
303
- <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
304
- <BookOpen className="w-5 h-5 text-green-400" />
305
- Additional Resources
306
- </h3>
307
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
308
- <a
309
- href="https://docs.digilogiclabs.com"
310
- className={`${glass.card} ${glass.border} p-4 rounded-xl ${animations.hover.scale} block`}
311
- >
312
- <FileText className="w-8 h-8 text-blue-400 mb-2" />
313
- <h4 className="font-medium">Documentation</h4>
314
- <p className="text-sm text-gray-600 dark:text-gray-300">Complete guides and API reference</p>
315
- </a>
316
- <a
317
- href="https://github.com/digilogiclabs/examples"
318
- className={`${glass.card} ${glass.border} p-4 rounded-xl ${animations.hover.scale} block`}
319
- >
320
- <Code2 className="w-8 h-8 text-purple-400 mb-2" />
321
- <h4 className="font-medium">Examples</h4>
322
- <p className="text-sm text-gray-600 dark:text-gray-300">Sample projects and code snippets</p>
323
- </a>
324
- </div>
325
- </div>
326
-
327
- {/* Support */}
328
- <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mt-8 text-center`}>
329
- <h3 className="text-lg font-semibold mb-4">Need Help?</h3>
330
- <p className="text-gray-600 dark:text-gray-300 mb-4">
331
- Our community and support team are here to help you get started.
332
- </p>
333
- <div className="flex justify-center gap-4">
334
- <Button variant="outline" size="sm" asChild>
335
- <a href="https://discord.gg/digilogiclabs" target="_blank" rel="noopener noreferrer">
336
- Join Discord
337
- </a>
338
- </Button>
339
- <Button size="sm" asChild>
340
- <a href="https://docs.digilogiclabs.com/support" target="_blank" rel="noopener noreferrer">
341
- Get Support
342
- </a>
343
- </Button>
344
- </div>
345
- </div>
346
- </MobileContainer>
347
- </div>
348
- </main>
349
- </PageTransition>
350
- )
1
+ 'use client'
2
+
3
+ import {
4
+ Card,
5
+ Button,
6
+
7
+
8
+
9
+ } from '@digilogiclabs/saas-factory-ui'
10
+ import {
11
+ ArrowLeft,
12
+ CheckCircle,
13
+ AlertCircle,
14
+ ExternalLink,
15
+ Copy,
16
+ Database,
17
+ CreditCard,
18
+ Shield,
19
+ Video,
20
+ Key,
21
+ Settings,
22
+ BookOpen,
23
+ Zap,
24
+ Code2,
25
+ FileText,
26
+ Monitor
27
+ } from 'lucide-react'
28
+ import Link from 'next/link'
29
+ import { useState } from 'react'
30
+
31
+ export default function SetupPage() {
32
+ const [copiedVar, setCopiedVar] = useState<string | null>(null)
33
+
34
+ const projectName = "{{projectName}}"
35
+ const templateName = "Video Platform with Payments"
36
+ const templateDescription = "UI + Authentication + Payments + Video Features"
37
+
38
+ const envVars = [
39
+ { name: "NEXT_PUBLIC_SUPABASE_URL", example: "https://your-project.supabase.co", required: true },
40
+ { name: "NEXT_PUBLIC_SUPABASE_ANON_KEY", example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", required: true },
41
+ { name: "SUPABASE_SERVICE_ROLE_KEY", example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", required: false },
42
+ { name: "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY", example: "pk_test_51234567890abcdef...", required: true },
43
+ { name: "STRIPE_SECRET_KEY", example: "sk_test_51234567890abcdef...", required: true },
44
+ { name: "STRIPE_WEBHOOK_SECRET", example: "whsec_1234567890abcdef...", required: true },
45
+ { name: "REPLICATE_API_TOKEN", example: "r8_1234567890abcdef...", required: false },
46
+ { name: "OPENAI_API_KEY", example: "sk-1234567890abcdef...", required: false }
47
+ ]
48
+
49
+ const copyToClipboard = async (text: string, varName: string) => {
50
+ await navigator.clipboard.writeText(text)
51
+ setCopiedVar(varName)
52
+ setTimeout(() => setCopiedVar(null), 2000)
53
+ }
54
+
55
+ return (
56
+ <div>
57
+ <main className={`min-h-screen bg-background relative overflow-hidden`}>
58
+ <div className={`absolute inset-0 bg-muted opacity-30`} />
59
+ <div className="relative z-10">
60
+ <div className="max-w-4xl mx-auto px-4">
61
+ {/* Header */}
62
+ <div className="flex items-center justify-between mb-8">
63
+ <div className="flex items-center gap-4">
64
+ <Link href="/" className={`rounded-xl border border-border bg-card p-2 rounded-xl hover:scale-[1.02] transition-transform`}>
65
+ <ArrowLeft className="w-5 h-5" />
66
+ </Link>
67
+ <div>
68
+ <h1 className="text-2xl font-bold">Setup Guide</h1>
69
+ <p className="text-muted-foreground">{templateName}</p>
70
+ </div>
71
+ </div>
72
+ <div className={`rounded-xl border border-border bg-card px-4 py-2 rounded-xl`}>
73
+ <span className="text-sm font-medium">{projectName}</span>
74
+ </div>
75
+ </div>
76
+
77
+ {/* Template Overview */}
78
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mb-8`}>
79
+ <div className="flex items-center gap-4 mb-4">
80
+ <div className={`w-12 h-12 rounded-xl bg-gradient-to-r from-red-500 to-purple-500 flex items-center justify-center`}>
81
+ <Video className="w-6 h-6 text-white" />
82
+ </div>
83
+ <div>
84
+ <h2 className="text-xl font-semibold">{templateName}</h2>
85
+ <p className="text-muted-foreground">{templateDescription}</p>
86
+ </div>
87
+ </div>
88
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mt-6">
89
+ <div className="text-center p-3 rounded-xl bg-blue-500/10">
90
+ <Shield className="w-6 h-6 text-blue-400 mx-auto mb-2" />
91
+ <div className="text-sm font-medium">Authentication</div>
92
+ </div>
93
+ <div className="text-center p-3 rounded-xl bg-green-500/10">
94
+ <CreditCard className="w-6 h-6 text-green-400 mx-auto mb-2" />
95
+ <div className="text-sm font-medium">Payments</div>
96
+ </div>
97
+ <div className="text-center p-3 rounded-xl bg-red-500/10">
98
+ <Monitor className="w-6 h-6 text-red-400 mx-auto mb-2" />
99
+ <div className="text-sm font-medium">Video Platform</div>
100
+ </div>
101
+ <div className="text-center p-3 rounded-xl bg-orange-500/10">
102
+ <Code2 className="w-6 h-6 text-orange-400 mx-auto mb-2" />
103
+ <div className="text-sm font-medium">Modern UI</div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ {/* Quick Start */}
109
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mb-8`}>
110
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
111
+ <Zap className="w-5 h-5 text-yellow-400" />
112
+ Quick Start
113
+ </h3>
114
+ <div className="space-y-3 text-sm">
115
+ <div className="flex items-center gap-3">
116
+ <CheckCircle className="w-5 h-5 text-green-400" />
117
+ <span>1. Set up Supabase for database and authentication</span>
118
+ </div>
119
+ <div className="flex items-center gap-3">
120
+ <CheckCircle className="w-5 h-5 text-green-400" />
121
+ <span>2. Configure Stripe for payment processing</span>
122
+ </div>
123
+ <div className="flex items-center gap-3">
124
+ <CheckCircle className="w-5 h-5 text-green-400" />
125
+ <span>3. (Optional) Add video AI providers like Replicate</span>
126
+ </div>
127
+ <div className="flex items-center gap-3">
128
+ <CheckCircle className="w-5 h-5 text-green-400" />
129
+ <span>4. Configure environment variables below</span>
130
+ </div>
131
+ <div className="flex items-center gap-3">
132
+ <CheckCircle className="w-5 h-5 text-green-400" />
133
+ <span>5. Run <code className="px-2 py-1 bg-card rounded text-green-400">npm run dev</code></span>
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+ {/* Environment Variables */}
139
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mb-8`}>
140
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
141
+ <Key className="w-5 h-5 text-primary" />
142
+ Environment Variables
143
+ </h3>
144
+ <p className="text-sm text-muted-foreground mb-4">
145
+ Copy these to your <code className="px-2 py-1 bg-card rounded">.env.local</code> file:
146
+ </p>
147
+ <div className="bg-background rounded-xl p-4 overflow-x-auto">
148
+ <pre className="text-sm text-green-400">
149
+ {envVars.map(envVar => (
150
+ `${envVar.name}=${envVar.example}${envVar.required ? ' # Required' : ' # Optional'}`
151
+ )).join('\n')}
152
+ </pre>
153
+ <button
154
+ onClick={() => copyToClipboard(
155
+ envVars.map(envVar => `${envVar.name}=${envVar.example}`).join('\n'),
156
+ 'all-env-vars'
157
+ )}
158
+ className="mt-3 flex items-center gap-2 text-xs text-muted-foreground hover:text-white transition-colors"
159
+ >
160
+ <Copy className="w-4 h-4" />
161
+ {copiedVar === 'all-env-vars' ? 'Copied!' : 'Copy all environment variables'}
162
+ </button>
163
+ </div>
164
+ </div>
165
+
166
+ {/* Services Overview */}
167
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mb-8`}>
168
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
169
+ <Settings className="w-5 h-5 text-muted-foreground" />
170
+ Required Services
171
+ </h3>
172
+ <div className="space-y-4">
173
+ {/* Supabase */}
174
+ <div className="flex items-center gap-4 p-4 bg-primary/10 rounded-xl">
175
+ <Database className="w-8 h-8 text-primary" />
176
+ <div className="flex-1">
177
+ <h4 className="font-semibold">Supabase</h4>
178
+ <p className="text-sm text-muted-foreground">Database and authentication</p>
179
+ </div>
180
+ <span className="px-3 py-1 bg-red-500/20 text-red-400 rounded-full text-xs">Required</span>
181
+ <a href="https://supabase.com/dashboard" className="text-primary hover:text-primary/80">
182
+ <ExternalLink className="w-4 h-4" />
183
+ </a>
184
+ </div>
185
+
186
+ {/* Stripe */}
187
+ <div className="flex items-center gap-4 p-4 bg-green-500/10 rounded-xl">
188
+ <CreditCard className="w-8 h-8 text-green-400" />
189
+ <div className="flex-1">
190
+ <h4 className="font-semibold">Stripe</h4>
191
+ <p className="text-sm text-muted-foreground">Payment processing</p>
192
+ </div>
193
+ <span className="px-3 py-1 bg-red-500/20 text-red-400 rounded-full text-xs">Required</span>
194
+ <a href="https://dashboard.stripe.com" className="text-green-400 hover:text-green-300">
195
+ <ExternalLink className="w-4 h-4" />
196
+ </a>
197
+ </div>
198
+
199
+ {/* Video Services */}
200
+ <div className="flex items-center gap-4 p-4 bg-red-500/10 rounded-xl">
201
+ <Video className="w-8 h-8 text-red-400" />
202
+ <div className="flex-1">
203
+ <h4 className="font-semibold">Video Services</h4>
204
+ <p className="text-sm text-muted-foreground">Replicate, OpenAI for video generation</p>
205
+ </div>
206
+ <span className="px-3 py-1 bg-yellow-500/20 text-yellow-400 rounded-full text-xs">Optional</span>
207
+ </div>
208
+ </div>
209
+ </div>
210
+
211
+ {/* Database Setup */}
212
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mb-8`}>
213
+ <h3 className="text-lg font-semibold mb-4">Database Setup</h3>
214
+ <p className="text-sm text-muted-foreground mb-4">
215
+ Run this SQL in your Supabase SQL editor to set up the required tables:
216
+ </p>
217
+ <div className="bg-background rounded-xl p-4 overflow-x-auto">
218
+ <pre className="text-xs text-green-400">
219
+ {`-- User profiles table
220
+ CREATE TABLE profiles (
221
+ id UUID REFERENCES auth.users(id) PRIMARY KEY,
222
+ email TEXT,
223
+ full_name TEXT,
224
+ avatar_url TEXT,
225
+ stripe_customer_id TEXT,
226
+ subscription_status TEXT DEFAULT 'inactive',
227
+ created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
228
+ );
229
+
230
+ -- Video content table
231
+ CREATE TABLE video_content (
232
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
233
+ user_id UUID REFERENCES profiles(id),
234
+ title TEXT NOT NULL,
235
+ description TEXT,
236
+ video_url TEXT,
237
+ thumbnail_url TEXT,
238
+ duration INTEGER,
239
+ file_size BIGINT,
240
+ resolution TEXT,
241
+ status TEXT DEFAULT 'processing',
242
+ created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
243
+ );
244
+
245
+ -- Enable RLS
246
+ ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
247
+ ALTER TABLE video_content ENABLE ROW LEVEL SECURITY;
248
+
249
+ -- RLS Policies
250
+ CREATE POLICY "Users can view own profile" ON profiles FOR SELECT USING (auth.uid() = id);
251
+ CREATE POLICY "Users can update own profile" ON profiles FOR UPDATE USING (auth.uid() = id);
252
+ CREATE POLICY "Users can manage own video content" ON video_content FOR ALL USING (auth.uid() = user_id);`}
253
+ </pre>
254
+ <button
255
+ onClick={() => copyToClipboard(`-- User profiles table
256
+ CREATE TABLE profiles (
257
+ id UUID REFERENCES auth.users(id) PRIMARY KEY,
258
+ email TEXT,
259
+ full_name TEXT,
260
+ avatar_url TEXT,
261
+ stripe_customer_id TEXT,
262
+ subscription_status TEXT DEFAULT 'inactive',
263
+ created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
264
+ );
265
+
266
+ -- Video content table
267
+ CREATE TABLE video_content (
268
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
269
+ user_id UUID REFERENCES profiles(id),
270
+ title TEXT NOT NULL,
271
+ description TEXT,
272
+ video_url TEXT,
273
+ thumbnail_url TEXT,
274
+ duration INTEGER,
275
+ file_size BIGINT,
276
+ resolution TEXT,
277
+ status TEXT DEFAULT 'processing',
278
+ created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
279
+ );
280
+
281
+ -- Enable RLS
282
+ ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
283
+ ALTER TABLE video_content ENABLE ROW LEVEL SECURITY;
284
+
285
+ -- RLS Policies
286
+ CREATE POLICY "Users can view own profile" ON profiles FOR SELECT USING (auth.uid() = id);
287
+ CREATE POLICY "Users can update own profile" ON profiles FOR UPDATE USING (auth.uid() = id);
288
+ CREATE POLICY "Users can manage own video content" ON video_content FOR ALL USING (auth.uid() = user_id);`, 'sql-setup')}
289
+ className="mt-3 flex items-center gap-2 text-xs text-muted-foreground hover:text-white transition-colors"
290
+ >
291
+ <Copy className="w-4 h-4" />
292
+ {copiedVar === 'sql-setup' ? 'Copied!' : 'Copy SQL setup'}
293
+ </button>
294
+ </div>
295
+ </div>
296
+
297
+ {/* Additional Resources */}
298
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mt-8`}>
299
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
300
+ <BookOpen className="w-5 h-5 text-green-400" />
301
+ Additional Resources
302
+ </h3>
303
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
304
+ <a
305
+ href="https://docs.digilogiclabs.com"
306
+ className={`rounded-xl border border-border bg-card p-4 rounded-xl hover:scale-[1.02] transition-transform block`}
307
+ >
308
+ <FileText className="w-8 h-8 text-primary mb-2" />
309
+ <h4 className="font-medium">Documentation</h4>
310
+ <p className="text-sm text-muted-foreground">Complete guides and API reference</p>
311
+ </a>
312
+ <a
313
+ href="https://github.com/digilogiclabs/examples"
314
+ className={`rounded-xl border border-border bg-card p-4 rounded-xl hover:scale-[1.02] transition-transform block`}
315
+ >
316
+ <Code2 className="w-8 h-8 text-purple-400 mb-2" />
317
+ <h4 className="font-medium">Examples</h4>
318
+ <p className="text-sm text-muted-foreground">Sample projects and code snippets</p>
319
+ </a>
320
+ </div>
321
+ </div>
322
+
323
+ {/* Support */}
324
+ <div className={`rounded-xl border border-border bg-card rounded-2xl p-6 mt-8 text-center`}>
325
+ <h3 className="text-lg font-semibold mb-4">Need Help?</h3>
326
+ <p className="text-muted-foreground mb-4">
327
+ Our community and support team are here to help you get started.
328
+ </p>
329
+ <div className="flex justify-center gap-4">
330
+ <Button variant="outline" size="sm">
331
+ <a href="https://discord.gg/digilogiclabs" target="_blank" rel="noopener noreferrer">
332
+ Join Discord
333
+ </a>
334
+ </Button>
335
+ <Button size="sm">
336
+ <a href="https://docs.digilogiclabs.com/support" target="_blank" rel="noopener noreferrer">
337
+ Get Support
338
+ </a>
339
+ </Button>
340
+ </div>
341
+ </div>
342
+ </div>
343
+ </div>
344
+ </main>
345
+ </div>
346
+ )
351
347
  }