@digilogiclabs/create-saas-app 2.9.1 → 2.11.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.
- package/README.md +153 -113
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/commands/create.d.ts.map +1 -1
- package/dist/cli/commands/create.js +2 -6
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +6 -3
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/shared/auth/supabase/web/src/middleware.ts +63 -0
- package/dist/templates/shared/database/supabase/web/src/lib/supabase/server.ts +3 -1
- package/dist/templates/shared/design/web/src/config/design.config.ts +14 -14
- package/dist/templates/shared/landing/web/src/components/LandingPage.tsx +0 -3
- package/dist/templates/shared/security/web/src/lib/api-security.ts +2 -2
- package/dist/templates/web/ai-platform/template/next.config.js +14 -14
- package/dist/templates/web/ai-platform/template/package.json +11 -22
- package/dist/templates/web/ai-platform/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ai-platform/template/src/app/api/auth/route.ts +57 -0
- package/dist/templates/web/ai-platform/template/src/app/chat/page.tsx +234 -235
- package/dist/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -142
- package/dist/templates/web/ai-platform/template/src/app/error.tsx +13 -13
- package/dist/templates/web/ai-platform/template/src/app/globals.css +97 -34
- package/dist/templates/web/ai-platform/template/src/app/layout.tsx +3 -0
- package/dist/templates/web/ai-platform/template/src/app/loading.tsx +22 -22
- package/dist/templates/web/ai-platform/template/src/app/login/page.tsx +112 -0
- package/dist/templates/web/ai-platform/template/src/app/models/page.tsx +186 -0
- package/dist/templates/web/ai-platform/template/src/app/page.tsx +248 -154
- package/dist/templates/web/ai-platform/template/src/app/playground/page.tsx +251 -0
- package/dist/templates/web/ai-platform/template/src/app/settings/page.tsx +190 -0
- package/dist/templates/web/ai-platform/template/src/app/signup/page.tsx +133 -0
- package/dist/templates/web/ai-platform/template/src/lib/auth-server.ts +32 -33
- package/dist/templates/web/ai-platform/template/src/lib/auth-session.ts +52 -0
- package/dist/templates/web/base/template/next.config.js +14 -15
- package/dist/templates/web/base/template/package.json +16 -31
- package/dist/templates/web/base/template/postcss.config.mjs +8 -0
- package/dist/templates/web/base/template/src/app/error.tsx +97 -97
- package/dist/templates/web/base/template/src/app/globals.css +87 -148
- package/dist/templates/web/base/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/base/template/src/app/loading.tsx +52 -52
- package/dist/templates/web/base/template/tsconfig.json +27 -33
- package/dist/templates/web/iot-dashboard/template/next.config.js +14 -14
- package/dist/templates/web/iot-dashboard/template/package.json +12 -16
- package/dist/templates/web/iot-dashboard/template/postcss.config.mjs +8 -0
- package/dist/templates/web/iot-dashboard/template/src/app/alerts/page.tsx +157 -0
- package/dist/templates/web/iot-dashboard/template/src/app/api/auth/route.ts +57 -0
- package/dist/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +224 -224
- package/dist/templates/web/iot-dashboard/template/src/app/devices/[id]/page.tsx +204 -0
- package/dist/templates/web/iot-dashboard/template/src/app/devices/new/page.tsx +139 -0
- package/dist/templates/web/iot-dashboard/template/src/app/devices/page.tsx +171 -0
- package/dist/templates/web/iot-dashboard/template/src/app/error.tsx +8 -8
- package/dist/templates/web/iot-dashboard/template/src/app/globals.css +97 -20
- package/dist/templates/web/iot-dashboard/template/src/app/layout.tsx +3 -0
- package/dist/templates/web/iot-dashboard/template/src/app/loading.tsx +5 -5
- package/dist/templates/web/iot-dashboard/template/src/app/login/page.tsx +112 -0
- package/dist/templates/web/iot-dashboard/template/src/app/page.tsx +266 -189
- package/dist/templates/web/iot-dashboard/template/src/app/settings/page.tsx +186 -0
- package/dist/templates/web/iot-dashboard/template/src/app/signup/page.tsx +133 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/auth-server.ts +32 -33
- package/dist/templates/web/iot-dashboard/template/src/lib/auth-session.ts +52 -0
- package/dist/templates/web/marketplace/template/next.config.js +14 -14
- package/dist/templates/web/marketplace/template/package.json +11 -18
- package/dist/templates/web/marketplace/template/postcss.config.mjs +8 -0
- package/dist/templates/web/marketplace/template/src/app/api/auth/route.ts +57 -0
- package/dist/templates/web/marketplace/template/src/app/cart/page.tsx +147 -147
- package/dist/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -149
- package/dist/templates/web/marketplace/template/src/app/error.tsx +7 -7
- package/dist/templates/web/marketplace/template/src/app/globals.css +97 -20
- package/dist/templates/web/marketplace/template/src/app/layout.tsx +3 -0
- package/dist/templates/web/marketplace/template/src/app/loading.tsx +5 -5
- package/dist/templates/web/marketplace/template/src/app/login/page.tsx +112 -0
- package/dist/templates/web/marketplace/template/src/app/orders/page.tsx +160 -0
- package/dist/templates/web/marketplace/template/src/app/page.tsx +370 -169
- package/dist/templates/web/marketplace/template/src/app/products/[id]/page.tsx +218 -0
- package/dist/templates/web/marketplace/template/src/app/products/page.tsx +129 -129
- package/dist/templates/web/marketplace/template/src/app/settings/page.tsx +150 -0
- package/dist/templates/web/marketplace/template/src/app/signup/page.tsx +133 -0
- package/dist/templates/web/marketplace/template/src/lib/auth-server.ts +32 -33
- package/dist/templates/web/marketplace/template/src/lib/auth-session.ts +52 -0
- package/dist/templates/web/micro-saas/template/next.config.js +14 -14
- package/dist/templates/web/micro-saas/template/package.json +9 -8
- package/dist/templates/web/micro-saas/template/postcss.config.mjs +8 -0
- package/dist/templates/web/micro-saas/template/src/app/api/auth/route.ts +57 -0
- package/dist/templates/web/micro-saas/template/src/app/dashboard/page.tsx +145 -117
- package/dist/templates/web/micro-saas/template/src/app/error.tsx +7 -7
- package/dist/templates/web/micro-saas/template/src/app/globals.css +97 -20
- package/dist/templates/web/micro-saas/template/src/app/layout.tsx +3 -0
- package/dist/templates/web/micro-saas/template/src/app/loading.tsx +43 -27
- package/dist/templates/web/micro-saas/template/src/app/login/page.tsx +112 -87
- package/dist/templates/web/micro-saas/template/src/app/page.tsx +227 -137
- package/dist/templates/web/micro-saas/template/src/app/signup/page.tsx +133 -108
- package/dist/templates/web/micro-saas/template/src/lib/auth-server.ts +32 -33
- package/dist/templates/web/micro-saas/template/src/lib/auth-session.ts +52 -0
- package/dist/templates/web/ui-auth/template/next.config.js +14 -12
- package/dist/templates/web/ui-auth/template/package.json +16 -26
- package/dist/templates/web/ui-auth/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-auth/template/src/app/error.tsx +67 -67
- package/dist/templates/web/ui-auth/template/src/app/globals.css +85 -84
- package/dist/templates/web/ui-auth/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/ui-auth/template/src/app/loading.tsx +20 -38
- package/dist/templates/web/ui-auth/template/tsconfig.json +27 -33
- package/dist/templates/web/ui-auth-ai/template/next.config.js +15 -13
- package/dist/templates/web/ui-auth-ai/template/package.json +25 -21
- package/dist/templates/web/ui-auth-ai/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-auth-ai/template/src/app/error.tsx +7 -7
- package/dist/templates/web/ui-auth-ai/template/src/app/globals.css +87 -25
- package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +3 -0
- package/dist/templates/web/ui-auth-ai/template/src/app/loading.tsx +4 -4
- package/dist/templates/web/ui-auth-ai/template/tsconfig.json +27 -28
- package/dist/templates/web/ui-auth-payments/template/next.config.js +14 -12
- package/dist/templates/web/ui-auth-payments/template/package.json +16 -29
- package/dist/templates/web/ui-auth-payments/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/error.tsx +67 -67
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +89 -204
- package/dist/templates/web/ui-auth-payments/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/ui-auth-payments/template/src/app/loading.tsx +20 -20
- package/dist/templates/web/ui-auth-payments/template/tsconfig.json +27 -33
- package/dist/templates/web/ui-auth-payments-ai/template/next.config.js +14 -12
- package/dist/templates/web/ui-auth-payments-ai/template/package.json +17 -33
- package/dist/templates/web/ui-auth-payments-ai/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/error.tsx +67 -67
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +85 -85
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/loading.tsx +20 -20
- package/dist/templates/web/ui-auth-payments-ai/template/tsconfig.json +27 -33
- package/dist/templates/web/ui-auth-payments-audio/template/next.config.js +14 -12
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +17 -30
- package/dist/templates/web/ui-auth-payments-audio/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/error.tsx +67 -67
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +85 -85
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/loading.tsx +20 -20
- package/dist/templates/web/ui-auth-payments-audio/template/tsconfig.json +27 -33
- package/dist/templates/web/ui-auth-payments-video/template/next.config.js +14 -12
- package/dist/templates/web/ui-auth-payments-video/template/package.json +17 -30
- package/dist/templates/web/ui-auth-payments-video/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/error.tsx +67 -67
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +89 -221
- package/dist/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/app/loading.tsx +20 -20
- package/dist/templates/web/ui-auth-payments-video/template/tsconfig.json +27 -33
- package/dist/templates/web/ui-only/template/next.config.js +14 -12
- package/dist/templates/web/ui-only/template/package.json +15 -25
- package/dist/templates/web/ui-only/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-only/template/src/app/error.tsx +67 -67
- package/dist/templates/web/ui-only/template/src/app/globals.css +85 -31
- package/dist/templates/web/ui-only/template/src/app/layout.tsx +4 -1
- package/dist/templates/web/ui-only/template/src/app/loading.tsx +20 -20
- package/dist/templates/web/ui-only/template/tsconfig.json +27 -33
- package/package.json +1 -1
- package/src/templates/shared/auth/supabase/web/src/middleware.ts +63 -0
- package/src/templates/shared/database/supabase/web/src/lib/supabase/server.ts +3 -1
- package/src/templates/shared/design/web/src/config/design.config.ts +14 -14
- package/src/templates/shared/landing/web/src/components/LandingPage.tsx +0 -3
- package/src/templates/shared/security/web/src/lib/api-security.ts +2 -2
- package/src/templates/web/ai-platform/template/next.config.js +14 -14
- package/src/templates/web/ai-platform/template/package.json +11 -22
- package/src/templates/web/ai-platform/template/postcss.config.mjs +8 -0
- package/src/templates/web/ai-platform/template/src/app/api/auth/route.ts +57 -0
- package/src/templates/web/ai-platform/template/src/app/chat/page.tsx +234 -235
- package/src/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -142
- package/src/templates/web/ai-platform/template/src/app/error.tsx +13 -13
- package/src/templates/web/ai-platform/template/src/app/globals.css +97 -34
- package/src/templates/web/ai-platform/template/src/app/layout.tsx +3 -0
- package/src/templates/web/ai-platform/template/src/app/loading.tsx +22 -22
- package/src/templates/web/ai-platform/template/src/app/login/page.tsx +112 -0
- package/src/templates/web/ai-platform/template/src/app/models/page.tsx +186 -0
- package/src/templates/web/ai-platform/template/src/app/page.tsx +248 -154
- package/src/templates/web/ai-platform/template/src/app/playground/page.tsx +251 -0
- package/src/templates/web/ai-platform/template/src/app/settings/page.tsx +190 -0
- package/src/templates/web/ai-platform/template/src/app/signup/page.tsx +133 -0
- package/src/templates/web/ai-platform/template/src/lib/auth-server.ts +32 -33
- package/src/templates/web/ai-platform/template/src/lib/auth-session.ts +52 -0
- package/src/templates/web/base/template/next.config.js +14 -15
- package/src/templates/web/base/template/package.json +16 -31
- package/src/templates/web/base/template/postcss.config.mjs +8 -0
- package/src/templates/web/base/template/src/app/error.tsx +97 -97
- package/src/templates/web/base/template/src/app/globals.css +87 -148
- package/src/templates/web/base/template/src/app/layout.tsx +4 -1
- package/src/templates/web/base/template/src/app/loading.tsx +52 -52
- package/src/templates/web/base/template/tsconfig.json +27 -33
- package/src/templates/web/iot-dashboard/template/next.config.js +14 -14
- package/src/templates/web/iot-dashboard/template/package.json +12 -16
- package/src/templates/web/iot-dashboard/template/postcss.config.mjs +8 -0
- package/src/templates/web/iot-dashboard/template/src/app/alerts/page.tsx +157 -0
- package/src/templates/web/iot-dashboard/template/src/app/api/auth/route.ts +57 -0
- package/src/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +224 -224
- package/src/templates/web/iot-dashboard/template/src/app/devices/[id]/page.tsx +204 -0
- package/src/templates/web/iot-dashboard/template/src/app/devices/new/page.tsx +139 -0
- package/src/templates/web/iot-dashboard/template/src/app/devices/page.tsx +171 -0
- package/src/templates/web/iot-dashboard/template/src/app/error.tsx +8 -8
- package/src/templates/web/iot-dashboard/template/src/app/globals.css +97 -20
- package/src/templates/web/iot-dashboard/template/src/app/layout.tsx +3 -0
- package/src/templates/web/iot-dashboard/template/src/app/loading.tsx +5 -5
- package/src/templates/web/iot-dashboard/template/src/app/login/page.tsx +112 -0
- package/src/templates/web/iot-dashboard/template/src/app/page.tsx +266 -189
- package/src/templates/web/iot-dashboard/template/src/app/settings/page.tsx +186 -0
- package/src/templates/web/iot-dashboard/template/src/app/signup/page.tsx +133 -0
- package/src/templates/web/iot-dashboard/template/src/lib/auth-server.ts +32 -33
- package/src/templates/web/iot-dashboard/template/src/lib/auth-session.ts +52 -0
- package/src/templates/web/marketplace/template/next.config.js +14 -14
- package/src/templates/web/marketplace/template/package.json +11 -18
- package/src/templates/web/marketplace/template/postcss.config.mjs +8 -0
- package/src/templates/web/marketplace/template/src/app/api/auth/route.ts +57 -0
- package/src/templates/web/marketplace/template/src/app/cart/page.tsx +147 -147
- package/src/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -149
- package/src/templates/web/marketplace/template/src/app/error.tsx +7 -7
- package/src/templates/web/marketplace/template/src/app/globals.css +97 -20
- package/src/templates/web/marketplace/template/src/app/layout.tsx +3 -0
- package/src/templates/web/marketplace/template/src/app/loading.tsx +5 -5
- package/src/templates/web/marketplace/template/src/app/login/page.tsx +112 -0
- package/src/templates/web/marketplace/template/src/app/orders/page.tsx +160 -0
- package/src/templates/web/marketplace/template/src/app/page.tsx +370 -169
- package/src/templates/web/marketplace/template/src/app/products/[id]/page.tsx +218 -0
- package/src/templates/web/marketplace/template/src/app/products/page.tsx +129 -129
- package/src/templates/web/marketplace/template/src/app/settings/page.tsx +150 -0
- package/src/templates/web/marketplace/template/src/app/signup/page.tsx +133 -0
- package/src/templates/web/marketplace/template/src/lib/auth-server.ts +32 -33
- package/src/templates/web/marketplace/template/src/lib/auth-session.ts +52 -0
- package/src/templates/web/micro-saas/template/next.config.js +14 -14
- package/src/templates/web/micro-saas/template/package.json +9 -8
- package/src/templates/web/micro-saas/template/postcss.config.mjs +8 -0
- package/src/templates/web/micro-saas/template/src/app/api/auth/route.ts +57 -0
- package/src/templates/web/micro-saas/template/src/app/dashboard/page.tsx +145 -117
- package/src/templates/web/micro-saas/template/src/app/error.tsx +7 -7
- package/src/templates/web/micro-saas/template/src/app/globals.css +97 -20
- package/src/templates/web/micro-saas/template/src/app/layout.tsx +3 -0
- package/src/templates/web/micro-saas/template/src/app/loading.tsx +43 -27
- package/src/templates/web/micro-saas/template/src/app/login/page.tsx +112 -87
- package/src/templates/web/micro-saas/template/src/app/page.tsx +227 -137
- package/src/templates/web/micro-saas/template/src/app/signup/page.tsx +133 -108
- package/src/templates/web/micro-saas/template/src/lib/auth-server.ts +32 -33
- package/src/templates/web/micro-saas/template/src/lib/auth-session.ts +52 -0
- package/src/templates/web/ui-auth/template/next.config.js +14 -12
- package/src/templates/web/ui-auth/template/package.json +16 -26
- package/src/templates/web/ui-auth/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-auth/template/src/app/error.tsx +67 -67
- package/src/templates/web/ui-auth/template/src/app/globals.css +85 -84
- package/src/templates/web/ui-auth/template/src/app/layout.tsx +4 -1
- package/src/templates/web/ui-auth/template/src/app/loading.tsx +20 -38
- package/src/templates/web/ui-auth/template/tsconfig.json +27 -33
- package/src/templates/web/ui-auth-ai/template/next.config.js +15 -13
- package/src/templates/web/ui-auth-ai/template/package.json +25 -21
- package/src/templates/web/ui-auth-ai/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-auth-ai/template/src/app/error.tsx +7 -7
- package/src/templates/web/ui-auth-ai/template/src/app/globals.css +87 -25
- package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +3 -0
- package/src/templates/web/ui-auth-ai/template/src/app/loading.tsx +4 -4
- package/src/templates/web/ui-auth-ai/template/tsconfig.json +27 -28
- package/src/templates/web/ui-auth-payments/template/next.config.js +14 -12
- package/src/templates/web/ui-auth-payments/template/package.json +16 -29
- package/src/templates/web/ui-auth-payments/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-auth-payments/template/src/app/error.tsx +67 -67
- package/src/templates/web/ui-auth-payments/template/src/app/globals.css +89 -204
- package/src/templates/web/ui-auth-payments/template/src/app/layout.tsx +4 -1
- package/src/templates/web/ui-auth-payments/template/src/app/loading.tsx +20 -20
- package/src/templates/web/ui-auth-payments/template/tsconfig.json +27 -33
- package/src/templates/web/ui-auth-payments-ai/template/next.config.js +14 -12
- package/src/templates/web/ui-auth-payments-ai/template/package.json +17 -33
- package/src/templates/web/ui-auth-payments-ai/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/error.tsx +67 -67
- package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +85 -85
- package/src/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +4 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/loading.tsx +20 -20
- package/src/templates/web/ui-auth-payments-ai/template/tsconfig.json +27 -33
- package/src/templates/web/ui-auth-payments-audio/template/next.config.js +14 -12
- package/src/templates/web/ui-auth-payments-audio/template/package.json +17 -30
- package/src/templates/web/ui-auth-payments-audio/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/error.tsx +67 -67
- package/src/templates/web/ui-auth-payments-audio/template/src/app/globals.css +85 -85
- package/src/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +4 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/app/loading.tsx +20 -20
- package/src/templates/web/ui-auth-payments-audio/template/tsconfig.json +27 -33
- package/src/templates/web/ui-auth-payments-video/template/next.config.js +14 -12
- package/src/templates/web/ui-auth-payments-video/template/package.json +17 -30
- package/src/templates/web/ui-auth-payments-video/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/error.tsx +67 -67
- package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +89 -221
- package/src/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +4 -1
- package/src/templates/web/ui-auth-payments-video/template/src/app/loading.tsx +20 -20
- package/src/templates/web/ui-auth-payments-video/template/tsconfig.json +27 -33
- package/src/templates/web/ui-only/template/next.config.js +14 -12
- package/src/templates/web/ui-only/template/package.json +15 -25
- package/src/templates/web/ui-only/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-only/template/src/app/error.tsx +67 -67
- package/src/templates/web/ui-only/template/src/app/globals.css +85 -31
- package/src/templates/web/ui-only/template/src/app/layout.tsx +4 -1
- package/src/templates/web/ui-only/template/src/app/loading.tsx +20 -20
- package/src/templates/web/ui-only/template/tsconfig.json +27 -33
- package/dist/templates/web/ai-platform/template/middleware.ts +0 -55
- package/dist/templates/web/ai-platform/template/src/lib/supabase/client.ts +0 -8
- package/dist/templates/web/ai-platform/template/src/lib/supabase/server.ts +0 -27
- package/dist/templates/web/base/template/postcss.config.js +0 -7
- package/dist/templates/web/base/template/tailwind.config.js +0 -77
- package/dist/templates/web/iot-dashboard/template/middleware.ts +0 -56
- package/dist/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +0 -8
- package/dist/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +0 -27
- package/dist/templates/web/marketplace/template/middleware.ts +0 -56
- package/dist/templates/web/marketplace/template/src/lib/supabase/client.ts +0 -8
- package/dist/templates/web/marketplace/template/src/lib/supabase/server.ts +0 -27
- package/dist/templates/web/micro-saas/template/middleware.ts +0 -53
- package/dist/templates/web/micro-saas/template/src/lib/supabase/client.ts +0 -8
- package/dist/templates/web/micro-saas/template/src/lib/supabase/server.ts +0 -29
- package/dist/templates/web/ui-auth/template/.claude +0 -21
- package/dist/templates/web/ui-auth/template/context.md +0 -105
- package/dist/templates/web/ui-auth/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-ai/template/postcss.config.js +0 -6
- package/dist/templates/web/ui-auth-ai/template/tailwind.config.js +0 -22
- package/dist/templates/web/ui-auth-payments/template/middleware.ts +0 -68
- package/dist/templates/web/ui-auth-payments/template/package-lock.json +0 -12240
- package/dist/templates/web/ui-auth-payments/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-payments/template/tsconfig.tsbuildinfo +0 -1
- package/dist/templates/web/ui-auth-payments-ai/template/.claude +0 -21
- package/dist/templates/web/ui-auth-payments-ai/template/context.md +0 -169
- package/dist/templates/web/ui-auth-payments-ai/template/middleware.ts +0 -68
- package/dist/templates/web/ui-auth-payments-ai/template/package-lock.json +0 -12241
- package/dist/templates/web/ui-auth-payments-ai/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments-ai/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-payments-ai/template/tsconfig.tsbuildinfo +0 -1
- package/dist/templates/web/ui-auth-payments-audio/template/middleware.ts +0 -68
- package/dist/templates/web/ui-auth-payments-audio/template/package-lock.json +0 -12241
- package/dist/templates/web/ui-auth-payments-audio/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments-audio/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-auth-payments-audio/template/tsconfig.tsbuildinfo +0 -1
- package/dist/templates/web/ui-auth-payments-video/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-auth-payments-video/template/tailwind.config.js +0 -77
- package/dist/templates/web/ui-only/template/postcss.config.js +0 -7
- package/dist/templates/web/ui-only/template/tailwind.config.js +0 -77
- package/src/templates/web/ai-platform/template/middleware.ts +0 -55
- package/src/templates/web/ai-platform/template/src/lib/supabase/client.ts +0 -8
- package/src/templates/web/ai-platform/template/src/lib/supabase/server.ts +0 -27
- package/src/templates/web/base/template/postcss.config.js +0 -7
- package/src/templates/web/base/template/tailwind.config.js +0 -77
- package/src/templates/web/iot-dashboard/template/middleware.ts +0 -56
- package/src/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +0 -8
- package/src/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +0 -27
- package/src/templates/web/marketplace/template/middleware.ts +0 -56
- package/src/templates/web/marketplace/template/src/lib/supabase/client.ts +0 -8
- package/src/templates/web/marketplace/template/src/lib/supabase/server.ts +0 -27
- package/src/templates/web/micro-saas/template/middleware.ts +0 -53
- package/src/templates/web/micro-saas/template/src/lib/supabase/client.ts +0 -8
- package/src/templates/web/micro-saas/template/src/lib/supabase/server.ts +0 -29
- package/src/templates/web/ui-auth/template/.claude +0 -21
- package/src/templates/web/ui-auth/template/context.md +0 -105
- package/src/templates/web/ui-auth/template/postcss.config.js +0 -7
- package/src/templates/web/ui-auth/template/tailwind.config.js +0 -77
- package/src/templates/web/ui-auth-ai/template/postcss.config.js +0 -6
- package/src/templates/web/ui-auth-ai/template/tailwind.config.js +0 -22
- package/src/templates/web/ui-auth-payments/template/middleware.ts +0 -68
- package/src/templates/web/ui-auth-payments/template/package-lock.json +0 -12240
- package/src/templates/web/ui-auth-payments/template/postcss.config.js +0 -7
- package/src/templates/web/ui-auth-payments/template/tailwind.config.js +0 -77
- package/src/templates/web/ui-auth-payments/template/tsconfig.tsbuildinfo +0 -1
- package/src/templates/web/ui-auth-payments-ai/template/.claude +0 -21
- package/src/templates/web/ui-auth-payments-ai/template/context.md +0 -169
- package/src/templates/web/ui-auth-payments-ai/template/middleware.ts +0 -68
- package/src/templates/web/ui-auth-payments-ai/template/package-lock.json +0 -12241
- package/src/templates/web/ui-auth-payments-ai/template/postcss.config.js +0 -7
- package/src/templates/web/ui-auth-payments-ai/template/tailwind.config.js +0 -77
- package/src/templates/web/ui-auth-payments-ai/template/tsconfig.tsbuildinfo +0 -1
- package/src/templates/web/ui-auth-payments-audio/template/middleware.ts +0 -68
- package/src/templates/web/ui-auth-payments-audio/template/package-lock.json +0 -12241
- package/src/templates/web/ui-auth-payments-audio/template/postcss.config.js +0 -7
- package/src/templates/web/ui-auth-payments-audio/template/tailwind.config.js +0 -77
- package/src/templates/web/ui-auth-payments-audio/template/tsconfig.tsbuildinfo +0 -1
- package/src/templates/web/ui-auth-payments-video/template/postcss.config.js +0 -7
- package/src/templates/web/ui-auth-payments-video/template/tailwind.config.js +0 -77
- package/src/templates/web/ui-only/template/postcss.config.js +0 -7
- package/src/templates/web/ui-only/template/tailwind.config.js +0 -77
- /package/dist/templates/shared/admin/web/{components → src/components}/admin-nav.tsx +0 -0
- /package/dist/templates/shared/auth/keycloak/web/{auth.config.ts → src/auth.config.ts} +0 -0
- /package/dist/templates/shared/auth/keycloak/web/{auth.ts → src/auth.ts} +0 -0
- /package/dist/templates/shared/middleware/web/{middleware.ts → src/middleware.ts} +0 -0
- /package/src/templates/shared/admin/web/{components → src/components}/admin-nav.tsx +0 -0
- /package/src/templates/shared/auth/keycloak/web/{auth.config.ts → src/auth.config.ts} +0 -0
- /package/src/templates/shared/auth/keycloak/web/{auth.ts → src/auth.ts} +0 -0
- /package/src/templates/shared/middleware/web/{middleware.ts → src/middleware.ts} +0 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
2
|
+
import { ArrowLeft, Star, ShoppingCart, MessageCircle, ShoppingBag } from 'lucide-react'
|
|
3
|
+
import Link from 'next/link'
|
|
4
|
+
|
|
5
|
+
const PRODUCTS: Record<string, {
|
|
6
|
+
id: string
|
|
7
|
+
name: string
|
|
8
|
+
price: number
|
|
9
|
+
vendor: string
|
|
10
|
+
rating: number
|
|
11
|
+
reviews: number
|
|
12
|
+
category: string
|
|
13
|
+
description: string
|
|
14
|
+
features: string[]
|
|
15
|
+
}> = {
|
|
16
|
+
'1': {
|
|
17
|
+
id: '1',
|
|
18
|
+
name: 'Premium Widget Pro',
|
|
19
|
+
price: 49.99,
|
|
20
|
+
vendor: 'TechCo',
|
|
21
|
+
rating: 4.8,
|
|
22
|
+
reviews: 124,
|
|
23
|
+
category: 'Software',
|
|
24
|
+
description: 'A comprehensive widget toolkit that helps developers build beautiful, responsive interfaces in minutes. Includes 50+ pre-built components, dark mode support, and full TypeScript definitions. Perfect for startups and teams looking to ship faster without sacrificing quality.',
|
|
25
|
+
features: ['50+ Pre-built Components', 'Dark Mode Support', 'TypeScript Definitions', 'Lifetime Updates'],
|
|
26
|
+
},
|
|
27
|
+
'2': {
|
|
28
|
+
id: '2',
|
|
29
|
+
name: 'Developer Toolkit',
|
|
30
|
+
price: 129.99,
|
|
31
|
+
vendor: 'DevTools',
|
|
32
|
+
rating: 4.9,
|
|
33
|
+
reviews: 87,
|
|
34
|
+
category: 'Software',
|
|
35
|
+
description: 'The ultimate developer toolkit packed with debugging utilities, code generators, and productivity boosters. Streamline your development workflow with intelligent code analysis, automated refactoring tools, and seamless CI/CD integration.',
|
|
36
|
+
features: ['Code Generator', 'Debugging Utilities', 'CI/CD Integration', 'Team Collaboration'],
|
|
37
|
+
},
|
|
38
|
+
'3': {
|
|
39
|
+
id: '3',
|
|
40
|
+
name: 'UI Design Pack',
|
|
41
|
+
price: 79.99,
|
|
42
|
+
vendor: 'CreativeStudio',
|
|
43
|
+
rating: 4.7,
|
|
44
|
+
reviews: 203,
|
|
45
|
+
category: 'Templates',
|
|
46
|
+
description: 'A stunning collection of UI design templates for web and mobile applications. Each template is fully customizable and built with modern design principles. Includes Figma source files, responsive layouts, and component documentation.',
|
|
47
|
+
features: ['Figma Source Files', 'Responsive Layouts', 'Component Docs', '100+ Screens'],
|
|
48
|
+
},
|
|
49
|
+
'4': {
|
|
50
|
+
id: '4',
|
|
51
|
+
name: 'Analytics Dashboard',
|
|
52
|
+
price: 199.99,
|
|
53
|
+
vendor: 'DataCorp',
|
|
54
|
+
rating: 4.6,
|
|
55
|
+
reviews: 56,
|
|
56
|
+
category: 'Software',
|
|
57
|
+
description: 'Real-time analytics dashboard with advanced data visualization capabilities. Track key metrics, create custom reports, and share insights with your team. Supports multiple data sources and provides AI-powered trend analysis.',
|
|
58
|
+
features: ['Real-time Analytics', 'Custom Reports', 'AI Trend Analysis', 'Multi-source Support'],
|
|
59
|
+
},
|
|
60
|
+
'5': {
|
|
61
|
+
id: '5',
|
|
62
|
+
name: 'Marketing Templates',
|
|
63
|
+
price: 39.99,
|
|
64
|
+
vendor: 'GrowthLab',
|
|
65
|
+
rating: 4.5,
|
|
66
|
+
reviews: 312,
|
|
67
|
+
category: 'Templates',
|
|
68
|
+
description: 'Ready-to-use marketing templates for landing pages, email campaigns, and social media. Conversion-optimized designs backed by A/B testing data from thousands of campaigns.',
|
|
69
|
+
features: ['Landing Pages', 'Email Templates', 'Social Media Kit', 'A/B Tested Designs'],
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const RELATED_PRODUCTS = [
|
|
74
|
+
{ id: '2', name: 'Developer Toolkit', price: 129.99, vendor: 'DevTools', rating: 4.9, category: 'Software' },
|
|
75
|
+
{ id: '3', name: 'UI Design Pack', price: 79.99, vendor: 'CreativeStudio', rating: 4.7, category: 'Templates' },
|
|
76
|
+
{ id: '5', name: 'Marketing Templates', price: 39.99, vendor: 'GrowthLab', rating: 4.5, category: 'Templates' },
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
function StarRating({ rating, reviews }: { rating: number; reviews: number }) {
|
|
80
|
+
return (
|
|
81
|
+
<div className="flex items-center gap-2">
|
|
82
|
+
<div className="flex items-center">
|
|
83
|
+
{[...Array(5)].map((_, i) => (
|
|
84
|
+
<Star
|
|
85
|
+
key={i}
|
|
86
|
+
className={`w-5 h-5 ${
|
|
87
|
+
i < Math.floor(rating)
|
|
88
|
+
? 'text-amber-500 fill-amber-500'
|
|
89
|
+
: i < rating
|
|
90
|
+
? 'text-amber-500 fill-amber-500/50'
|
|
91
|
+
: 'text-muted-foreground/30'
|
|
92
|
+
}`}
|
|
93
|
+
/>
|
|
94
|
+
))}
|
|
95
|
+
</div>
|
|
96
|
+
<span className="text-sm text-muted-foreground">
|
|
97
|
+
{rating} ({reviews} reviews)
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default async function ProductDetailPage({
|
|
104
|
+
params,
|
|
105
|
+
}: {
|
|
106
|
+
params: Promise<{ id: string }>
|
|
107
|
+
}) {
|
|
108
|
+
const { id } = await params
|
|
109
|
+
const product = PRODUCTS[id] || PRODUCTS['1']
|
|
110
|
+
|
|
111
|
+
const relatedProducts = RELATED_PRODUCTS.filter(p => p.id !== product.id).slice(0, 3)
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<div className="min-h-screen bg-background">
|
|
115
|
+
<div className="max-w-7xl mx-auto px-4 py-8">
|
|
116
|
+
{/* Back Link */}
|
|
117
|
+
<Link
|
|
118
|
+
href="/products"
|
|
119
|
+
className="inline-flex items-center text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors"
|
|
120
|
+
>
|
|
121
|
+
<ArrowLeft className="w-4 h-4 mr-1" />
|
|
122
|
+
Back to Products
|
|
123
|
+
</Link>
|
|
124
|
+
|
|
125
|
+
{/* Product Detail */}
|
|
126
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-16">
|
|
127
|
+
{/* Product Image */}
|
|
128
|
+
<div className="aspect-video bg-muted rounded-xl flex items-center justify-center border border-border">
|
|
129
|
+
<div className="text-center">
|
|
130
|
+
<ShoppingBag className="w-16 h-16 mx-auto text-muted-foreground/30 mb-2" />
|
|
131
|
+
<p className="text-sm text-muted-foreground">Product Preview</p>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{/* Product Info */}
|
|
136
|
+
<div>
|
|
137
|
+
<div className="mb-4">
|
|
138
|
+
<span className="inline-block px-3 py-1 text-xs font-medium bg-primary text-primary-foreground rounded-full mb-3">
|
|
139
|
+
{product.category}
|
|
140
|
+
</span>
|
|
141
|
+
<h1 className="text-2xl font-bold text-foreground mb-2">
|
|
142
|
+
{product.name}
|
|
143
|
+
</h1>
|
|
144
|
+
<p className="text-muted-foreground">
|
|
145
|
+
by {product.vendor}
|
|
146
|
+
</p>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<StarRating rating={product.rating} reviews={product.reviews} />
|
|
150
|
+
|
|
151
|
+
<p className="text-3xl font-bold text-primary mt-4 mb-6">
|
|
152
|
+
${product.price}
|
|
153
|
+
</p>
|
|
154
|
+
|
|
155
|
+
<p className="text-muted-foreground leading-relaxed mb-6">
|
|
156
|
+
{product.description}
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
{/* Features */}
|
|
160
|
+
<div className="mb-6">
|
|
161
|
+
<h3 className="text-sm font-semibold text-foreground mb-3">What's Included</h3>
|
|
162
|
+
<ul className="grid grid-cols-2 gap-2">
|
|
163
|
+
{product.features.map((feature) => (
|
|
164
|
+
<li key={feature} className="flex items-center text-sm text-muted-foreground">
|
|
165
|
+
<span className="w-1.5 h-1.5 bg-primary rounded-full mr-2 flex-shrink-0" />
|
|
166
|
+
{feature}
|
|
167
|
+
</li>
|
|
168
|
+
))}
|
|
169
|
+
</ul>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
{/* Actions */}
|
|
173
|
+
<div className="flex gap-3">
|
|
174
|
+
<Button size="lg" className="flex-1">
|
|
175
|
+
<ShoppingCart className="w-4 h-4 mr-2" />
|
|
176
|
+
Add to Cart
|
|
177
|
+
</Button>
|
|
178
|
+
<Button variant="outline" size="lg" className="flex-1">
|
|
179
|
+
<MessageCircle className="w-4 h-4 mr-2" />
|
|
180
|
+
Contact Vendor
|
|
181
|
+
</Button>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
{/* Related Products */}
|
|
187
|
+
<div>
|
|
188
|
+
<h2 className="text-2xl font-bold text-foreground mb-6">Related Products</h2>
|
|
189
|
+
<div className="grid grid-cols-1 sm:grid-cols-3 gap-6">
|
|
190
|
+
{relatedProducts.map((item) => (
|
|
191
|
+
<Card key={item.id} className="overflow-hidden hover:shadow-lg transition-shadow">
|
|
192
|
+
<div className="aspect-square bg-muted relative">
|
|
193
|
+
<span className="absolute top-2 left-2 bg-primary text-primary-foreground text-xs px-2 py-1 rounded">
|
|
194
|
+
{item.category}
|
|
195
|
+
</span>
|
|
196
|
+
</div>
|
|
197
|
+
<div className="p-4">
|
|
198
|
+
<h3 className="font-semibold text-foreground mb-1">{item.name}</h3>
|
|
199
|
+
<p className="text-sm text-muted-foreground mb-2">by {item.vendor}</p>
|
|
200
|
+
<div className="flex items-center justify-between mb-3">
|
|
201
|
+
<span className="text-lg font-bold text-primary">${item.price}</span>
|
|
202
|
+
<div className="flex items-center text-amber-500">
|
|
203
|
+
<Star className="w-4 h-4 fill-current" />
|
|
204
|
+
<span className="text-sm ml-1">{item.rating}</span>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
<Link href={`/products/${item.id}`}>
|
|
208
|
+
<Button variant="outline" size="sm" className="w-full">View Details</Button>
|
|
209
|
+
</Link>
|
|
210
|
+
</div>
|
|
211
|
+
</Card>
|
|
212
|
+
))}
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
)
|
|
218
|
+
}
|
|
@@ -1,129 +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-
|
|
39
|
-
{/* Header */}
|
|
40
|
-
<div className="bg-
|
|
41
|
-
<div className="max-w-7xl mx-auto px-4 py-6">
|
|
42
|
-
<h1 className="text-3xl font-bold text-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
99
|
-
<span className="absolute top-2 left-2 bg-
|
|
100
|
-
{product.category}
|
|
101
|
-
</span>
|
|
102
|
-
</div>
|
|
103
|
-
<div className="p-4">
|
|
104
|
-
<h3 className="font-semibold text-
|
|
105
|
-
<p className="text-sm text-
|
|
106
|
-
<div className="flex items-center justify-between mb-3">
|
|
107
|
-
<span className="text-lg font-bold text-
|
|
108
|
-
<div className="flex items-center text-
|
|
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
|
-
}
|
|
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-background">
|
|
39
|
+
{/* Header */}
|
|
40
|
+
<div className="bg-card border-b border-border">
|
|
41
|
+
<div className="max-w-7xl mx-auto px-4 py-6">
|
|
42
|
+
<h1 className="text-3xl font-bold text-foreground 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-muted-foreground" />
|
|
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-input rounded-lg focus:ring-2 focus:ring-ring bg-background text-foreground"
|
|
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-input rounded-lg focus:ring-2 focus:ring-ring bg-background text-foreground"
|
|
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-muted-foreground">
|
|
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-muted relative">
|
|
99
|
+
<span className="absolute top-2 left-2 bg-primary text-primary-foreground 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-foreground mb-1">{product.name}</h3>
|
|
105
|
+
<p className="text-sm text-muted-foreground mb-2">by {product.vendor}</p>
|
|
106
|
+
<div className="flex items-center justify-between mb-3">
|
|
107
|
+
<span className="text-lg font-bold text-primary">${product.price}</span>
|
|
108
|
+
<div className="flex items-center text-amber-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,150 @@
|
|
|
1
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
2
|
+
import { User, Bell, CreditCard } from 'lucide-react'
|
|
3
|
+
import { requireAuth } from '@/lib/auth-server'
|
|
4
|
+
|
|
5
|
+
function ToggleSwitch({ defaultChecked = false }: { defaultChecked?: boolean }) {
|
|
6
|
+
return (
|
|
7
|
+
<label className="relative inline-flex items-center cursor-pointer">
|
|
8
|
+
<input type="checkbox" className="sr-only peer" defaultChecked={defaultChecked} />
|
|
9
|
+
<div className="w-11 h-6 bg-muted rounded-full peer peer-checked:bg-primary peer-focus:ring-2 peer-focus:ring-ring after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-background after:border after:border-border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:after:translate-x-full" />
|
|
10
|
+
</label>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default async function SettingsPage() {
|
|
15
|
+
const user = await requireAuth()
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="min-h-screen bg-background">
|
|
19
|
+
<div className="max-w-3xl mx-auto px-4 py-8">
|
|
20
|
+
{/* Header */}
|
|
21
|
+
<div className="mb-8">
|
|
22
|
+
<h1 className="text-3xl font-bold text-foreground">Settings</h1>
|
|
23
|
+
<p className="text-muted-foreground mt-1">
|
|
24
|
+
Manage your account preferences
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div className="space-y-6">
|
|
29
|
+
{/* Profile Section */}
|
|
30
|
+
<Card className="p-6">
|
|
31
|
+
<div className="flex items-center gap-3 mb-6">
|
|
32
|
+
<User className="w-5 h-5 text-primary" />
|
|
33
|
+
<h2 className="text-lg font-semibold text-foreground">Profile</h2>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div className="space-y-4">
|
|
37
|
+
{/* Avatar */}
|
|
38
|
+
<div className="flex items-center gap-4 mb-6">
|
|
39
|
+
<div className="w-16 h-16 bg-muted rounded-full flex items-center justify-center border border-border">
|
|
40
|
+
<User className="w-8 h-8 text-muted-foreground" />
|
|
41
|
+
</div>
|
|
42
|
+
<Button variant="outline" size="sm">Change Avatar</Button>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
{/* Name */}
|
|
46
|
+
<div>
|
|
47
|
+
<label htmlFor="name" className="block text-sm font-medium text-foreground mb-1.5">
|
|
48
|
+
Display Name
|
|
49
|
+
</label>
|
|
50
|
+
<input
|
|
51
|
+
id="name"
|
|
52
|
+
type="text"
|
|
53
|
+
defaultValue={user.name || ''}
|
|
54
|
+
placeholder="Your name"
|
|
55
|
+
className="w-full px-4 py-2 border border-input rounded-lg focus:ring-2 focus:ring-ring bg-background text-foreground"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
{/* Email (read-only) */}
|
|
60
|
+
<div>
|
|
61
|
+
<label htmlFor="email" className="block text-sm font-medium text-foreground mb-1.5">
|
|
62
|
+
Email Address
|
|
63
|
+
</label>
|
|
64
|
+
<input
|
|
65
|
+
id="email"
|
|
66
|
+
type="email"
|
|
67
|
+
value={user.email || ''}
|
|
68
|
+
readOnly
|
|
69
|
+
className="w-full px-4 py-2 border border-input rounded-lg bg-muted text-muted-foreground cursor-not-allowed"
|
|
70
|
+
/>
|
|
71
|
+
<p className="text-xs text-muted-foreground mt-1">
|
|
72
|
+
Email cannot be changed. Contact support if you need to update it.
|
|
73
|
+
</p>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</Card>
|
|
77
|
+
|
|
78
|
+
{/* Notification Preferences */}
|
|
79
|
+
<Card className="p-6">
|
|
80
|
+
<div className="flex items-center gap-3 mb-6">
|
|
81
|
+
<Bell className="w-5 h-5 text-primary" />
|
|
82
|
+
<h2 className="text-lg font-semibold text-foreground">Notifications</h2>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div className="space-y-4">
|
|
86
|
+
<div className="flex items-center justify-between py-2">
|
|
87
|
+
<div>
|
|
88
|
+
<p className="font-medium text-foreground">Order Updates</p>
|
|
89
|
+
<p className="text-sm text-muted-foreground">
|
|
90
|
+
Get notified when your order status changes
|
|
91
|
+
</p>
|
|
92
|
+
</div>
|
|
93
|
+
<ToggleSwitch defaultChecked />
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div className="border-t border-border" />
|
|
97
|
+
|
|
98
|
+
<div className="flex items-center justify-between py-2">
|
|
99
|
+
<div>
|
|
100
|
+
<p className="font-medium text-foreground">Marketing Emails</p>
|
|
101
|
+
<p className="text-sm text-muted-foreground">
|
|
102
|
+
Receive deals, promotions, and product recommendations
|
|
103
|
+
</p>
|
|
104
|
+
</div>
|
|
105
|
+
<ToggleSwitch />
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div className="border-t border-border" />
|
|
109
|
+
|
|
110
|
+
<div className="flex items-center justify-between py-2">
|
|
111
|
+
<div>
|
|
112
|
+
<p className="font-medium text-foreground">Vendor Messages</p>
|
|
113
|
+
<p className="text-sm text-muted-foreground">
|
|
114
|
+
Get notified when a vendor replies to your message
|
|
115
|
+
</p>
|
|
116
|
+
</div>
|
|
117
|
+
<ToggleSwitch defaultChecked />
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</Card>
|
|
121
|
+
|
|
122
|
+
{/* Payment Methods */}
|
|
123
|
+
<Card className="p-6">
|
|
124
|
+
<div className="flex items-center gap-3 mb-6">
|
|
125
|
+
<CreditCard className="w-5 h-5 text-primary" />
|
|
126
|
+
<h2 className="text-lg font-semibold text-foreground">Payment Methods</h2>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<div className="text-center py-6">
|
|
130
|
+
<CreditCard className="w-12 h-12 mx-auto mb-3 text-muted-foreground/50" />
|
|
131
|
+
<p className="text-muted-foreground mb-4">
|
|
132
|
+
No payment methods saved yet
|
|
133
|
+
</p>
|
|
134
|
+
<Button variant="outline">
|
|
135
|
+
Add Payment Method
|
|
136
|
+
</Button>
|
|
137
|
+
</div>
|
|
138
|
+
</Card>
|
|
139
|
+
|
|
140
|
+
{/* Save Button */}
|
|
141
|
+
<div className="flex justify-end">
|
|
142
|
+
<Button size="lg">
|
|
143
|
+
Save Changes
|
|
144
|
+
</Button>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
)
|
|
150
|
+
}
|