@digilogiclabs/create-saas-app 2.0.0 → 2.2.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 (348) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +975 -891
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/generators/template-generator.d.ts +11 -0
  5. package/dist/generators/template-generator.d.ts.map +1 -1
  6. package/dist/generators/template-generator.js +389 -18
  7. package/dist/generators/template-generator.js.map +1 -1
  8. package/dist/index.js +1837 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/templates/infrastructure/kubernetes/base/template/README.md +253 -0
  11. package/dist/templates/infrastructure/kubernetes/base/template/configmap.yaml +12 -0
  12. package/dist/templates/infrastructure/kubernetes/base/template/deployment.yaml +123 -0
  13. package/dist/templates/infrastructure/kubernetes/base/template/hpa.yaml +45 -0
  14. package/dist/templates/infrastructure/kubernetes/base/template/ingress.yaml +31 -0
  15. package/dist/templates/infrastructure/kubernetes/base/template/kustomization.yaml +25 -0
  16. package/dist/templates/infrastructure/kubernetes/base/template/namespace.yaml +8 -0
  17. package/dist/templates/infrastructure/kubernetes/base/template/networkpolicy.yaml +48 -0
  18. package/dist/templates/infrastructure/kubernetes/base/template/pdb.yaml +14 -0
  19. package/dist/templates/infrastructure/kubernetes/base/template/secret.yaml +17 -0
  20. package/dist/templates/infrastructure/kubernetes/base/template/service.yaml +19 -0
  21. package/dist/templates/infrastructure/kubernetes/base/template/serviceaccount.yaml +9 -0
  22. package/dist/templates/infrastructure/kubernetes/production/template/kustomization.yaml +92 -0
  23. package/dist/templates/infrastructure/terraform/aws/template/README.md +156 -0
  24. package/dist/templates/infrastructure/terraform/aws/template/main.tf +343 -0
  25. package/dist/templates/infrastructure/terraform/aws/template/outputs.tf +66 -0
  26. package/dist/templates/infrastructure/terraform/aws/template/terraform.tfvars.example +28 -0
  27. package/dist/templates/infrastructure/terraform/aws/template/variables.tf +110 -0
  28. package/dist/templates/infrastructure/terraform/gcp/template/README.md +165 -0
  29. package/dist/templates/infrastructure/terraform/gcp/template/main.tf +397 -0
  30. package/dist/templates/infrastructure/terraform/gcp/template/outputs.tf +51 -0
  31. package/dist/templates/infrastructure/terraform/gcp/template/terraform.tfvars.example +29 -0
  32. package/dist/templates/infrastructure/terraform/gcp/template/variables.tf +115 -0
  33. package/dist/templates/shared/admin/web/app/admin/layout.tsx +34 -0
  34. package/dist/templates/shared/admin/web/components/admin-nav.tsx +48 -0
  35. package/dist/templates/shared/audit/web/lib/audit.ts +24 -0
  36. package/dist/templates/shared/auth/keycloak/web/app/api/auth/federated-logout/route.ts +173 -0
  37. package/dist/templates/shared/auth/keycloak/web/auth.config.ts +84 -0
  38. package/dist/templates/shared/auth/keycloak/web/auth.ts +26 -0
  39. package/dist/templates/shared/beta/web/app/api/beta-settings/route.ts +25 -0
  40. package/dist/templates/shared/beta/web/app/api/validate-beta-code/route.ts +67 -0
  41. package/dist/templates/shared/beta/web/lib/beta/settings.ts +31 -0
  42. package/dist/templates/shared/cache/web/lib/cache.ts +44 -0
  43. package/dist/templates/shared/config/web/lib/config.ts +112 -0
  44. package/dist/templates/shared/config/web/next.config.mjs +62 -0
  45. package/dist/templates/shared/contact/web/app/api/contact/route.ts +113 -0
  46. package/dist/templates/shared/contact/web/app/contact/page.tsx +195 -0
  47. package/dist/templates/shared/cookie-consent/web/components/cookie-consent.tsx +54 -0
  48. package/dist/templates/shared/database/postgresql/web/drizzle.config.ts +16 -0
  49. package/dist/templates/shared/database/postgresql/web/lib/db/drizzle.ts +39 -0
  50. package/dist/templates/shared/database/postgresql/web/lib/db/schema.ts +33 -0
  51. package/dist/templates/shared/database/supabase/web/lib/supabase/client.ts +12 -0
  52. package/dist/templates/shared/database/supabase/web/lib/supabase/server.ts +31 -0
  53. package/dist/templates/shared/database/supabase/web/lib/supabase/service.ts +15 -0
  54. package/dist/templates/shared/email/web/lib/email/branding.ts +18 -0
  55. package/dist/templates/shared/email/web/lib/email/client.ts +96 -0
  56. package/dist/templates/shared/error-pages/web/app/error.tsx +70 -0
  57. package/dist/templates/shared/error-pages/web/app/global-error.tsx +102 -0
  58. package/dist/templates/shared/error-pages/web/app/not-found.tsx +39 -0
  59. package/dist/templates/shared/health/web/app/api/health/route.ts +68 -0
  60. package/dist/templates/shared/legal/web/app/(legal)/privacy/page.tsx +205 -0
  61. package/dist/templates/shared/legal/web/app/(legal)/terms/page.tsx +154 -0
  62. package/dist/templates/shared/legal/web/lib/legal-config.ts +50 -0
  63. package/dist/templates/shared/loading/web/app/loading.tsx +5 -0
  64. package/dist/templates/shared/loading/web/components/skeleton.tsx +95 -0
  65. package/dist/templates/shared/middleware/web/middleware.ts +68 -0
  66. package/dist/templates/shared/observability/web/lib/observability.ts +135 -0
  67. package/dist/templates/shared/payments/web/app/api/webhooks/stripe/route.ts +109 -0
  68. package/dist/templates/shared/platform/web/lib/platform.ts +37 -0
  69. package/dist/templates/shared/redis/web/lib/rate-limit-store.ts +18 -0
  70. package/dist/templates/shared/redis/web/lib/redis.ts +48 -0
  71. package/dist/templates/shared/security/web/lib/api-security.ts +318 -0
  72. package/dist/templates/shared/seo/web/app/api/og/route.tsx +97 -0
  73. package/dist/templates/shared/seo/web/app/robots.ts +53 -0
  74. package/dist/templates/shared/seo/web/app/sitemap.ts +53 -0
  75. package/dist/templates/shared/utils/web/lib/api-response.ts +71 -0
  76. package/dist/templates/shared/utils/web/lib/utils.ts +85 -0
  77. package/dist/templates/web/ai-platform/template/.env.example +16 -0
  78. package/dist/templates/web/ai-platform/template/README.md +84 -0
  79. package/dist/templates/web/ai-platform/template/middleware.ts +55 -0
  80. package/dist/templates/web/ai-platform/template/next.config.js +14 -0
  81. package/dist/templates/web/ai-platform/template/package.json +55 -0
  82. package/dist/templates/web/ai-platform/template/src/app/api/chat/route.ts +54 -0
  83. package/dist/templates/web/ai-platform/template/src/app/chat/page.tsx +235 -0
  84. package/dist/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -0
  85. package/dist/templates/web/ai-platform/template/src/app/globals.css +34 -0
  86. package/dist/templates/web/ai-platform/template/src/app/layout.tsx +27 -0
  87. package/dist/templates/web/ai-platform/template/src/app/page.tsx +203 -0
  88. package/dist/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +27 -0
  89. package/dist/templates/web/ai-platform/template/src/lib/auth-server.ts +33 -0
  90. package/dist/templates/web/ai-platform/template/src/lib/supabase/client.ts +8 -0
  91. package/dist/templates/web/ai-platform/template/src/lib/supabase/server.ts +27 -0
  92. package/dist/templates/web/ai-platform/template/src/lib/utils.ts +6 -0
  93. package/dist/templates/web/ai-platform/template/tsconfig.json +27 -0
  94. package/dist/templates/web/iot-dashboard/template/.env.example +12 -0
  95. package/dist/templates/web/iot-dashboard/template/README.md +101 -0
  96. package/dist/templates/web/iot-dashboard/template/middleware.ts +56 -0
  97. package/dist/templates/web/iot-dashboard/template/next.config.js +14 -0
  98. package/dist/templates/web/iot-dashboard/template/package.json +49 -0
  99. package/dist/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +229 -0
  100. package/dist/templates/web/iot-dashboard/template/src/app/globals.css +20 -0
  101. package/dist/templates/web/iot-dashboard/template/src/app/layout.tsx +27 -0
  102. package/dist/templates/web/iot-dashboard/template/src/app/page.tsx +191 -0
  103. package/dist/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +24 -0
  104. package/dist/templates/web/iot-dashboard/template/src/lib/auth-server.ts +33 -0
  105. package/dist/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +8 -0
  106. package/dist/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +27 -0
  107. package/dist/templates/web/iot-dashboard/template/src/lib/utils.ts +25 -0
  108. package/dist/templates/web/iot-dashboard/template/tsconfig.json +27 -0
  109. package/dist/templates/web/marketplace/template/.env.example +12 -0
  110. package/dist/templates/web/marketplace/template/README.md +66 -0
  111. package/dist/templates/web/marketplace/template/middleware.ts +56 -0
  112. package/dist/templates/web/marketplace/template/next.config.js +14 -0
  113. package/dist/templates/web/marketplace/template/package.json +51 -0
  114. package/dist/templates/web/marketplace/template/src/app/cart/page.tsx +147 -0
  115. package/dist/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -0
  116. package/dist/templates/web/marketplace/template/src/app/globals.css +20 -0
  117. package/dist/templates/web/marketplace/template/src/app/layout.tsx +27 -0
  118. package/dist/templates/web/marketplace/template/src/app/page.tsx +167 -0
  119. package/dist/templates/web/marketplace/template/src/app/products/page.tsx +129 -0
  120. package/dist/templates/web/marketplace/template/src/components/providers/app-providers.tsx +27 -0
  121. package/dist/templates/web/marketplace/template/src/lib/auth-server.ts +33 -0
  122. package/dist/templates/web/marketplace/template/src/lib/supabase/client.ts +8 -0
  123. package/dist/templates/web/marketplace/template/src/lib/supabase/server.ts +27 -0
  124. package/dist/templates/web/marketplace/template/src/lib/utils.ts +19 -0
  125. package/dist/templates/web/marketplace/template/tsconfig.json +27 -0
  126. package/dist/templates/web/micro-saas/template/.env.example +10 -0
  127. package/dist/templates/web/micro-saas/template/README.md +63 -0
  128. package/dist/templates/web/micro-saas/template/middleware.ts +53 -0
  129. package/dist/templates/web/micro-saas/template/next.config.js +14 -0
  130. package/dist/templates/web/micro-saas/template/package.json +41 -0
  131. package/dist/templates/web/micro-saas/template/src/app/dashboard/page.tsx +117 -0
  132. package/dist/templates/web/micro-saas/template/src/app/globals.css +20 -0
  133. package/dist/templates/web/micro-saas/template/src/app/layout.tsx +27 -0
  134. package/dist/templates/web/micro-saas/template/src/app/login/page.tsx +87 -0
  135. package/dist/templates/web/micro-saas/template/src/app/page.tsx +137 -0
  136. package/dist/templates/web/micro-saas/template/src/app/signup/page.tsx +108 -0
  137. package/dist/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +24 -0
  138. package/dist/templates/web/micro-saas/template/src/lib/auth-server.ts +33 -0
  139. package/dist/templates/web/micro-saas/template/src/lib/supabase/client.ts +8 -0
  140. package/dist/templates/web/micro-saas/template/src/lib/supabase/server.ts +29 -0
  141. package/dist/templates/web/micro-saas/template/src/lib/utils.ts +6 -0
  142. package/dist/templates/web/micro-saas/template/tsconfig.json +27 -0
  143. package/package.json +5 -4
  144. package/src/templates/infrastructure/kubernetes/base/template/README.md +253 -0
  145. package/src/templates/infrastructure/kubernetes/base/template/configmap.yaml +12 -0
  146. package/src/templates/infrastructure/kubernetes/base/template/deployment.yaml +123 -0
  147. package/src/templates/infrastructure/kubernetes/base/template/hpa.yaml +45 -0
  148. package/src/templates/infrastructure/kubernetes/base/template/ingress.yaml +31 -0
  149. package/src/templates/infrastructure/kubernetes/base/template/kustomization.yaml +25 -0
  150. package/src/templates/infrastructure/kubernetes/base/template/namespace.yaml +8 -0
  151. package/src/templates/infrastructure/kubernetes/base/template/networkpolicy.yaml +48 -0
  152. package/src/templates/infrastructure/kubernetes/base/template/pdb.yaml +14 -0
  153. package/src/templates/infrastructure/kubernetes/base/template/secret.yaml +17 -0
  154. package/src/templates/infrastructure/kubernetes/base/template/service.yaml +19 -0
  155. package/src/templates/infrastructure/kubernetes/base/template/serviceaccount.yaml +9 -0
  156. package/src/templates/infrastructure/kubernetes/production/template/kustomization.yaml +92 -0
  157. package/src/templates/infrastructure/terraform/aws/template/README.md +156 -0
  158. package/src/templates/infrastructure/terraform/aws/template/main.tf +343 -0
  159. package/src/templates/infrastructure/terraform/aws/template/outputs.tf +66 -0
  160. package/src/templates/infrastructure/terraform/aws/template/terraform.tfvars.example +28 -0
  161. package/src/templates/infrastructure/terraform/aws/template/variables.tf +110 -0
  162. package/src/templates/infrastructure/terraform/gcp/template/README.md +165 -0
  163. package/src/templates/infrastructure/terraform/gcp/template/main.tf +397 -0
  164. package/src/templates/infrastructure/terraform/gcp/template/outputs.tf +51 -0
  165. package/src/templates/infrastructure/terraform/gcp/template/terraform.tfvars.example +29 -0
  166. package/src/templates/infrastructure/terraform/gcp/template/variables.tf +115 -0
  167. package/src/templates/shared/admin/web/app/admin/layout.tsx +34 -0
  168. package/src/templates/shared/admin/web/components/admin-nav.tsx +48 -0
  169. package/src/templates/shared/audit/web/lib/audit.ts +24 -0
  170. package/src/templates/shared/auth/keycloak/web/app/api/auth/federated-logout/route.ts +173 -0
  171. package/src/templates/shared/auth/keycloak/web/auth.config.ts +84 -0
  172. package/src/templates/shared/auth/keycloak/web/auth.ts +26 -0
  173. package/src/templates/shared/beta/web/app/api/beta-settings/route.ts +25 -0
  174. package/src/templates/shared/beta/web/app/api/validate-beta-code/route.ts +67 -0
  175. package/src/templates/shared/beta/web/lib/beta/settings.ts +31 -0
  176. package/src/templates/shared/cache/web/lib/cache.ts +44 -0
  177. package/src/templates/shared/config/web/lib/config.ts +112 -0
  178. package/src/templates/shared/config/web/next.config.mjs +62 -0
  179. package/src/templates/shared/contact/web/app/api/contact/route.ts +113 -0
  180. package/src/templates/shared/contact/web/app/contact/page.tsx +195 -0
  181. package/src/templates/shared/cookie-consent/web/components/cookie-consent.tsx +54 -0
  182. package/src/templates/shared/database/postgresql/web/drizzle.config.ts +16 -0
  183. package/src/templates/shared/database/postgresql/web/lib/db/drizzle.ts +39 -0
  184. package/src/templates/shared/database/postgresql/web/lib/db/schema.ts +33 -0
  185. package/src/templates/shared/database/supabase/web/lib/supabase/client.ts +12 -0
  186. package/src/templates/shared/database/supabase/web/lib/supabase/server.ts +31 -0
  187. package/src/templates/shared/database/supabase/web/lib/supabase/service.ts +15 -0
  188. package/src/templates/shared/email/web/lib/email/branding.ts +18 -0
  189. package/src/templates/shared/email/web/lib/email/client.ts +96 -0
  190. package/src/templates/shared/error-pages/web/app/error.tsx +70 -0
  191. package/src/templates/shared/error-pages/web/app/global-error.tsx +102 -0
  192. package/src/templates/shared/error-pages/web/app/not-found.tsx +39 -0
  193. package/src/templates/shared/health/web/app/api/health/route.ts +68 -0
  194. package/src/templates/shared/legal/web/app/(legal)/privacy/page.tsx +205 -0
  195. package/src/templates/shared/legal/web/app/(legal)/terms/page.tsx +154 -0
  196. package/src/templates/shared/legal/web/lib/legal-config.ts +50 -0
  197. package/src/templates/shared/loading/web/app/loading.tsx +5 -0
  198. package/src/templates/shared/loading/web/components/skeleton.tsx +95 -0
  199. package/src/templates/shared/middleware/web/middleware.ts +68 -0
  200. package/src/templates/shared/observability/web/lib/observability.ts +135 -0
  201. package/src/templates/shared/payments/web/app/api/webhooks/stripe/route.ts +109 -0
  202. package/src/templates/shared/platform/web/lib/platform.ts +37 -0
  203. package/src/templates/shared/redis/web/lib/rate-limit-store.ts +18 -0
  204. package/src/templates/shared/redis/web/lib/redis.ts +48 -0
  205. package/src/templates/shared/security/web/lib/api-security.ts +318 -0
  206. package/src/templates/shared/seo/web/app/api/og/route.tsx +97 -0
  207. package/src/templates/shared/seo/web/app/robots.ts +53 -0
  208. package/src/templates/shared/seo/web/app/sitemap.ts +53 -0
  209. package/src/templates/shared/utils/web/lib/api-response.ts +71 -0
  210. package/src/templates/shared/utils/web/lib/utils.ts +85 -0
  211. package/src/templates/web/ai-platform/template/.env.example +16 -0
  212. package/src/templates/web/ai-platform/template/README.md +84 -0
  213. package/src/templates/web/ai-platform/template/middleware.ts +55 -0
  214. package/src/templates/web/ai-platform/template/next.config.js +14 -0
  215. package/src/templates/web/ai-platform/template/package.json +55 -0
  216. package/src/templates/web/ai-platform/template/src/app/api/chat/route.ts +54 -0
  217. package/src/templates/web/ai-platform/template/src/app/chat/page.tsx +235 -0
  218. package/src/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -0
  219. package/src/templates/web/ai-platform/template/src/app/globals.css +34 -0
  220. package/src/templates/web/ai-platform/template/src/app/layout.tsx +27 -0
  221. package/src/templates/web/ai-platform/template/src/app/page.tsx +203 -0
  222. package/src/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +27 -0
  223. package/src/templates/web/ai-platform/template/src/lib/auth-server.ts +33 -0
  224. package/src/templates/web/ai-platform/template/src/lib/supabase/client.ts +8 -0
  225. package/src/templates/web/ai-platform/template/src/lib/supabase/server.ts +27 -0
  226. package/src/templates/web/ai-platform/template/src/lib/utils.ts +6 -0
  227. package/src/templates/web/ai-platform/template/tsconfig.json +27 -0
  228. package/src/templates/web/iot-dashboard/template/.env.example +12 -0
  229. package/src/templates/web/iot-dashboard/template/README.md +101 -0
  230. package/src/templates/web/iot-dashboard/template/middleware.ts +56 -0
  231. package/src/templates/web/iot-dashboard/template/next.config.js +14 -0
  232. package/src/templates/web/iot-dashboard/template/package.json +49 -0
  233. package/src/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +229 -0
  234. package/src/templates/web/iot-dashboard/template/src/app/globals.css +20 -0
  235. package/src/templates/web/iot-dashboard/template/src/app/layout.tsx +27 -0
  236. package/src/templates/web/iot-dashboard/template/src/app/page.tsx +191 -0
  237. package/src/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +24 -0
  238. package/src/templates/web/iot-dashboard/template/src/lib/auth-server.ts +33 -0
  239. package/src/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +8 -0
  240. package/src/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +27 -0
  241. package/src/templates/web/iot-dashboard/template/src/lib/utils.ts +25 -0
  242. package/src/templates/web/iot-dashboard/template/tsconfig.json +27 -0
  243. package/src/templates/web/marketplace/template/.env.example +12 -0
  244. package/src/templates/web/marketplace/template/README.md +66 -0
  245. package/src/templates/web/marketplace/template/middleware.ts +56 -0
  246. package/src/templates/web/marketplace/template/next.config.js +14 -0
  247. package/src/templates/web/marketplace/template/package.json +51 -0
  248. package/src/templates/web/marketplace/template/src/app/cart/page.tsx +147 -0
  249. package/src/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -0
  250. package/src/templates/web/marketplace/template/src/app/globals.css +20 -0
  251. package/src/templates/web/marketplace/template/src/app/layout.tsx +27 -0
  252. package/src/templates/web/marketplace/template/src/app/page.tsx +167 -0
  253. package/src/templates/web/marketplace/template/src/app/products/page.tsx +129 -0
  254. package/src/templates/web/marketplace/template/src/components/providers/app-providers.tsx +27 -0
  255. package/src/templates/web/marketplace/template/src/lib/auth-server.ts +33 -0
  256. package/src/templates/web/marketplace/template/src/lib/supabase/client.ts +8 -0
  257. package/src/templates/web/marketplace/template/src/lib/supabase/server.ts +27 -0
  258. package/src/templates/web/marketplace/template/src/lib/utils.ts +19 -0
  259. package/src/templates/web/marketplace/template/tsconfig.json +27 -0
  260. package/src/templates/web/micro-saas/template/.env.example +10 -0
  261. package/src/templates/web/micro-saas/template/README.md +63 -0
  262. package/src/templates/web/micro-saas/template/middleware.ts +53 -0
  263. package/src/templates/web/micro-saas/template/next.config.js +14 -0
  264. package/src/templates/web/micro-saas/template/package.json +41 -0
  265. package/src/templates/web/micro-saas/template/src/app/dashboard/page.tsx +117 -0
  266. package/src/templates/web/micro-saas/template/src/app/globals.css +20 -0
  267. package/src/templates/web/micro-saas/template/src/app/layout.tsx +27 -0
  268. package/src/templates/web/micro-saas/template/src/app/login/page.tsx +87 -0
  269. package/src/templates/web/micro-saas/template/src/app/page.tsx +137 -0
  270. package/src/templates/web/micro-saas/template/src/app/signup/page.tsx +108 -0
  271. package/src/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +24 -0
  272. package/src/templates/web/micro-saas/template/src/lib/auth-server.ts +33 -0
  273. package/src/templates/web/micro-saas/template/src/lib/supabase/client.ts +8 -0
  274. package/src/templates/web/micro-saas/template/src/lib/supabase/server.ts +29 -0
  275. package/src/templates/web/micro-saas/template/src/lib/utils.ts +6 -0
  276. package/src/templates/web/micro-saas/template/tsconfig.json +27 -0
  277. package/dist/cli/commands/add.d.ts +0 -6
  278. package/dist/cli/commands/add.d.ts.map +0 -1
  279. package/dist/cli/commands/add.js +0 -39
  280. package/dist/cli/commands/add.js.map +0 -1
  281. package/dist/cli/commands/create.d.ts +0 -45
  282. package/dist/cli/commands/create.d.ts.map +0 -1
  283. package/dist/cli/commands/create.js +0 -175
  284. package/dist/cli/commands/create.js.map +0 -1
  285. package/dist/cli/commands/index.d.ts +0 -4
  286. package/dist/cli/commands/index.d.ts.map +0 -1
  287. package/dist/cli/commands/index.js +0 -20
  288. package/dist/cli/commands/index.js.map +0 -1
  289. package/dist/cli/commands/update.d.ts +0 -6
  290. package/dist/cli/commands/update.d.ts.map +0 -1
  291. package/dist/cli/commands/update.js +0 -68
  292. package/dist/cli/commands/update.js.map +0 -1
  293. package/dist/cli/index.d.ts +0 -4
  294. package/dist/cli/index.d.ts.map +0 -1
  295. package/dist/cli/index.js +0 -61
  296. package/dist/cli/index.js.map +0 -1
  297. package/dist/cli/prompts/index.d.ts +0 -2
  298. package/dist/cli/prompts/index.d.ts.map +0 -1
  299. package/dist/cli/prompts/index.js +0 -18
  300. package/dist/cli/prompts/index.js.map +0 -1
  301. package/dist/cli/prompts/project-setup.d.ts +0 -5
  302. package/dist/cli/prompts/project-setup.d.ts.map +0 -1
  303. package/dist/cli/prompts/project-setup.js +0 -316
  304. package/dist/cli/prompts/project-setup.js.map +0 -1
  305. package/dist/cli/utils/git.d.ts +0 -9
  306. package/dist/cli/utils/git.d.ts.map +0 -1
  307. package/dist/cli/utils/git.js +0 -77
  308. package/dist/cli/utils/git.js.map +0 -1
  309. package/dist/cli/utils/index.d.ts +0 -5
  310. package/dist/cli/utils/index.d.ts.map +0 -1
  311. package/dist/cli/utils/index.js +0 -21
  312. package/dist/cli/utils/index.js.map +0 -1
  313. package/dist/cli/utils/logger.d.ts +0 -16
  314. package/dist/cli/utils/logger.d.ts.map +0 -1
  315. package/dist/cli/utils/logger.js +0 -55
  316. package/dist/cli/utils/logger.js.map +0 -1
  317. package/dist/cli/utils/package-manager.d.ts +0 -8
  318. package/dist/cli/utils/package-manager.d.ts.map +0 -1
  319. package/dist/cli/utils/package-manager.js +0 -92
  320. package/dist/cli/utils/package-manager.js.map +0 -1
  321. package/dist/cli/utils/spinner.d.ts +0 -7
  322. package/dist/cli/utils/spinner.d.ts.map +0 -1
  323. package/dist/cli/utils/spinner.js +0 -48
  324. package/dist/cli/utils/spinner.js.map +0 -1
  325. package/dist/cli/validators/dependencies.d.ts +0 -15
  326. package/dist/cli/validators/dependencies.d.ts.map +0 -1
  327. package/dist/cli/validators/dependencies.js +0 -108
  328. package/dist/cli/validators/dependencies.js.map +0 -1
  329. package/dist/cli/validators/index.d.ts +0 -3
  330. package/dist/cli/validators/index.d.ts.map +0 -1
  331. package/dist/cli/validators/index.js +0 -19
  332. package/dist/cli/validators/index.js.map +0 -1
  333. package/dist/cli/validators/project-name.d.ts +0 -5
  334. package/dist/cli/validators/project-name.d.ts.map +0 -1
  335. package/dist/cli/validators/project-name.js +0 -151
  336. package/dist/cli/validators/project-name.js.map +0 -1
  337. package/dist/generators/file-processor.d.ts +0 -28
  338. package/dist/generators/file-processor.d.ts.map +0 -1
  339. package/dist/generators/file-processor.js +0 -224
  340. package/dist/generators/file-processor.js.map +0 -1
  341. package/dist/generators/index.d.ts +0 -4
  342. package/dist/generators/index.d.ts.map +0 -1
  343. package/dist/generators/index.js +0 -20
  344. package/dist/generators/index.js.map +0 -1
  345. package/dist/generators/package-installer.d.ts +0 -29
  346. package/dist/generators/package-installer.d.ts.map +0 -1
  347. package/dist/generators/package-installer.js +0 -177
  348. package/dist/generators/package-installer.js.map +0 -1
