@digilogiclabs/create-saas-app 2.9.1 → 2.10.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/dist/.tsbuildinfo +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/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/page.tsx +248 -154
- package/dist/templates/web/ai-platform/template/src/lib/auth-server.ts +32 -33
- 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/dashboard/page.tsx +224 -224
- 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/page.tsx +266 -189
- package/dist/templates/web/iot-dashboard/template/src/lib/auth-server.ts +32 -33
- 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/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/page.tsx +370 -169
- package/dist/templates/web/marketplace/template/src/app/products/page.tsx +129 -129
- package/dist/templates/web/marketplace/template/src/lib/auth-server.ts +32 -33
- 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/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 +101 -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 +122 -108
- package/dist/templates/web/micro-saas/template/src/lib/auth-server.ts +32 -33
- 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/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/page.tsx +248 -154
- package/src/templates/web/ai-platform/template/src/lib/auth-server.ts +32 -33
- 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/dashboard/page.tsx +224 -224
- 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/page.tsx +266 -189
- package/src/templates/web/iot-dashboard/template/src/lib/auth-server.ts +32 -33
- 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/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/page.tsx +370 -169
- package/src/templates/web/marketplace/template/src/app/products/page.tsx +129 -129
- package/src/templates/web/marketplace/template/src/lib/auth-server.ts +32 -33
- 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/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 +101 -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 +122 -108
- package/src/templates/web/micro-saas/template/src/lib/auth-server.ts +32 -33
- 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
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { useEffect } from 'react'
|
|
4
|
-
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
-
import { RefreshCw, Home, AlertCircle } from 'lucide-react'
|
|
6
|
-
|
|
7
|
-
interface ErrorProps {
|
|
8
|
-
error: Error & { digest?: string }
|
|
9
|
-
reset: () => void
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default function Error({ error, reset }: ErrorProps) {
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
// Log the error to an error reporting service
|
|
15
|
-
console.error('Application error:', error)
|
|
16
|
-
}, [error])
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className="min-h-screen bg-
|
|
20
|
-
<Card className="w-full max-w-md p-8 text-center">
|
|
21
|
-
<div className="mb-6">
|
|
22
|
-
<div className="mx-auto w-16 h-16 bg-
|
|
23
|
-
<AlertCircle className="h-8 w-8 text-
|
|
24
|
-
</div>
|
|
25
|
-
<h1 className="text-2xl font-bold text-
|
|
26
|
-
Something went wrong
|
|
27
|
-
</h1>
|
|
28
|
-
<p className="text-
|
|
29
|
-
We apologize for the inconvenience. Please try again or return to the home page.
|
|
30
|
-
</p>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div className="space-y-3">
|
|
34
|
-
<Button
|
|
35
|
-
onClick={reset}
|
|
36
|
-
className="w-full"
|
|
37
|
-
variant="default"
|
|
38
|
-
>
|
|
39
|
-
<RefreshCw className="w-4 h-4 mr-2" />
|
|
40
|
-
Try Again
|
|
41
|
-
</Button>
|
|
42
|
-
|
|
43
|
-
<Button
|
|
44
|
-
onClick={() => window.location.href = '/'}
|
|
45
|
-
variant="outline"
|
|
46
|
-
className="w-full"
|
|
47
|
-
>
|
|
48
|
-
<Home className="w-4 h-4 mr-2" />
|
|
49
|
-
Go Home
|
|
50
|
-
</Button>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
{process.env.NODE_ENV === 'development' && (
|
|
54
|
-
<details className="mt-6 text-left">
|
|
55
|
-
<summary className="text-sm font-medium text-
|
|
56
|
-
Error Details (Development)
|
|
57
|
-
</summary>
|
|
58
|
-
<pre className="mt-2 text-xs bg-
|
|
59
|
-
{error.message}
|
|
60
|
-
{error.stack}
|
|
61
|
-
</pre>
|
|
62
|
-
</details>
|
|
63
|
-
)}
|
|
64
|
-
</Card>
|
|
65
|
-
</div>
|
|
66
|
-
)
|
|
67
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react'
|
|
4
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
import { RefreshCw, Home, AlertCircle } from 'lucide-react'
|
|
6
|
+
|
|
7
|
+
interface ErrorProps {
|
|
8
|
+
error: Error & { digest?: string }
|
|
9
|
+
reset: () => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function Error({ error, reset }: ErrorProps) {
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
// Log the error to an error reporting service
|
|
15
|
+
console.error('Application error:', error)
|
|
16
|
+
}, [error])
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="min-h-screen bg-background flex items-center justify-center p-4">
|
|
20
|
+
<Card className="w-full max-w-md p-8 text-center">
|
|
21
|
+
<div className="mb-6">
|
|
22
|
+
<div className="mx-auto w-16 h-16 bg-destructive/10 rounded-full flex items-center justify-center mb-4">
|
|
23
|
+
<AlertCircle className="h-8 w-8 text-destructive" />
|
|
24
|
+
</div>
|
|
25
|
+
<h1 className="text-2xl font-bold text-foreground mb-2">
|
|
26
|
+
Something went wrong
|
|
27
|
+
</h1>
|
|
28
|
+
<p className="text-muted-foreground mb-6">
|
|
29
|
+
We apologize for the inconvenience. Please try again or return to the home page.
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div className="space-y-3">
|
|
34
|
+
<Button
|
|
35
|
+
onClick={reset}
|
|
36
|
+
className="w-full"
|
|
37
|
+
variant="default"
|
|
38
|
+
>
|
|
39
|
+
<RefreshCw className="w-4 h-4 mr-2" />
|
|
40
|
+
Try Again
|
|
41
|
+
</Button>
|
|
42
|
+
|
|
43
|
+
<Button
|
|
44
|
+
onClick={() => window.location.href = '/'}
|
|
45
|
+
variant="outline"
|
|
46
|
+
className="w-full"
|
|
47
|
+
>
|
|
48
|
+
<Home className="w-4 h-4 mr-2" />
|
|
49
|
+
Go Home
|
|
50
|
+
</Button>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
{process.env.NODE_ENV === 'development' && (
|
|
54
|
+
<details className="mt-6 text-left">
|
|
55
|
+
<summary className="text-sm font-medium text-muted-foreground cursor-pointer hover:text-foreground">
|
|
56
|
+
Error Details (Development)
|
|
57
|
+
</summary>
|
|
58
|
+
<pre className="mt-2 text-xs bg-muted text-muted-foreground p-3 rounded-md overflow-auto">
|
|
59
|
+
{error.message}
|
|
60
|
+
{error.stack}
|
|
61
|
+
</pre>
|
|
62
|
+
</details>
|
|
63
|
+
)}
|
|
64
|
+
</Card>
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
@@ -1,43 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
@import '@digilogiclabs/saas-factory-ui/dist/index.css';
|
|
1
|
+
@import "tailwindcss";
|
|
3
2
|
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
@tailwind utilities;
|
|
3
|
+
@theme {
|
|
4
|
+
--font-sans: 'Inter', system-ui, sans-serif;
|
|
7
5
|
|
|
6
|
+
--radius: 0.5rem;
|
|
7
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
+
--radius-lg: var(--radius);
|
|
10
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
--color-background: hsl(var(--background));
|
|
13
|
+
--color-foreground: hsl(var(--foreground));
|
|
14
|
+
--color-card: hsl(var(--card));
|
|
15
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
16
|
+
--color-popover: hsl(var(--popover));
|
|
17
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
18
|
+
--color-primary: hsl(var(--primary));
|
|
19
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
20
|
+
--color-secondary: hsl(var(--secondary));
|
|
21
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
22
|
+
--color-muted: hsl(var(--muted));
|
|
23
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
24
|
+
--color-accent: hsl(var(--accent));
|
|
25
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
26
|
+
--color-destructive: hsl(var(--destructive));
|
|
27
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
28
|
+
--color-border: hsl(var(--border));
|
|
29
|
+
--color-input: hsl(var(--input));
|
|
30
|
+
--color-ring: hsl(var(--ring));
|
|
31
|
+
--color-brand-from: hsl(var(--brand-from));
|
|
32
|
+
--color-brand-via: hsl(var(--brand-via));
|
|
33
|
+
--color-brand-to: hsl(var(--brand-to));
|
|
34
|
+
}
|
|
22
35
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
:root {
|
|
37
|
+
--brand-from: 221.2 83.2% 53.3%;
|
|
38
|
+
--brand-via: 232 75% 55%;
|
|
39
|
+
--brand-to: 243 75% 59%;
|
|
40
|
+
--background: 0 0% 100%;
|
|
41
|
+
--foreground: 222.2 84% 4.9%;
|
|
42
|
+
--card: 0 0% 100%;
|
|
43
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
44
|
+
--popover: 0 0% 100%;
|
|
45
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
46
|
+
--primary: 221.2 83.2% 53.3%;
|
|
47
|
+
--primary-foreground: 210 40% 98%;
|
|
48
|
+
--secondary: 210 40% 96%;
|
|
49
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
50
|
+
--muted: 210 40% 96%;
|
|
51
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
52
|
+
--accent: 210 40% 96%;
|
|
53
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
54
|
+
--destructive: 0 84.2% 60.2%;
|
|
55
|
+
--destructive-foreground: 210 40% 98%;
|
|
56
|
+
--border: 214.3 31.8% 91.4%;
|
|
57
|
+
--input: 214.3 31.8% 91.4%;
|
|
58
|
+
--ring: 221.2 83.2% 53.3%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dark {
|
|
62
|
+
--brand-from: 217.2 91.2% 59.8%;
|
|
63
|
+
--brand-via: 232 85% 65%;
|
|
64
|
+
--brand-to: 243 85% 69%;
|
|
65
|
+
--background: 222.2 84% 4.9%;
|
|
66
|
+
--foreground: 210 40% 98%;
|
|
67
|
+
--card: 222.2 84% 4.9%;
|
|
68
|
+
--card-foreground: 210 40% 98%;
|
|
69
|
+
--popover: 222.2 84% 4.9%;
|
|
70
|
+
--popover-foreground: 210 40% 98%;
|
|
71
|
+
--primary: 217.2 91.2% 59.8%;
|
|
72
|
+
--primary-foreground: 222.2 84% 4.9%;
|
|
73
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
74
|
+
--secondary-foreground: 210 40% 98%;
|
|
75
|
+
--muted: 217.2 32.6% 17.5%;
|
|
76
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
77
|
+
--accent: 217.2 32.6% 17.5%;
|
|
78
|
+
--accent-foreground: 210 40% 98%;
|
|
79
|
+
--destructive: 0 62.8% 30.6%;
|
|
80
|
+
--destructive-foreground: 210 40% 98%;
|
|
81
|
+
--border: 217.2 32.6% 17.5%;
|
|
82
|
+
--input: 217.2 32.6% 17.5%;
|
|
83
|
+
--ring: 224.3 76.3% 48%;
|
|
34
84
|
}
|
|
35
85
|
|
|
36
86
|
@layer base {
|
|
37
87
|
* {
|
|
38
|
-
|
|
88
|
+
border-color: hsl(var(--border));
|
|
39
89
|
}
|
|
40
90
|
body {
|
|
41
|
-
|
|
91
|
+
font-family: var(--font-sans);
|
|
92
|
+
background-color: hsl(var(--background));
|
|
93
|
+
color: hsl(var(--foreground));
|
|
94
|
+
-webkit-font-smoothing: antialiased;
|
|
95
|
+
-moz-osx-font-smoothing: grayscale;
|
|
42
96
|
}
|
|
43
97
|
}
|
|
@@ -21,8 +21,11 @@ export default function RootLayout({
|
|
|
21
21
|
<html lang="en" suppressHydrationWarning>
|
|
22
22
|
<body className={`${inter.className} min-h-screen flex flex-col`}>
|
|
23
23
|
<AppProviders>
|
|
24
|
+
<a href="#main-content" className="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-[90] focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-lg focus:outline-none">
|
|
25
|
+
Skip to content
|
|
26
|
+
</a>
|
|
24
27
|
<Header />
|
|
25
|
-
<main className="flex-1">
|
|
28
|
+
<main id="main-content" className="flex-1">
|
|
26
29
|
{children}
|
|
27
30
|
</main>
|
|
28
31
|
<Footer />
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Card } from '@digilogiclabs/saas-factory-ui'
|
|
2
|
-
import { Loader2 } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
export default function Loading() {
|
|
5
|
-
return (
|
|
6
|
-
<div className="min-h-screen bg-
|
|
7
|
-
<Card className="w-full max-w-md p-8 text-center">
|
|
8
|
-
<div className="flex flex-col items-center">
|
|
9
|
-
<Loader2 className="h-8 w-8 animate-spin text-
|
|
10
|
-
<h2 className="text-lg font-medium text-
|
|
11
|
-
Loading
|
|
12
|
-
</h2>
|
|
13
|
-
<p className="text-sm text-
|
|
14
|
-
Please wait while we load your content...
|
|
15
|
-
</p>
|
|
16
|
-
</div>
|
|
17
|
-
</Card>
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
1
|
+
import { Card } from '@digilogiclabs/saas-factory-ui'
|
|
2
|
+
import { Loader2 } from 'lucide-react'
|
|
3
|
+
|
|
4
|
+
export default function Loading() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="min-h-screen bg-background flex items-center justify-center p-4">
|
|
7
|
+
<Card className="w-full max-w-md p-8 text-center">
|
|
8
|
+
<div className="flex flex-col items-center">
|
|
9
|
+
<Loader2 className="h-8 w-8 animate-spin text-primary mb-4" />
|
|
10
|
+
<h2 className="text-lg font-medium text-foreground mb-2">
|
|
11
|
+
Loading
|
|
12
|
+
</h2>
|
|
13
|
+
<p className="text-sm text-muted-foreground">
|
|
14
|
+
Please wait while we load your content...
|
|
15
|
+
</p>
|
|
16
|
+
</div>
|
|
17
|
+
</Card>
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"lib": ["dom", "dom.iterable", "
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"module": "esnext",
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"jsx": "preserve",
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"plugins": [
|
|
17
|
-
{
|
|
18
|
-
"name": "next"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
31
|
-
"exclude": ["node_modules"]
|
|
32
|
-
}
|
|
33
|
-
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
26
|
+
"exclude": ["node_modules"]
|
|
27
|
+
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { createServerClient } from '@supabase/ssr'
|
|
2
|
-
import { NextResponse, type NextRequest } from 'next/server'
|
|
3
|
-
|
|
4
|
-
export async function middleware(request: NextRequest) {
|
|
5
|
-
let supabaseResponse = NextResponse.next({
|
|
6
|
-
request,
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
const supabase = createServerClient(
|
|
10
|
-
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
11
|
-
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
12
|
-
{
|
|
13
|
-
cookies: {
|
|
14
|
-
getAll() {
|
|
15
|
-
return request.cookies.getAll()
|
|
16
|
-
},
|
|
17
|
-
setAll(cookiesToSet: Array<{ name: string; value: string; options?: Record<string, unknown> }>) {
|
|
18
|
-
cookiesToSet.forEach(({ name, value }) =>
|
|
19
|
-
request.cookies.set(name, value)
|
|
20
|
-
)
|
|
21
|
-
supabaseResponse = NextResponse.next({
|
|
22
|
-
request,
|
|
23
|
-
})
|
|
24
|
-
cookiesToSet.forEach(({ name, value, options }) =>
|
|
25
|
-
supabaseResponse.cookies.set(name, value, options)
|
|
26
|
-
)
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
data: { user },
|
|
34
|
-
} = await supabase.auth.getUser()
|
|
35
|
-
|
|
36
|
-
// Redirect to login if accessing protected route without auth
|
|
37
|
-
if (
|
|
38
|
-
!user &&
|
|
39
|
-
(request.nextUrl.pathname.startsWith('/dashboard') ||
|
|
40
|
-
request.nextUrl.pathname.startsWith('/chat') ||
|
|
41
|
-
request.nextUrl.pathname.startsWith('/playground'))
|
|
42
|
-
) {
|
|
43
|
-
const url = request.nextUrl.clone()
|
|
44
|
-
url.pathname = '/login'
|
|
45
|
-
return NextResponse.redirect(url)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return supabaseResponse
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const config = {
|
|
52
|
-
matcher: [
|
|
53
|
-
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)',
|
|
54
|
-
],
|
|
55
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createServerClient } from '@supabase/ssr'
|
|
2
|
-
import { cookies } from 'next/headers'
|
|
3
|
-
|
|
4
|
-
export async function createClient() {
|
|
5
|
-
const cookieStore = await cookies()
|
|
6
|
-
|
|
7
|
-
return createServerClient(
|
|
8
|
-
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
9
|
-
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
10
|
-
{
|
|
11
|
-
cookies: {
|
|
12
|
-
getAll() {
|
|
13
|
-
return cookieStore.getAll()
|
|
14
|
-
},
|
|
15
|
-
setAll(cookiesToSet: Array<{ name: string; value: string; options?: Record<string, unknown> }>) {
|
|
16
|
-
try {
|
|
17
|
-
cookiesToSet.forEach(({ name, value, options }) =>
|
|
18
|
-
cookieStore.set(name, value, options)
|
|
19
|
-
)
|
|
20
|
-
} catch {
|
|
21
|
-
// Server Component context
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
darkMode: ["class"],
|
|
4
|
-
content: [
|
|
5
|
-
'./pages/**/*.{ts,tsx}',
|
|
6
|
-
'./components/**/*.{ts,tsx}',
|
|
7
|
-
'./app/**/*.{ts,tsx}',
|
|
8
|
-
'./src/**/*.{ts,tsx}',
|
|
9
|
-
'../../node_modules/@digilogiclabs/saas-factory-ui/dist/**/*.{js,ts,jsx,tsx}',
|
|
10
|
-
],
|
|
11
|
-
theme: {
|
|
12
|
-
container: {
|
|
13
|
-
center: true,
|
|
14
|
-
padding: "2rem",
|
|
15
|
-
screens: {
|
|
16
|
-
"2xl": "1400px",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
extend: {
|
|
20
|
-
colors: {
|
|
21
|
-
border: "hsl(var(--border))",
|
|
22
|
-
input: "hsl(var(--input))",
|
|
23
|
-
ring: "hsl(var(--ring))",
|
|
24
|
-
background: "hsl(var(--background))",
|
|
25
|
-
foreground: "hsl(var(--foreground))",
|
|
26
|
-
primary: {
|
|
27
|
-
DEFAULT: "hsl(var(--primary))",
|
|
28
|
-
foreground: "hsl(var(--primary-foreground))",
|
|
29
|
-
},
|
|
30
|
-
secondary: {
|
|
31
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
32
|
-
foreground: "hsl(var(--secondary-foreground))",
|
|
33
|
-
},
|
|
34
|
-
destructive: {
|
|
35
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
36
|
-
foreground: "hsl(var(--destructive-foreground))",
|
|
37
|
-
},
|
|
38
|
-
muted: {
|
|
39
|
-
DEFAULT: "hsl(var(--muted))",
|
|
40
|
-
foreground: "hsl(var(--muted-foreground))",
|
|
41
|
-
},
|
|
42
|
-
accent: {
|
|
43
|
-
DEFAULT: "hsl(var(--accent))",
|
|
44
|
-
foreground: "hsl(var(--accent-foreground))",
|
|
45
|
-
},
|
|
46
|
-
popover: {
|
|
47
|
-
DEFAULT: "hsl(var(--popover))",
|
|
48
|
-
foreground: "hsl(var(--popover-foreground))",
|
|
49
|
-
},
|
|
50
|
-
card: {
|
|
51
|
-
DEFAULT: "hsl(var(--card))",
|
|
52
|
-
foreground: "hsl(var(--card-foreground))",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
borderRadius: {
|
|
56
|
-
lg: "var(--radius)",
|
|
57
|
-
md: "calc(var(--radius) - 2px)",
|
|
58
|
-
sm: "calc(var(--radius) - 4px)",
|
|
59
|
-
},
|
|
60
|
-
keyframes: {
|
|
61
|
-
"accordion-down": {
|
|
62
|
-
from: { height: 0 },
|
|
63
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
64
|
-
},
|
|
65
|
-
"accordion-up": {
|
|
66
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
67
|
-
to: { height: 0 },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
animation: {
|
|
71
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
72
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
plugins: [require("tailwindcss-animate")],
|
|
77
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { createServerClient } from '@supabase/ssr'
|
|
2
|
-
import { NextResponse, type NextRequest } from 'next/server'
|
|
3
|
-
|
|
4
|
-
export async function middleware(request: NextRequest) {
|
|
5
|
-
let supabaseResponse = NextResponse.next({
|
|
6
|
-
request,
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
const supabase = createServerClient(
|
|
10
|
-
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
11
|
-
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
12
|
-
{
|
|
13
|
-
cookies: {
|
|
14
|
-
getAll() {
|
|
15
|
-
return request.cookies.getAll()
|
|
16
|
-
},
|
|
17
|
-
setAll(cookiesToSet: Array<{ name: string; value: string; options?: Record<string, unknown> }>) {
|
|
18
|
-
cookiesToSet.forEach(({ name, value }) =>
|
|
19
|
-
request.cookies.set(name, value)
|
|
20
|
-
)
|
|
21
|
-
supabaseResponse = NextResponse.next({
|
|
22
|
-
request,
|
|
23
|
-
})
|
|
24
|
-
cookiesToSet.forEach(({ name, value, options }) =>
|
|
25
|
-
supabaseResponse.cookies.set(name, value, options)
|
|
26
|
-
)
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
data: { user },
|
|
34
|
-
} = await supabase.auth.getUser()
|
|
35
|
-
|
|
36
|
-
// Redirect to login if accessing protected route without auth
|
|
37
|
-
if (
|
|
38
|
-
!user &&
|
|
39
|
-
(request.nextUrl.pathname.startsWith('/dashboard') ||
|
|
40
|
-
request.nextUrl.pathname.startsWith('/devices') ||
|
|
41
|
-
request.nextUrl.pathname.startsWith('/analytics') ||
|
|
42
|
-
request.nextUrl.pathname.startsWith('/alerts'))
|
|
43
|
-
) {
|
|
44
|
-
const url = request.nextUrl.clone()
|
|
45
|
-
url.pathname = '/login'
|
|
46
|
-
return NextResponse.redirect(url)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return supabaseResponse
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const config = {
|
|
53
|
-
matcher: [
|
|
54
|
-
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)',
|
|
55
|
-
],
|
|
56
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createServerClient } from '@supabase/ssr'
|
|
2
|
-
import { cookies } from 'next/headers'
|
|
3
|
-
|
|
4
|
-
export async function createClient() {
|
|
5
|
-
const cookieStore = await cookies()
|
|
6
|
-
|
|
7
|
-
return createServerClient(
|
|
8
|
-
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
9
|
-
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
10
|
-
{
|
|
11
|
-
cookies: {
|
|
12
|
-
getAll() {
|
|
13
|
-
return cookieStore.getAll()
|
|
14
|
-
},
|
|
15
|
-
setAll(cookiesToSet: Array<{ name: string; value: string; options?: Record<string, unknown> }>) {
|
|
16
|
-
try {
|
|
17
|
-
cookiesToSet.forEach(({ name, value, options }) =>
|
|
18
|
-
cookieStore.set(name, value, options)
|
|
19
|
-
)
|
|
20
|
-
} catch {
|
|
21
|
-
// Server Component context
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
}
|