@@ -0,0 +1,147 @@
1
+ 'use client'
2
+
3
+ import { useState } from 'react'
4
+ import { Button, Card } from '@digilogiclabs/saas-factory-ui'
5
+ import { Trash2, Plus, Minus, ShoppingBag, ArrowRight } from 'lucide-react'
6
+ import Link from 'next/link'
7
+
8
+ interface CartItem {
9
+ id: number
10
+ name: string
11
+ price: number
12
+ vendor: string
13
+ quantity: number
14
+ }
15
+
16
+ const INITIAL_CART: CartItem[] = [
17
+ { id: 1, name: 'Premium Widget Pro', price: 49.99, vendor: 'TechCo', quantity: 1 },
18
+ { id: 2, name: 'Developer Toolkit', price: 129.99, vendor: 'DevTools', quantity: 1 },
19
+ ]
20
+
21
+ export default function CartPage() {
22
+ const [cartItems, setCartItems] = useState<CartItem[]>(INITIAL_CART)
23
+
24
+ const updateQuantity = (id: number, delta: number) => {
25
+ setCartItems(items =>
26
+ items.map(item =>
27
+ item.id === id
28
+ ? { ...item, quantity: Math.max(1, item.quantity + delta) }
29
+ : item
30
+ )
31
+ )
32
+ }
33
+
34
+ const removeItem = (id: number) => {
35
+ setCartItems(items => items.filter(item => item.id !== id))
36
+ }
37
+
38
+ const subtotal = cartItems.reduce((sum, item) => sum + item.price * item.quantity, 0)
39
+ const platformFee = subtotal * 0.05
40
+ const total = subtotal + platformFee
41
+
42
+ return (
43
+ <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
44
+ <div className="max-w-4xl mx-auto px-4 py-8">
45
+ <div className="flex items-center justify-between mb-8">
46
+ <h1 className="text-3xl font-bold text-gray-900 dark:text-white">Shopping Cart</h1>
47
+ <Link href="/products">
48
+ <Button variant="outline" size="sm">Continue Shopping</Button>
49
+ </Link>
50
+ </div>
51
+
52
+ {cartItems.length === 0 ? (
53
+ <Card className="p-12 text-center">
54
+ <ShoppingBag className="w-16 h-16 mx-auto mb-4 text-gray-400" />
55
+ <h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2">
56
+ Your cart is empty
57
+ </h2>
58
+ <p className="text-gray-600 dark:text-gray-300 mb-6">
59
+ Browse our products and add items to your cart.
60
+ </p>
61
+ <Link href="/products">
62
+ <Button>Browse Products</Button>
63
+ </Link>
64
+ </Card>
65
+ ) : (
66
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
67
+ {/* Cart Items */}
68
+ <div className="lg:col-span-2 space-y-4">
69
+ {cartItems.map((item) => (
70
+ <Card key={item.id} className="p-4">
71
+ <div className="flex items-center gap-4">
72
+ <div className="w-20 h-20 bg-gray-100 dark:bg-gray-700 rounded-lg flex-shrink-0" />
73
+ <div className="flex-1">
74
+ <h3 className="font-semibold text-gray-900 dark:text-white">{item.name}</h3>
75
+ <p className="text-sm text-gray-500">by {item.vendor}</p>
76
+ <p className="text-lg font-bold text-blue-600 mt-1">${item.price}</p>
77
+ </div>
78
+ <div className="flex items-center gap-2">
79
+ <Button
80
+ variant="outline"
81
+ size="sm"
82
+ onClick={() => updateQuantity(item.id, -1)}
83
+ >
84
+ <Minus className="w-4 h-4" />
85
+ </Button>
86
+ <span className="w-8 text-center">{item.quantity}</span>
87
+ <Button
88
+ variant="outline"
89
+ size="sm"
90
+ onClick={() => updateQuantity(item.id, 1)}
91
+ >
92
+ <Plus className="w-4 h-4" />
93
+ </Button>
94
+ </div>
95
+ <Button
96
+ variant="ghost"
97
+ size="sm"
98
+ onClick={() => removeItem(item.id)}
99
+ className="text-red-600 hover:text-red-700"
100
+ >
101
+ <Trash2 className="w-4 h-4" />
102
+ </Button>
103
+ </div>
104
+ </Card>
105
+ ))}
106
+ </div>
107
+
108
+ {/* Order Summary */}
109
+ <div className="lg:col-span-1">
110
+ <Card className="p-6 sticky top-24">
111
+ <h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
112
+ Order Summary
113
+ </h2>
114
+
115
+ <div className="space-y-3 mb-6">
116
+ <div className="flex justify-between text-gray-600 dark:text-gray-300">
117
+ <span>Subtotal</span>
118
+ <span>${subtotal.toFixed(2)}</span>
119
+ </div>
120
+ <div className="flex justify-between text-gray-600 dark:text-gray-300">
121
+ <span>Platform Fee (5%)</span>
122
+ <span>${platformFee.toFixed(2)}</span>
123
+ </div>
124
+ <div className="border-t border-gray-200 dark:border-gray-700 pt-3">
125
+ <div className="flex justify-between font-bold text-gray-900 dark:text-white">
126
+ <span>Total</span>
127
+ <span>${total.toFixed(2)}</span>
128
+ </div>
129
+ </div>
130
+ </div>
131
+
132
+ <Button className="w-full" size="lg">
133
+ Checkout
134
+ <ArrowRight className="w-4 h-4 ml-2" />
135
+ </Button>
136
+
137
+ <p className="text-xs text-gray-500 text-center mt-4">
138
+ Secure checkout powered by Stripe
139
+ </p>
140
+ </Card>
141
+ </div>
142
+ </div>
143
+ )}
144
+ </div>
145
+ </div>
146
+ )
147
+ }
@@ -0,0 +1,149 @@
1
+ import { Suspense } from 'react'
2
+ import { Button, Card } from '@digilogiclabs/saas-factory-ui'
3
+ import { Package, DollarSign, ShoppingBag, TrendingUp, Plus } from 'lucide-react'
4
+ import { requireAuth } from '@/lib/auth-server'
5
+ import Link from 'next/link'
6
+
7
+ async function getSellerStats(userId: string) {
8
+ await new Promise(resolve => setTimeout(resolve, 100))
9
+ return {
10
+ totalProducts: 12,
11
+ totalSales: 45,
12
+ revenue: 2340.50,
13
+ views: 1520,
14
+ }
15
+ }
16
+
17
+ function StatCard({ title, value, icon: Icon, trend }: {
18
+ title: string
19
+ value: string | number
20
+ icon: React.ComponentType<{ className?: string }>
21
+ trend?: string
22
+ }) {
23
+ return (
24
+ <Card className="p-6">
25
+ <div className="flex items-center justify-between">
26
+ <div>
27
+ <p className="text-sm font-medium text-gray-600 dark:text-gray-400">{title}</p>
28
+ <p className="text-2xl font-bold text-gray-900 dark:text-white">{value}</p>
29
+ {trend && <p className="text-sm text-green-600 mt-1">{trend}</p>}
30
+ </div>
31
+ <div className="w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center">
32
+ <Icon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
33
+ </div>
34
+ </div>
35
+ </Card>
36
+ )
37
+ }
38
+
39
+ async function SellerStats({ userId }: { userId: string }) {
40
+ const stats = await getSellerStats(userId)
41
+
42
+ return (
43
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
44
+ <StatCard title="Total Products" value={stats.totalProducts} icon={Package} />
45
+ <StatCard title="Total Sales" value={stats.totalSales} icon={ShoppingBag} trend="+12% this week" />
46
+ <StatCard title="Revenue" value={`$${stats.revenue.toFixed(2)}`} icon={DollarSign} trend="+8% this month" />
47
+ <StatCard title="Product Views" value={stats.views.toLocaleString()} icon={TrendingUp} />
48
+ </div>
49
+ )
50
+ }
51
+
52
+ function StatsSkeleton() {
53
+ return (
54
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
55
+ {[...Array(4)].map((_, i) => (
56
+ <Card key={i} className="p-6">
57
+ <div className="animate-pulse">
58
+ <div className="h-4 bg-gray-200 dark:bg-gray-700 rounded w-1/2 mb-2"></div>
59
+ <div className="h-8 bg-gray-200 dark:bg-gray-700 rounded w-1/3"></div>
60
+ </div>
61
+ </Card>
62
+ ))}
63
+ </div>
64
+ )
65
+ }
66
+
67
+ export default async function DashboardPage() {
68
+ const user = await requireAuth()
69
+
70
+ return (
71
+ <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
72
+ <div className="max-w-7xl mx-auto px-4 py-8">
73
+ {/* Header */}
74
+ <div className="flex items-center justify-between mb-8">
75
+ <div>
76
+ <h1 className="text-3xl font-bold text-gray-900 dark:text-white">
77
+ Seller Dashboard
78
+ </h1>
79
+ <p className="text-gray-600 dark:text-gray-300 mt-1">
80
+ Welcome back, {user.name || user.email}
81
+ </p>
82
+ </div>
83
+ <Link href="/products/new">
84
+ <Button>
85
+ <Plus className="w-4 h-4 mr-2" />
86
+ Add Product
87
+ </Button>
88
+ </Link>
89
+ </div>
90
+
91
+ {/* Stats */}
92
+ <Suspense fallback={<StatsSkeleton />}>
93
+ <SellerStats userId={user.id} />
94
+ </Suspense>
95
+
96
+ {/* Quick Actions */}
97
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
98
+ <Card className="p-6">
99
+ <div className="flex items-center mb-4">
100
+ <Package className="h-6 w-6 text-blue-600 mr-3" />
101
+ <h3 className="text-lg font-semibold">My Products</h3>
102
+ </div>
103
+ <p className="text-gray-600 dark:text-gray-300 mb-4">
104
+ Manage your product listings and inventory.
105
+ </p>
106
+ <Link href="/products/manage">
107
+ <Button className="w-full">View Products</Button>
108
+ </Link>
109
+ </Card>
110
+
111
+ <Card className="p-6">
112
+ <div className="flex items-center mb-4">
113
+ <ShoppingBag className="h-6 w-6 text-blue-600 mr-3" />
114
+ <h3 className="text-lg font-semibold">Orders</h3>
115
+ </div>
116
+ <p className="text-gray-600 dark:text-gray-300 mb-4">
117
+ View and manage customer orders.
118
+ </p>
119
+ <Link href="/orders">
120
+ <Button variant="outline" className="w-full">View Orders</Button>
121
+ </Link>
122
+ </Card>
123
+
124
+ <Card className="p-6">
125
+ <div className="flex items-center mb-4">
126
+ <DollarSign className="h-6 w-6 text-blue-600 mr-3" />
127
+ <h3 className="text-lg font-semibold">Payouts</h3>
128
+ </div>
129
+ <p className="text-gray-600 dark:text-gray-300 mb-4">
130
+ View earnings and payout history.
131
+ </p>
132
+ <Link href="/payouts">
133
+ <Button variant="outline" className="w-full">View Payouts</Button>
134
+ </Link>
135
+ </Card>
136
+ </div>
137
+
138
+ {/* Recent Orders */}
139
+ <Card className="p-6">
140
+ <h3 className="text-lg font-semibold mb-4">Recent Orders</h3>
141
+ <div className="text-center py-8 text-gray-500">
142
+ <ShoppingBag className="w-12 h-12 mx-auto mb-4 opacity-50" />
143
+ <p>No orders yet. Share your products to start selling!</p>
144
+ </div>
145
+ </Card>
146
+ </div>
147
+ </div>
148
+ )
149
+ }
@@ -0,0 +1,20 @@
1
+ @import "tailwindcss";
2
+
3
+ @theme {
4
+ --color-primary: oklch(24% 0.15 256);
5
+ --color-background: oklch(100% 0 0);
6
+ --color-foreground: oklch(10% 0 0);
7
+ --font-sans: 'Inter', system-ui, sans-serif;
8
+ --radius: 0.5rem;
9
+ }
10
+
11
+ .dark {
12
+ --color-background: oklch(15% 0.02 256);
13
+ --color-foreground: oklch(95% 0 0);
14
+ }
15
+
16
+ body {
17
+ font-family: var(--font-sans);
18
+ background-color: var(--color-background);
19
+ color: var(--color-foreground);
20
+ }
@@ -0,0 +1,27 @@
1
+ import type { Metadata } from 'next'
2
+ import { Inter } from 'next/font/google'
3
+ import './globals.css'
4
+ import { AppProviders } from '@/components/providers/app-providers'
5
+
6
+ const inter = Inter({ subsets: ['latin'] })
7
+
8
+ export const metadata: Metadata = {
9
+ title: '{{titleCaseName}} - Digital Marketplace',
10
+ description: '{{description}}',
11
+ }
12
+
13
+ export default function RootLayout({
14
+ children,
15
+ }: {
16
+ children: React.ReactNode
17
+ }) {
18
+ return (
19
+ <html lang="en" suppressHydrationWarning>
20
+ <body className={inter.className}>
21
+ <AppProviders>
22
+ {children}
23
+ </AppProviders>
24
+ </body>
25
+ </html>
26
+ )
27
+ }
@@ -0,0 +1,167 @@
1
+ 'use client'
2
+
3
+ import { Button, Card } from '@digilogiclabs/saas-factory-ui'
4
+ import { useAuth } from '@digilogiclabs/app-sdk'
5
+ import { ShoppingCart, Store, Search, Star, ArrowRight, User, LogOut } from 'lucide-react'
6
+ import Link from 'next/link'
7
+ import { useState } from 'react'
8
+
9
+ const FEATURED_PRODUCTS = [
10
+ { id: 1, name: 'Premium Widget', price: 49.99, vendor: 'TechCo', rating: 4.8, image: '/placeholder.jpg' },
11
+ { id: 2, name: 'Pro Toolkit', price: 129.99, vendor: 'DevTools', rating: 4.9, image: '/placeholder.jpg' },
12
+ { id: 3, name: 'Designer Pack', price: 79.99, vendor: 'CreativeStudio', rating: 4.7, image: '/placeholder.jpg' },
13
+ { id: 4, name: 'Analytics Suite', price: 199.99, vendor: 'DataCorp', rating: 4.6, image: '/placeholder.jpg' },
14
+ ]
15
+
16
+ const CATEGORIES = [
17
+ { name: 'Software', count: 234, icon: '💻' },
18
+ { name: 'Templates', count: 156, icon: '📄' },
19
+ { name: 'Services', count: 89, icon: '🔧' },
20
+ { name: 'Courses', count: 67, icon: '📚' },
21
+ ]
22
+
23
+ export default function Home() {
24
+ const { user, signOut, loading } = useAuth()
25
+ const [searchQuery, setSearchQuery] = useState('')
26
+
27
+ const projectName = "{{titleCaseName}}"
28
+
29
+ const handleSignOut = async () => {
30
+ try {
31
+ await signOut()
32
+ } catch (err) {
33
+ console.error('Sign out error:', err)
34
+ }
35
+ }
36
+
37
+ return (
38
+ <main className="min-h-screen bg-gray-50 dark:bg-gray-900">
39
+ {/* Header */}
40
+ <header className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50">
41
+ <div className="max-w-7xl mx-auto px-4 py-4">
42
+ <div className="flex items-center justify-between">
43
+ <Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
44
+ {projectName}
45
+ </Link>
46
+
47
+ {/* Search */}
48
+ <div className="flex-1 max-w-xl mx-8">
49
+ <div className="relative">
50
+ <Search className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
51
+ <input
52
+ type="text"
53
+ placeholder="Search products..."
54
+ value={searchQuery}
55
+ onChange={(e) => setSearchQuery(e.target.value)}
56
+ className="w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
57
+ />
58
+ </div>
59
+ </div>
60
+
61
+ {/* Actions */}
62
+ <div className="flex items-center gap-4">
63
+ <Link href="/cart">
64
+ <Button variant="outline" size="sm">
65
+ <ShoppingCart className="w-4 h-4 mr-2" />
66
+ Cart
67
+ </Button>
68
+ </Link>
69
+ {loading ? (
70
+ <div className="text-sm text-gray-600">Loading...</div>
71
+ ) : user ? (
72
+ <div className="flex items-center gap-2">
73
+ <Link href="/dashboard">
74
+ <Button variant="outline" size="sm">
75
+ <User className="w-4 h-4 mr-2" />
76
+ Dashboard
77
+ </Button>
78
+ </Link>
79
+ <Button variant="ghost" size="sm" onClick={handleSignOut}>
80
+ <LogOut className="w-4 h-4" />
81
+ </Button>
82
+ </div>
83
+ ) : (
84
+ <div className="flex gap-2">
85
+ <Link href="/login">
86
+ <Button variant="outline" size="sm">Sign In</Button>
87
+ </Link>
88
+ <Link href="/signup">
89
+ <Button size="sm">Get Started</Button>
90
+ </Link>
91
+ </div>
92
+ )}
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </header>
97
+
98
+ <div className="max-w-7xl mx-auto px-4 py-8">
99
+ {/* Hero */}
100
+ <div className="text-center mb-12">
101
+ <h1 className="text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4">
102
+ Your Digital Marketplace
103
+ </h1>
104
+ <p className="text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto">
105
+ Discover amazing products from verified vendors. Buy and sell with confidence.
106
+ </p>
107
+ </div>
108
+
109
+ {/* Categories */}
110
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-12">
111
+ {CATEGORIES.map((category) => (
112
+ <Card key={category.name} className="p-6 text-center hover:shadow-lg transition-shadow cursor-pointer">
113
+ <div className="text-4xl mb-3">{category.icon}</div>
114
+ <h3 className="font-semibold text-gray-900 dark:text-white">{category.name}</h3>
115
+ <p className="text-sm text-gray-500">{category.count} items</p>
116
+ </Card>
117
+ ))}
118
+ </div>
119
+
120
+ {/* Featured Products */}
121
+ <div className="mb-12">
122
+ <div className="flex items-center justify-between mb-6">
123
+ <h2 className="text-2xl font-bold text-gray-900 dark:text-white">Featured Products</h2>
124
+ <Link href="/products">
125
+ <Button variant="ghost">
126
+ View All
127
+ <ArrowRight className="w-4 h-4 ml-2" />
128
+ </Button>
129
+ </Link>
130
+ </div>
131
+
132
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
133
+ {FEATURED_PRODUCTS.map((product) => (
134
+ <Card key={product.id} className="overflow-hidden hover:shadow-lg transition-shadow">
135
+ <div className="aspect-square bg-gray-100 dark:bg-gray-700" />
136
+ <div className="p-4">
137
+ <h3 className="font-semibold text-gray-900 dark:text-white mb-1">{product.name}</h3>
138
+ <p className="text-sm text-gray-500 mb-2">by {product.vendor}</p>
139
+ <div className="flex items-center justify-between">
140
+ <span className="text-lg font-bold text-blue-600">${product.price}</span>
141
+ <div className="flex items-center text-yellow-500">
142
+ <Star className="w-4 h-4 fill-current" />
143
+ <span className="text-sm ml-1">{product.rating}</span>
144
+ </div>
145
+ </div>
146
+ <Button className="w-full mt-3" size="sm">Add to Cart</Button>
147
+ </div>
148
+ </Card>
149
+ ))}
150
+ </div>
151
+ </div>
152
+
153
+ {/* Become a Vendor CTA */}
154
+ <Card className="p-8 bg-gradient-to-r from-blue-600 to-purple-600 text-white text-center">
155
+ <Store className="w-12 h-12 mx-auto mb-4" />
156
+ <h2 className="text-2xl font-bold mb-2">Become a Vendor</h2>
157
+ <p className="mb-6 opacity-90 max-w-md mx-auto">
158
+ Start selling your products to thousands of customers. Low fees, powerful tools.
159
+ </p>
160
+ <Link href="/vendors/apply">
161
+ <Button variant="secondary" size="lg">Apply Now</Button>
162
+ </Link>
163
+ </Card>
164
+ </div>
165
+ </main>
166
+ )
167
+ }
@@ -0,0 +1,129 @@
1
+ 'use client'
2
+
3
+ import { useState } from 'react'
4
+ import { Button, Card } from '@digilogiclabs/saas-factory-ui'
5
+ import { Search, Filter, Star, ShoppingCart } from 'lucide-react'
6
+ import Link from 'next/link'
7
+
8
+ const PRODUCTS = [
9
+ { id: 1, name: 'Premium Widget Pro', price: 49.99, vendor: 'TechCo', rating: 4.8, category: 'Software', sales: 234 },
10
+ { id: 2, name: 'Developer Toolkit', price: 129.99, vendor: 'DevTools', rating: 4.9, category: 'Software', sales: 156 },
11
+ { id: 3, name: 'UI Design Pack', price: 79.99, vendor: 'CreativeStudio', rating: 4.7, category: 'Templates', sales: 89 },
12
+ { id: 4, name: 'Analytics Dashboard', price: 199.99, vendor: 'DataCorp', rating: 4.6, category: 'Software', sales: 67 },
13
+ { id: 5, name: 'Marketing Templates', price: 39.99, vendor: 'GrowthLab', rating: 4.5, category: 'Templates', sales: 312 },
14
+ { id: 6, name: 'API Integration Kit', price: 149.99, vendor: 'APIExperts', rating: 4.8, category: 'Software', sales: 178 },
15
+ { id: 7, name: 'SEO Course Bundle', price: 99.99, vendor: 'SEOMasters', rating: 4.9, category: 'Courses', sales: 245 },
16
+ { id: 8, name: 'Cloud Consulting', price: 299.99, vendor: 'CloudPros', rating: 4.7, category: 'Services', sales: 45 },
17
+ ]
18
+
19
+ const CATEGORIES = ['All', 'Software', 'Templates', 'Courses', 'Services']
20
+
21
+ export default function ProductsPage() {
22
+ const [searchQuery, setSearchQuery] = useState('')
23
+ const [selectedCategory, setSelectedCategory] = useState('All')
24
+ const [sortBy, setSortBy] = useState('popular')
25
+
26
+ const filteredProducts = PRODUCTS
27
+ .filter(p => selectedCategory === 'All' || p.category === selectedCategory)
28
+ .filter(p => p.name.toLowerCase().includes(searchQuery.toLowerCase()))
29
+ .sort((a, b) => {
30
+ if (sortBy === 'popular') return b.sales - a.sales
31
+ if (sortBy === 'price-low') return a.price - b.price
32
+ if (sortBy === 'price-high') return b.price - a.price
33
+ if (sortBy === 'rating') return b.rating - a.rating
34
+ return 0
35
+ })
36
+
37
+ return (
38
+ <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
39
+ {/* Header */}
40
+ <div className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700">
41
+ <div className="max-w-7xl mx-auto px-4 py-6">
42
+ <h1 className="text-3xl font-bold text-gray-900 dark:text-white mb-4">Products</h1>
43
+
44
+ {/* Search and Filters */}
45
+ <div className="flex flex-col md:flex-row gap-4">
46
+ <div className="flex-1 relative">
47
+ <Search className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
48
+ <input
49
+ type="text"
50
+ placeholder="Search products..."
51
+ value={searchQuery}
52
+ onChange={(e) => setSearchQuery(e.target.value)}
53
+ className="w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
54
+ />
55
+ </div>
56
+
57
+ <div className="flex gap-2">
58
+ <select
59
+ value={sortBy}
60
+ onChange={(e) => setSortBy(e.target.value)}
61
+ className="px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
62
+ >
63
+ <option value="popular">Most Popular</option>
64
+ <option value="rating">Highest Rated</option>
65
+ <option value="price-low">Price: Low to High</option>
66
+ <option value="price-high">Price: High to Low</option>
67
+ </select>
68
+ </div>
69
+ </div>
70
+
71
+ {/* Categories */}
72
+ <div className="flex gap-2 mt-4 overflow-x-auto pb-2">
73
+ {CATEGORIES.map((category) => (
74
+ <Button
75
+ key={category}
76
+ variant={selectedCategory === category ? 'default' : 'outline'}
77
+ size="sm"
78
+ onClick={() => setSelectedCategory(category)}
79
+ >
80
+ {category}
81
+ </Button>
82
+ ))}
83
+ </div>
84
+ </div>
85
+ </div>
86
+
87
+ {/* Products Grid */}
88
+ <div className="max-w-7xl mx-auto px-4 py-8">
89
+ <div className="flex items-center justify-between mb-6">
90
+ <p className="text-gray-600 dark:text-gray-300">
91
+ {filteredProducts.length} products found
92
+ </p>
93
+ </div>
94
+
95
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
96
+ {filteredProducts.map((product) => (
97
+ <Card key={product.id} className="overflow-hidden hover:shadow-lg transition-shadow">
98
+ <div className="aspect-square bg-gray-100 dark:bg-gray-700 relative">
99
+ <span className="absolute top-2 left-2 bg-blue-600 text-white text-xs px-2 py-1 rounded">
100
+ {product.category}
101
+ </span>
102
+ </div>
103
+ <div className="p-4">
104
+ <h3 className="font-semibold text-gray-900 dark:text-white mb-1">{product.name}</h3>
105
+ <p className="text-sm text-gray-500 mb-2">by {product.vendor}</p>
106
+ <div className="flex items-center justify-between mb-3">
107
+ <span className="text-lg font-bold text-blue-600">${product.price}</span>
108
+ <div className="flex items-center text-yellow-500">
109
+ <Star className="w-4 h-4 fill-current" />
110
+ <span className="text-sm ml-1">{product.rating}</span>
111
+ </div>
112
+ </div>
113
+ <div className="flex gap-2">
114
+ <Button className="flex-1" size="sm">
115
+ <ShoppingCart className="w-4 h-4 mr-1" />
116
+ Add
117
+ </Button>
118
+ <Link href={`/products/${product.id}`} className="flex-1">
119
+ <Button variant="outline" size="sm" className="w-full">View</Button>
120
+ </Link>
121
+ </div>
122
+ </div>
123
+ </Card>
124
+ ))}
125
+ </div>
126
+ </div>
127
+ </div>
128
+ )
129
+ }
@@ -0,0 +1,27 @@
1
+ 'use client'
2
+
3
+ import { ThemeProvider } from 'next-themes'
4
+ import { DLLProvider } from '@digilogiclabs/app-sdk'
5
+
6
+ interface AppProvidersProps {
7
+ children: React.ReactNode
8
+ }
9
+
10
+ export function AppProviders({ children }: AppProvidersProps) {
11
+ return (
12
+ <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
13
+ <DLLProvider
14
+ config={{
15
+ auth: {
16
+ provider: 'supabase',
17
+ },
18
+ payments: {
19
+ provider: 'stripe',
20
+ },
21
+ }}
22
+ >
23
+ {children}
24
+ </DLLProvider>
25
+ </ThemeProvider>
26
+ )
27
+ }