@digilogiclabs/create-saas-app 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +975 -891
- package/dist/.tsbuildinfo +1 -1
- package/dist/generators/template-generator.d.ts +11 -0
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +389 -18
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/index.js +1837 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/infrastructure/kubernetes/base/template/README.md +253 -0
- package/dist/templates/infrastructure/kubernetes/base/template/configmap.yaml +12 -0
- package/dist/templates/infrastructure/kubernetes/base/template/deployment.yaml +123 -0
- package/dist/templates/infrastructure/kubernetes/base/template/hpa.yaml +45 -0
- package/dist/templates/infrastructure/kubernetes/base/template/ingress.yaml +31 -0
- package/dist/templates/infrastructure/kubernetes/base/template/kustomization.yaml +25 -0
- package/dist/templates/infrastructure/kubernetes/base/template/namespace.yaml +8 -0
- package/dist/templates/infrastructure/kubernetes/base/template/networkpolicy.yaml +48 -0
- package/dist/templates/infrastructure/kubernetes/base/template/pdb.yaml +14 -0
- package/dist/templates/infrastructure/kubernetes/base/template/secret.yaml +17 -0
- package/dist/templates/infrastructure/kubernetes/base/template/service.yaml +19 -0
- package/dist/templates/infrastructure/kubernetes/base/template/serviceaccount.yaml +9 -0
- package/dist/templates/infrastructure/kubernetes/production/template/kustomization.yaml +92 -0
- package/dist/templates/infrastructure/terraform/aws/template/README.md +156 -0
- package/dist/templates/infrastructure/terraform/aws/template/main.tf +343 -0
- package/dist/templates/infrastructure/terraform/aws/template/outputs.tf +66 -0
- package/dist/templates/infrastructure/terraform/aws/template/terraform.tfvars.example +28 -0
- package/dist/templates/infrastructure/terraform/aws/template/variables.tf +110 -0
- package/dist/templates/infrastructure/terraform/gcp/template/README.md +165 -0
- package/dist/templates/infrastructure/terraform/gcp/template/main.tf +397 -0
- package/dist/templates/infrastructure/terraform/gcp/template/outputs.tf +51 -0
- package/dist/templates/infrastructure/terraform/gcp/template/terraform.tfvars.example +29 -0
- package/dist/templates/infrastructure/terraform/gcp/template/variables.tf +115 -0
- package/dist/templates/shared/admin/web/app/admin/layout.tsx +34 -0
- package/dist/templates/shared/admin/web/components/admin-nav.tsx +48 -0
- package/dist/templates/shared/audit/web/lib/audit.ts +24 -0
- package/dist/templates/shared/auth/keycloak/web/app/api/auth/federated-logout/route.ts +173 -0
- package/dist/templates/shared/auth/keycloak/web/auth.config.ts +84 -0
- package/dist/templates/shared/auth/keycloak/web/auth.ts +26 -0
- package/dist/templates/shared/beta/web/app/api/beta-settings/route.ts +25 -0
- package/dist/templates/shared/beta/web/app/api/validate-beta-code/route.ts +67 -0
- package/dist/templates/shared/beta/web/lib/beta/settings.ts +31 -0
- package/dist/templates/shared/cache/web/lib/cache.ts +44 -0
- package/dist/templates/shared/config/web/lib/config.ts +112 -0
- package/dist/templates/shared/config/web/next.config.mjs +62 -0
- package/dist/templates/shared/contact/web/app/api/contact/route.ts +113 -0
- package/dist/templates/shared/contact/web/app/contact/page.tsx +195 -0
- package/dist/templates/shared/cookie-consent/web/components/cookie-consent.tsx +54 -0
- package/dist/templates/shared/database/postgresql/web/drizzle.config.ts +16 -0
- package/dist/templates/shared/database/postgresql/web/lib/db/drizzle.ts +39 -0
- package/dist/templates/shared/database/postgresql/web/lib/db/schema.ts +33 -0
- package/dist/templates/shared/database/supabase/web/lib/supabase/client.ts +12 -0
- package/dist/templates/shared/database/supabase/web/lib/supabase/server.ts +31 -0
- package/dist/templates/shared/database/supabase/web/lib/supabase/service.ts +15 -0
- package/dist/templates/shared/email/web/lib/email/branding.ts +18 -0
- package/dist/templates/shared/email/web/lib/email/client.ts +96 -0
- package/dist/templates/shared/error-pages/web/app/error.tsx +70 -0
- package/dist/templates/shared/error-pages/web/app/global-error.tsx +102 -0
- package/dist/templates/shared/error-pages/web/app/not-found.tsx +39 -0
- package/dist/templates/shared/health/web/app/api/health/route.ts +68 -0
- package/dist/templates/shared/legal/web/app/(legal)/privacy/page.tsx +205 -0
- package/dist/templates/shared/legal/web/app/(legal)/terms/page.tsx +154 -0
- package/dist/templates/shared/legal/web/lib/legal-config.ts +50 -0
- package/dist/templates/shared/loading/web/app/loading.tsx +5 -0
- package/dist/templates/shared/loading/web/components/skeleton.tsx +95 -0
- package/dist/templates/shared/middleware/web/middleware.ts +68 -0
- package/dist/templates/shared/observability/web/lib/observability.ts +135 -0
- package/dist/templates/shared/payments/web/app/api/webhooks/stripe/route.ts +109 -0
- package/dist/templates/shared/platform/web/lib/platform.ts +37 -0
- package/dist/templates/shared/redis/web/lib/rate-limit-store.ts +18 -0
- package/dist/templates/shared/redis/web/lib/redis.ts +48 -0
- package/dist/templates/shared/security/web/lib/api-security.ts +318 -0
- package/dist/templates/shared/seo/web/app/api/og/route.tsx +97 -0
- package/dist/templates/shared/seo/web/app/robots.ts +53 -0
- package/dist/templates/shared/seo/web/app/sitemap.ts +53 -0
- package/dist/templates/shared/utils/web/lib/api-response.ts +71 -0
- package/dist/templates/shared/utils/web/lib/utils.ts +85 -0
- package/dist/templates/web/ai-platform/template/.env.example +16 -0
- package/dist/templates/web/ai-platform/template/README.md +84 -0
- package/dist/templates/web/ai-platform/template/middleware.ts +55 -0
- package/dist/templates/web/ai-platform/template/next.config.js +14 -0
- package/dist/templates/web/ai-platform/template/package.json +55 -0
- package/dist/templates/web/ai-platform/template/src/app/api/chat/route.ts +54 -0
- package/dist/templates/web/ai-platform/template/src/app/chat/page.tsx +235 -0
- package/dist/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -0
- package/dist/templates/web/ai-platform/template/src/app/globals.css +34 -0
- package/dist/templates/web/ai-platform/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/ai-platform/template/src/app/page.tsx +203 -0
- package/dist/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +27 -0
- package/dist/templates/web/ai-platform/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/ai-platform/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/ai-platform/template/src/lib/supabase/server.ts +27 -0
- package/dist/templates/web/ai-platform/template/src/lib/utils.ts +6 -0
- package/dist/templates/web/ai-platform/template/tsconfig.json +27 -0
- package/dist/templates/web/iot-dashboard/template/.env.example +12 -0
- package/dist/templates/web/iot-dashboard/template/README.md +101 -0
- package/dist/templates/web/iot-dashboard/template/middleware.ts +56 -0
- package/dist/templates/web/iot-dashboard/template/next.config.js +14 -0
- package/dist/templates/web/iot-dashboard/template/package.json +49 -0
- package/dist/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +229 -0
- package/dist/templates/web/iot-dashboard/template/src/app/globals.css +20 -0
- package/dist/templates/web/iot-dashboard/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/iot-dashboard/template/src/app/page.tsx +191 -0
- package/dist/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +24 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +27 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/utils.ts +25 -0
- package/dist/templates/web/iot-dashboard/template/tsconfig.json +27 -0
- package/dist/templates/web/marketplace/template/.env.example +12 -0
- package/dist/templates/web/marketplace/template/README.md +66 -0
- package/dist/templates/web/marketplace/template/middleware.ts +56 -0
- package/dist/templates/web/marketplace/template/next.config.js +14 -0
- package/dist/templates/web/marketplace/template/package.json +51 -0
- package/dist/templates/web/marketplace/template/src/app/cart/page.tsx +147 -0
- package/dist/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -0
- package/dist/templates/web/marketplace/template/src/app/globals.css +20 -0
- package/dist/templates/web/marketplace/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/marketplace/template/src/app/page.tsx +167 -0
- package/dist/templates/web/marketplace/template/src/app/products/page.tsx +129 -0
- package/dist/templates/web/marketplace/template/src/components/providers/app-providers.tsx +27 -0
- package/dist/templates/web/marketplace/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/marketplace/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/marketplace/template/src/lib/supabase/server.ts +27 -0
- package/dist/templates/web/marketplace/template/src/lib/utils.ts +19 -0
- package/dist/templates/web/marketplace/template/tsconfig.json +27 -0
- package/dist/templates/web/micro-saas/template/.env.example +10 -0
- package/dist/templates/web/micro-saas/template/README.md +63 -0
- package/dist/templates/web/micro-saas/template/middleware.ts +53 -0
- package/dist/templates/web/micro-saas/template/next.config.js +14 -0
- package/dist/templates/web/micro-saas/template/package.json +41 -0
- package/dist/templates/web/micro-saas/template/src/app/dashboard/page.tsx +117 -0
- package/dist/templates/web/micro-saas/template/src/app/globals.css +20 -0
- package/dist/templates/web/micro-saas/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/micro-saas/template/src/app/login/page.tsx +87 -0
- package/dist/templates/web/micro-saas/template/src/app/page.tsx +137 -0
- package/dist/templates/web/micro-saas/template/src/app/signup/page.tsx +108 -0
- package/dist/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +24 -0
- package/dist/templates/web/micro-saas/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/micro-saas/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/micro-saas/template/src/lib/supabase/server.ts +29 -0
- package/dist/templates/web/micro-saas/template/src/lib/utils.ts +6 -0
- package/dist/templates/web/micro-saas/template/tsconfig.json +27 -0
- package/package.json +5 -4
- package/src/templates/infrastructure/kubernetes/base/template/README.md +253 -0
- package/src/templates/infrastructure/kubernetes/base/template/configmap.yaml +12 -0
- package/src/templates/infrastructure/kubernetes/base/template/deployment.yaml +123 -0
- package/src/templates/infrastructure/kubernetes/base/template/hpa.yaml +45 -0
- package/src/templates/infrastructure/kubernetes/base/template/ingress.yaml +31 -0
- package/src/templates/infrastructure/kubernetes/base/template/kustomization.yaml +25 -0
- package/src/templates/infrastructure/kubernetes/base/template/namespace.yaml +8 -0
- package/src/templates/infrastructure/kubernetes/base/template/networkpolicy.yaml +48 -0
- package/src/templates/infrastructure/kubernetes/base/template/pdb.yaml +14 -0
- package/src/templates/infrastructure/kubernetes/base/template/secret.yaml +17 -0
- package/src/templates/infrastructure/kubernetes/base/template/service.yaml +19 -0
- package/src/templates/infrastructure/kubernetes/base/template/serviceaccount.yaml +9 -0
- package/src/templates/infrastructure/kubernetes/production/template/kustomization.yaml +92 -0
- package/src/templates/infrastructure/terraform/aws/template/README.md +156 -0
- package/src/templates/infrastructure/terraform/aws/template/main.tf +343 -0
- package/src/templates/infrastructure/terraform/aws/template/outputs.tf +66 -0
- package/src/templates/infrastructure/terraform/aws/template/terraform.tfvars.example +28 -0
- package/src/templates/infrastructure/terraform/aws/template/variables.tf +110 -0
- package/src/templates/infrastructure/terraform/gcp/template/README.md +165 -0
- package/src/templates/infrastructure/terraform/gcp/template/main.tf +397 -0
- package/src/templates/infrastructure/terraform/gcp/template/outputs.tf +51 -0
- package/src/templates/infrastructure/terraform/gcp/template/terraform.tfvars.example +29 -0
- package/src/templates/infrastructure/terraform/gcp/template/variables.tf +115 -0
- package/src/templates/shared/admin/web/app/admin/layout.tsx +34 -0
- package/src/templates/shared/admin/web/components/admin-nav.tsx +48 -0
- package/src/templates/shared/audit/web/lib/audit.ts +24 -0
- package/src/templates/shared/auth/keycloak/web/app/api/auth/federated-logout/route.ts +173 -0
- package/src/templates/shared/auth/keycloak/web/auth.config.ts +84 -0
- package/src/templates/shared/auth/keycloak/web/auth.ts +26 -0
- package/src/templates/shared/beta/web/app/api/beta-settings/route.ts +25 -0
- package/src/templates/shared/beta/web/app/api/validate-beta-code/route.ts +67 -0
- package/src/templates/shared/beta/web/lib/beta/settings.ts +31 -0
- package/src/templates/shared/cache/web/lib/cache.ts +44 -0
- package/src/templates/shared/config/web/lib/config.ts +112 -0
- package/src/templates/shared/config/web/next.config.mjs +62 -0
- package/src/templates/shared/contact/web/app/api/contact/route.ts +113 -0
- package/src/templates/shared/contact/web/app/contact/page.tsx +195 -0
- package/src/templates/shared/cookie-consent/web/components/cookie-consent.tsx +54 -0
- package/src/templates/shared/database/postgresql/web/drizzle.config.ts +16 -0
- package/src/templates/shared/database/postgresql/web/lib/db/drizzle.ts +39 -0
- package/src/templates/shared/database/postgresql/web/lib/db/schema.ts +33 -0
- package/src/templates/shared/database/supabase/web/lib/supabase/client.ts +12 -0
- package/src/templates/shared/database/supabase/web/lib/supabase/server.ts +31 -0
- package/src/templates/shared/database/supabase/web/lib/supabase/service.ts +15 -0
- package/src/templates/shared/email/web/lib/email/branding.ts +18 -0
- package/src/templates/shared/email/web/lib/email/client.ts +96 -0
- package/src/templates/shared/error-pages/web/app/error.tsx +70 -0
- package/src/templates/shared/error-pages/web/app/global-error.tsx +102 -0
- package/src/templates/shared/error-pages/web/app/not-found.tsx +39 -0
- package/src/templates/shared/health/web/app/api/health/route.ts +68 -0
- package/src/templates/shared/legal/web/app/(legal)/privacy/page.tsx +205 -0
- package/src/templates/shared/legal/web/app/(legal)/terms/page.tsx +154 -0
- package/src/templates/shared/legal/web/lib/legal-config.ts +50 -0
- package/src/templates/shared/loading/web/app/loading.tsx +5 -0
- package/src/templates/shared/loading/web/components/skeleton.tsx +95 -0
- package/src/templates/shared/middleware/web/middleware.ts +68 -0
- package/src/templates/shared/observability/web/lib/observability.ts +135 -0
- package/src/templates/shared/payments/web/app/api/webhooks/stripe/route.ts +109 -0
- package/src/templates/shared/platform/web/lib/platform.ts +37 -0
- package/src/templates/shared/redis/web/lib/rate-limit-store.ts +18 -0
- package/src/templates/shared/redis/web/lib/redis.ts +48 -0
- package/src/templates/shared/security/web/lib/api-security.ts +318 -0
- package/src/templates/shared/seo/web/app/api/og/route.tsx +97 -0
- package/src/templates/shared/seo/web/app/robots.ts +53 -0
- package/src/templates/shared/seo/web/app/sitemap.ts +53 -0
- package/src/templates/shared/utils/web/lib/api-response.ts +71 -0
- package/src/templates/shared/utils/web/lib/utils.ts +85 -0
- package/src/templates/web/ai-platform/template/.env.example +16 -0
- package/src/templates/web/ai-platform/template/README.md +84 -0
- package/src/templates/web/ai-platform/template/middleware.ts +55 -0
- package/src/templates/web/ai-platform/template/next.config.js +14 -0
- package/src/templates/web/ai-platform/template/package.json +55 -0
- package/src/templates/web/ai-platform/template/src/app/api/chat/route.ts +54 -0
- package/src/templates/web/ai-platform/template/src/app/chat/page.tsx +235 -0
- package/src/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -0
- package/src/templates/web/ai-platform/template/src/app/globals.css +34 -0
- package/src/templates/web/ai-platform/template/src/app/layout.tsx +27 -0
- package/src/templates/web/ai-platform/template/src/app/page.tsx +203 -0
- package/src/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +27 -0
- package/src/templates/web/ai-platform/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/ai-platform/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/ai-platform/template/src/lib/supabase/server.ts +27 -0
- package/src/templates/web/ai-platform/template/src/lib/utils.ts +6 -0
- package/src/templates/web/ai-platform/template/tsconfig.json +27 -0
- package/src/templates/web/iot-dashboard/template/.env.example +12 -0
- package/src/templates/web/iot-dashboard/template/README.md +101 -0
- package/src/templates/web/iot-dashboard/template/middleware.ts +56 -0
- package/src/templates/web/iot-dashboard/template/next.config.js +14 -0
- package/src/templates/web/iot-dashboard/template/package.json +49 -0
- package/src/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +229 -0
- package/src/templates/web/iot-dashboard/template/src/app/globals.css +20 -0
- package/src/templates/web/iot-dashboard/template/src/app/layout.tsx +27 -0
- package/src/templates/web/iot-dashboard/template/src/app/page.tsx +191 -0
- package/src/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +24 -0
- package/src/templates/web/iot-dashboard/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +27 -0
- package/src/templates/web/iot-dashboard/template/src/lib/utils.ts +25 -0
- package/src/templates/web/iot-dashboard/template/tsconfig.json +27 -0
- package/src/templates/web/marketplace/template/.env.example +12 -0
- package/src/templates/web/marketplace/template/README.md +66 -0
- package/src/templates/web/marketplace/template/middleware.ts +56 -0
- package/src/templates/web/marketplace/template/next.config.js +14 -0
- package/src/templates/web/marketplace/template/package.json +51 -0
- package/src/templates/web/marketplace/template/src/app/cart/page.tsx +147 -0
- package/src/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -0
- package/src/templates/web/marketplace/template/src/app/globals.css +20 -0
- package/src/templates/web/marketplace/template/src/app/layout.tsx +27 -0
- package/src/templates/web/marketplace/template/src/app/page.tsx +167 -0
- package/src/templates/web/marketplace/template/src/app/products/page.tsx +129 -0
- package/src/templates/web/marketplace/template/src/components/providers/app-providers.tsx +27 -0
- package/src/templates/web/marketplace/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/marketplace/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/marketplace/template/src/lib/supabase/server.ts +27 -0
- package/src/templates/web/marketplace/template/src/lib/utils.ts +19 -0
- package/src/templates/web/marketplace/template/tsconfig.json +27 -0
- package/src/templates/web/micro-saas/template/.env.example +10 -0
- package/src/templates/web/micro-saas/template/README.md +63 -0
- package/src/templates/web/micro-saas/template/middleware.ts +53 -0
- package/src/templates/web/micro-saas/template/next.config.js +14 -0
- package/src/templates/web/micro-saas/template/package.json +41 -0
- package/src/templates/web/micro-saas/template/src/app/dashboard/page.tsx +117 -0
- package/src/templates/web/micro-saas/template/src/app/globals.css +20 -0
- package/src/templates/web/micro-saas/template/src/app/layout.tsx +27 -0
- package/src/templates/web/micro-saas/template/src/app/login/page.tsx +87 -0
- package/src/templates/web/micro-saas/template/src/app/page.tsx +137 -0
- package/src/templates/web/micro-saas/template/src/app/signup/page.tsx +108 -0
- package/src/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +24 -0
- package/src/templates/web/micro-saas/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/micro-saas/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/micro-saas/template/src/lib/supabase/server.ts +29 -0
- package/src/templates/web/micro-saas/template/src/lib/utils.ts +6 -0
- package/src/templates/web/micro-saas/template/tsconfig.json +27 -0
- package/dist/cli/commands/add.d.ts +0 -6
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js +0 -39
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/create.d.ts +0 -45
- package/dist/cli/commands/create.d.ts.map +0 -1
- package/dist/cli/commands/create.js +0 -175
- package/dist/cli/commands/create.js.map +0 -1
- package/dist/cli/commands/index.d.ts +0 -4
- package/dist/cli/commands/index.d.ts.map +0 -1
- package/dist/cli/commands/index.js +0 -20
- package/dist/cli/commands/index.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -6
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -68
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/index.d.ts +0 -4
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -61
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/prompts/index.d.ts +0 -2
- package/dist/cli/prompts/index.d.ts.map +0 -1
- package/dist/cli/prompts/index.js +0 -18
- package/dist/cli/prompts/index.js.map +0 -1
- package/dist/cli/prompts/project-setup.d.ts +0 -5
- package/dist/cli/prompts/project-setup.d.ts.map +0 -1
- package/dist/cli/prompts/project-setup.js +0 -316
- package/dist/cli/prompts/project-setup.js.map +0 -1
- package/dist/cli/utils/git.d.ts +0 -9
- package/dist/cli/utils/git.d.ts.map +0 -1
- package/dist/cli/utils/git.js +0 -77
- package/dist/cli/utils/git.js.map +0 -1
- package/dist/cli/utils/index.d.ts +0 -5
- package/dist/cli/utils/index.d.ts.map +0 -1
- package/dist/cli/utils/index.js +0 -21
- package/dist/cli/utils/index.js.map +0 -1
- package/dist/cli/utils/logger.d.ts +0 -16
- package/dist/cli/utils/logger.d.ts.map +0 -1
- package/dist/cli/utils/logger.js +0 -55
- package/dist/cli/utils/logger.js.map +0 -1
- package/dist/cli/utils/package-manager.d.ts +0 -8
- package/dist/cli/utils/package-manager.d.ts.map +0 -1
- package/dist/cli/utils/package-manager.js +0 -92
- package/dist/cli/utils/package-manager.js.map +0 -1
- package/dist/cli/utils/spinner.d.ts +0 -7
- package/dist/cli/utils/spinner.d.ts.map +0 -1
- package/dist/cli/utils/spinner.js +0 -48
- package/dist/cli/utils/spinner.js.map +0 -1
- package/dist/cli/validators/dependencies.d.ts +0 -15
- package/dist/cli/validators/dependencies.d.ts.map +0 -1
- package/dist/cli/validators/dependencies.js +0 -108
- package/dist/cli/validators/dependencies.js.map +0 -1
- package/dist/cli/validators/index.d.ts +0 -3
- package/dist/cli/validators/index.d.ts.map +0 -1
- package/dist/cli/validators/index.js +0 -19
- package/dist/cli/validators/index.js.map +0 -1
- package/dist/cli/validators/project-name.d.ts +0 -5
- package/dist/cli/validators/project-name.d.ts.map +0 -1
- package/dist/cli/validators/project-name.js +0 -151
- package/dist/cli/validators/project-name.js.map +0 -1
- package/dist/generators/file-processor.d.ts +0 -28
- package/dist/generators/file-processor.d.ts.map +0 -1
- package/dist/generators/file-processor.js +0 -224
- package/dist/generators/file-processor.js.map +0 -1
- package/dist/generators/index.d.ts +0 -4
- package/dist/generators/index.d.ts.map +0 -1
- package/dist/generators/index.js +0 -20
- package/dist/generators/index.js.map +0 -1
- package/dist/generators/package-installer.d.ts +0 -29
- package/dist/generators/package-installer.d.ts.map +0 -1
- package/dist/generators/package-installer.js +0 -177
- package/dist/generators/package-installer.js.map +0 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
4
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
5
|
+
import { ShoppingCart, Store, Search, Star, ArrowRight, User, LogOut } from 'lucide-react'
|
|
6
|
+
import Link from 'next/link'
|
|
7
|
+
import { useState } from 'react'
|
|
8
|
+
|
|
9
|
+
const FEATURED_PRODUCTS = [
|
|
10
|
+
{ id: 1, name: 'Premium Widget', price: 49.99, vendor: 'TechCo', rating: 4.8, image: '/placeholder.jpg' },
|
|
11
|
+
{ id: 2, name: 'Pro Toolkit', price: 129.99, vendor: 'DevTools', rating: 4.9, image: '/placeholder.jpg' },
|
|
12
|
+
{ id: 3, name: 'Designer Pack', price: 79.99, vendor: 'CreativeStudio', rating: 4.7, image: '/placeholder.jpg' },
|
|
13
|
+
{ id: 4, name: 'Analytics Suite', price: 199.99, vendor: 'DataCorp', rating: 4.6, image: '/placeholder.jpg' },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
const CATEGORIES = [
|
|
17
|
+
{ name: 'Software', count: 234, icon: '💻' },
|
|
18
|
+
{ name: 'Templates', count: 156, icon: '📄' },
|
|
19
|
+
{ name: 'Services', count: 89, icon: '🔧' },
|
|
20
|
+
{ name: 'Courses', count: 67, icon: '📚' },
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
export default function Home() {
|
|
24
|
+
const { user, signOut, loading } = useAuth()
|
|
25
|
+
const [searchQuery, setSearchQuery] = useState('')
|
|
26
|
+
|
|
27
|
+
const projectName = "{{titleCaseName}}"
|
|
28
|
+
|
|
29
|
+
const handleSignOut = async () => {
|
|
30
|
+
try {
|
|
31
|
+
await signOut()
|
|
32
|
+
} catch (err) {
|
|
33
|
+
console.error('Sign out error:', err)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<main className="min-h-screen bg-gray-50 dark:bg-gray-900">
|
|
39
|
+
{/* Header */}
|
|
40
|
+
<header className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50">
|
|
41
|
+
<div className="max-w-7xl mx-auto px-4 py-4">
|
|
42
|
+
<div className="flex items-center justify-between">
|
|
43
|
+
<Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
|
|
44
|
+
{projectName}
|
|
45
|
+
</Link>
|
|
46
|
+
|
|
47
|
+
{/* Search */}
|
|
48
|
+
<div className="flex-1 max-w-xl mx-8">
|
|
49
|
+
<div className="relative">
|
|
50
|
+
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
|
|
51
|
+
<input
|
|
52
|
+
type="text"
|
|
53
|
+
placeholder="Search products..."
|
|
54
|
+
value={searchQuery}
|
|
55
|
+
onChange={(e) => setSearchQuery(e.target.value)}
|
|
56
|
+
className="w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
{/* Actions */}
|
|
62
|
+
<div className="flex items-center gap-4">
|
|
63
|
+
<Link href="/cart">
|
|
64
|
+
<Button variant="outline" size="sm">
|
|
65
|
+
<ShoppingCart className="w-4 h-4 mr-2" />
|
|
66
|
+
Cart
|
|
67
|
+
</Button>
|
|
68
|
+
</Link>
|
|
69
|
+
{loading ? (
|
|
70
|
+
<div className="text-sm text-gray-600">Loading...</div>
|
|
71
|
+
) : user ? (
|
|
72
|
+
<div className="flex items-center gap-2">
|
|
73
|
+
<Link href="/dashboard">
|
|
74
|
+
<Button variant="outline" size="sm">
|
|
75
|
+
<User className="w-4 h-4 mr-2" />
|
|
76
|
+
Dashboard
|
|
77
|
+
</Button>
|
|
78
|
+
</Link>
|
|
79
|
+
<Button variant="ghost" size="sm" onClick={handleSignOut}>
|
|
80
|
+
<LogOut className="w-4 h-4" />
|
|
81
|
+
</Button>
|
|
82
|
+
</div>
|
|
83
|
+
) : (
|
|
84
|
+
<div className="flex gap-2">
|
|
85
|
+
<Link href="/login">
|
|
86
|
+
<Button variant="outline" size="sm">Sign In</Button>
|
|
87
|
+
</Link>
|
|
88
|
+
<Link href="/signup">
|
|
89
|
+
<Button size="sm">Get Started</Button>
|
|
90
|
+
</Link>
|
|
91
|
+
</div>
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</header>
|
|
97
|
+
|
|
98
|
+
<div className="max-w-7xl mx-auto px-4 py-8">
|
|
99
|
+
{/* Hero */}
|
|
100
|
+
<div className="text-center mb-12">
|
|
101
|
+
<h1 className="text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4">
|
|
102
|
+
Your Digital Marketplace
|
|
103
|
+
</h1>
|
|
104
|
+
<p className="text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto">
|
|
105
|
+
Discover amazing products from verified vendors. Buy and sell with confidence.
|
|
106
|
+
</p>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
{/* Categories */}
|
|
110
|
+
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-12">
|
|
111
|
+
{CATEGORIES.map((category) => (
|
|
112
|
+
<Card key={category.name} className="p-6 text-center hover:shadow-lg transition-shadow cursor-pointer">
|
|
113
|
+
<div className="text-4xl mb-3">{category.icon}</div>
|
|
114
|
+
<h3 className="font-semibold text-gray-900 dark:text-white">{category.name}</h3>
|
|
115
|
+
<p className="text-sm text-gray-500">{category.count} items</p>
|
|
116
|
+
</Card>
|
|
117
|
+
))}
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
{/* Featured Products */}
|
|
121
|
+
<div className="mb-12">
|
|
122
|
+
<div className="flex items-center justify-between mb-6">
|
|
123
|
+
<h2 className="text-2xl font-bold text-gray-900 dark:text-white">Featured Products</h2>
|
|
124
|
+
<Link href="/products">
|
|
125
|
+
<Button variant="ghost">
|
|
126
|
+
View All
|
|
127
|
+
<ArrowRight className="w-4 h-4 ml-2" />
|
|
128
|
+
</Button>
|
|
129
|
+
</Link>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
|
133
|
+
{FEATURED_PRODUCTS.map((product) => (
|
|
134
|
+
<Card key={product.id} className="overflow-hidden hover:shadow-lg transition-shadow">
|
|
135
|
+
<div className="aspect-square bg-gray-100 dark:bg-gray-700" />
|
|
136
|
+
<div className="p-4">
|
|
137
|
+
<h3 className="font-semibold text-gray-900 dark:text-white mb-1">{product.name}</h3>
|
|
138
|
+
<p className="text-sm text-gray-500 mb-2">by {product.vendor}</p>
|
|
139
|
+
<div className="flex items-center justify-between">
|
|
140
|
+
<span className="text-lg font-bold text-blue-600">${product.price}</span>
|
|
141
|
+
<div className="flex items-center text-yellow-500">
|
|
142
|
+
<Star className="w-4 h-4 fill-current" />
|
|
143
|
+
<span className="text-sm ml-1">{product.rating}</span>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
<Button className="w-full mt-3" size="sm">Add to Cart</Button>
|
|
147
|
+
</div>
|
|
148
|
+
</Card>
|
|
149
|
+
))}
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
{/* Become a Vendor CTA */}
|
|
154
|
+
<Card className="p-8 bg-gradient-to-r from-blue-600 to-purple-600 text-white text-center">
|
|
155
|
+
<Store className="w-12 h-12 mx-auto mb-4" />
|
|
156
|
+
<h2 className="text-2xl font-bold mb-2">Become a Vendor</h2>
|
|
157
|
+
<p className="mb-6 opacity-90 max-w-md mx-auto">
|
|
158
|
+
Start selling your products to thousands of customers. Low fees, powerful tools.
|
|
159
|
+
</p>
|
|
160
|
+
<Link href="/vendors/apply">
|
|
161
|
+
<Button variant="secondary" size="lg">Apply Now</Button>
|
|
162
|
+
</Link>
|
|
163
|
+
</Card>
|
|
164
|
+
</div>
|
|
165
|
+
</main>
|
|
166
|
+
)
|
|
167
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
import { Search, Filter, Star, ShoppingCart } from 'lucide-react'
|
|
6
|
+
import Link from 'next/link'
|
|
7
|
+
|
|
8
|
+
const PRODUCTS = [
|
|
9
|
+
{ id: 1, name: 'Premium Widget Pro', price: 49.99, vendor: 'TechCo', rating: 4.8, category: 'Software', sales: 234 },
|
|
10
|
+
{ id: 2, name: 'Developer Toolkit', price: 129.99, vendor: 'DevTools', rating: 4.9, category: 'Software', sales: 156 },
|
|
11
|
+
{ id: 3, name: 'UI Design Pack', price: 79.99, vendor: 'CreativeStudio', rating: 4.7, category: 'Templates', sales: 89 },
|
|
12
|
+
{ id: 4, name: 'Analytics Dashboard', price: 199.99, vendor: 'DataCorp', rating: 4.6, category: 'Software', sales: 67 },
|
|
13
|
+
{ id: 5, name: 'Marketing Templates', price: 39.99, vendor: 'GrowthLab', rating: 4.5, category: 'Templates', sales: 312 },
|
|
14
|
+
{ id: 6, name: 'API Integration Kit', price: 149.99, vendor: 'APIExperts', rating: 4.8, category: 'Software', sales: 178 },
|
|
15
|
+
{ id: 7, name: 'SEO Course Bundle', price: 99.99, vendor: 'SEOMasters', rating: 4.9, category: 'Courses', sales: 245 },
|
|
16
|
+
{ id: 8, name: 'Cloud Consulting', price: 299.99, vendor: 'CloudPros', rating: 4.7, category: 'Services', sales: 45 },
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
const CATEGORIES = ['All', 'Software', 'Templates', 'Courses', 'Services']
|
|
20
|
+
|
|
21
|
+
export default function ProductsPage() {
|
|
22
|
+
const [searchQuery, setSearchQuery] = useState('')
|
|
23
|
+
const [selectedCategory, setSelectedCategory] = useState('All')
|
|
24
|
+
const [sortBy, setSortBy] = useState('popular')
|
|
25
|
+
|
|
26
|
+
const filteredProducts = PRODUCTS
|
|
27
|
+
.filter(p => selectedCategory === 'All' || p.category === selectedCategory)
|
|
28
|
+
.filter(p => p.name.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
29
|
+
.sort((a, b) => {
|
|
30
|
+
if (sortBy === 'popular') return b.sales - a.sales
|
|
31
|
+
if (sortBy === 'price-low') return a.price - b.price
|
|
32
|
+
if (sortBy === 'price-high') return b.price - a.price
|
|
33
|
+
if (sortBy === 'rating') return b.rating - a.rating
|
|
34
|
+
return 0
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className="min-h-screen bg-gray-50 dark:bg-gray-900">
|
|
39
|
+
{/* Header */}
|
|
40
|
+
<div className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700">
|
|
41
|
+
<div className="max-w-7xl mx-auto px-4 py-6">
|
|
42
|
+
<h1 className="text-3xl font-bold text-gray-900 dark:text-white mb-4">Products</h1>
|
|
43
|
+
|
|
44
|
+
{/* Search and Filters */}
|
|
45
|
+
<div className="flex flex-col md:flex-row gap-4">
|
|
46
|
+
<div className="flex-1 relative">
|
|
47
|
+
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
|
|
48
|
+
<input
|
|
49
|
+
type="text"
|
|
50
|
+
placeholder="Search products..."
|
|
51
|
+
value={searchQuery}
|
|
52
|
+
onChange={(e) => setSearchQuery(e.target.value)}
|
|
53
|
+
className="w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div className="flex gap-2">
|
|
58
|
+
<select
|
|
59
|
+
value={sortBy}
|
|
60
|
+
onChange={(e) => setSortBy(e.target.value)}
|
|
61
|
+
className="px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:text-white"
|
|
62
|
+
>
|
|
63
|
+
<option value="popular">Most Popular</option>
|
|
64
|
+
<option value="rating">Highest Rated</option>
|
|
65
|
+
<option value="price-low">Price: Low to High</option>
|
|
66
|
+
<option value="price-high">Price: High to Low</option>
|
|
67
|
+
</select>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
{/* Categories */}
|
|
72
|
+
<div className="flex gap-2 mt-4 overflow-x-auto pb-2">
|
|
73
|
+
{CATEGORIES.map((category) => (
|
|
74
|
+
<Button
|
|
75
|
+
key={category}
|
|
76
|
+
variant={selectedCategory === category ? 'default' : 'outline'}
|
|
77
|
+
size="sm"
|
|
78
|
+
onClick={() => setSelectedCategory(category)}
|
|
79
|
+
>
|
|
80
|
+
{category}
|
|
81
|
+
</Button>
|
|
82
|
+
))}
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
{/* Products Grid */}
|
|
88
|
+
<div className="max-w-7xl mx-auto px-4 py-8">
|
|
89
|
+
<div className="flex items-center justify-between mb-6">
|
|
90
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
91
|
+
{filteredProducts.length} products found
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
|
96
|
+
{filteredProducts.map((product) => (
|
|
97
|
+
<Card key={product.id} className="overflow-hidden hover:shadow-lg transition-shadow">
|
|
98
|
+
<div className="aspect-square bg-gray-100 dark:bg-gray-700 relative">
|
|
99
|
+
<span className="absolute top-2 left-2 bg-blue-600 text-white text-xs px-2 py-1 rounded">
|
|
100
|
+
{product.category}
|
|
101
|
+
</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div className="p-4">
|
|
104
|
+
<h3 className="font-semibold text-gray-900 dark:text-white mb-1">{product.name}</h3>
|
|
105
|
+
<p className="text-sm text-gray-500 mb-2">by {product.vendor}</p>
|
|
106
|
+
<div className="flex items-center justify-between mb-3">
|
|
107
|
+
<span className="text-lg font-bold text-blue-600">${product.price}</span>
|
|
108
|
+
<div className="flex items-center text-yellow-500">
|
|
109
|
+
<Star className="w-4 h-4 fill-current" />
|
|
110
|
+
<span className="text-sm ml-1">{product.rating}</span>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div className="flex gap-2">
|
|
114
|
+
<Button className="flex-1" size="sm">
|
|
115
|
+
<ShoppingCart className="w-4 h-4 mr-1" />
|
|
116
|
+
Add
|
|
117
|
+
</Button>
|
|
118
|
+
<Link href={`/products/${product.id}`} className="flex-1">
|
|
119
|
+
<Button variant="outline" size="sm" className="w-full">View</Button>
|
|
120
|
+
</Link>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</Card>
|
|
124
|
+
))}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from 'next-themes'
|
|
4
|
+
import { DLLProvider } from '@digilogiclabs/app-sdk'
|
|
5
|
+
|
|
6
|
+
interface AppProvidersProps {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
+
return (
|
|
12
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
13
|
+
<DLLProvider
|
|
14
|
+
config={{
|
|
15
|
+
auth: {
|
|
16
|
+
provider: 'supabase',
|
|
17
|
+
},
|
|
18
|
+
payments: {
|
|
19
|
+
provider: 'stripe',
|
|
20
|
+
},
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</DLLProvider>
|
|
25
|
+
</ThemeProvider>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { redirect } from 'next/navigation'
|
|
2
|
+
import { createClient } from './supabase/server'
|
|
3
|
+
|
|
4
|
+
export interface AuthUser {
|
|
5
|
+
id: string
|
|
6
|
+
email: string | null
|
|
7
|
+
name?: string | null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function getUser(): Promise<AuthUser | null> {
|
|
11
|
+
const supabase = await createClient()
|
|
12
|
+
const { data: { user }, error } = await supabase.auth.getUser()
|
|
13
|
+
|
|
14
|
+
if (error || !user) {
|
|
15
|
+
return null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
id: user.id,
|
|
20
|
+
email: user.email ?? null,
|
|
21
|
+
name: user.user_metadata?.name ?? user.user_metadata?.full_name ?? null,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function requireAuth(): Promise<AuthUser> {
|
|
26
|
+
const user = await getUser()
|
|
27
|
+
|
|
28
|
+
if (!user) {
|
|
29
|
+
redirect('/login')
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return user
|
|
33
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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) {
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { clsx, type ClassValue } from 'clsx'
|
|
2
|
+
import { twMerge } from 'tailwind-merge'
|
|
3
|
+
|
|
4
|
+
export function cn(...inputs: ClassValue[]) {
|
|
5
|
+
return twMerge(clsx(inputs))
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function formatCurrency(amount: number, currency = 'USD') {
|
|
9
|
+
return new Intl.NumberFormat('en-US', {
|
|
10
|
+
style: 'currency',
|
|
11
|
+
currency,
|
|
12
|
+
}).format(amount)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function formatDate(date: Date | string) {
|
|
16
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
17
|
+
dateStyle: 'medium',
|
|
18
|
+
}).format(new Date(date))
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Supabase Configuration
|
|
2
|
+
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
|
|
3
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
|
|
4
|
+
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
|
|
5
|
+
|
|
6
|
+
# Application
|
|
7
|
+
NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|
8
|
+
|
|
9
|
+
# Optional: Analytics
|
|
10
|
+
# NEXT_PUBLIC_ANALYTICS_ID=your-analytics-id
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# {{titleCaseName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
1. **Install dependencies:**
|
|
8
|
+
```bash
|
|
9
|
+
npm install
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. **Set up environment variables:**
|
|
13
|
+
```bash
|
|
14
|
+
cp .env.example .env.local
|
|
15
|
+
```
|
|
16
|
+
Then update `.env.local` with your Supabase credentials.
|
|
17
|
+
|
|
18
|
+
3. **Run the development server:**
|
|
19
|
+
```bash
|
|
20
|
+
npm run dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
4. **Open [http://localhost:3000](http://localhost:3000)**
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
- **Authentication** - Secure auth with Supabase
|
|
28
|
+
- **Dashboard** - User dashboard with stats
|
|
29
|
+
- **Responsive Design** - Mobile-first approach
|
|
30
|
+
- **Dark Mode** - Built-in theme support
|
|
31
|
+
|
|
32
|
+
## Tech Stack
|
|
33
|
+
|
|
34
|
+
- **Framework:** Next.js 15
|
|
35
|
+
- **Language:** TypeScript
|
|
36
|
+
- **Styling:** Tailwind CSS
|
|
37
|
+
- **Auth:** Supabase
|
|
38
|
+
- **UI Components:** @digilogiclabs/saas-factory-ui
|
|
39
|
+
- **Hooks:** @digilogiclabs/app-sdk
|
|
40
|
+
|
|
41
|
+
## Project Structure
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
src/
|
|
45
|
+
├── app/ # Next.js App Router pages
|
|
46
|
+
│ ├── dashboard/ # Protected dashboard
|
|
47
|
+
│ ├── login/ # Authentication
|
|
48
|
+
│ └── signup/ # User registration
|
|
49
|
+
├── components/ # React components
|
|
50
|
+
│ └── providers/ # Context providers
|
|
51
|
+
└── lib/ # Utilities and helpers
|
|
52
|
+
└── supabase/ # Supabase client setup
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Deployment
|
|
56
|
+
|
|
57
|
+
Deploy to Vercel with one click:
|
|
58
|
+
|
|
59
|
+
[](https://vercel.com/new)
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT - Built with DLL Platform
|
|
@@ -0,0 +1,53 @@
|
|
|
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) {
|
|
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
|
+
) {
|
|
41
|
+
const url = request.nextUrl.clone()
|
|
42
|
+
url.pathname = '/login'
|
|
43
|
+
return NextResponse.redirect(url)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return supabaseResponse
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const config = {
|
|
50
|
+
matcher: [
|
|
51
|
+
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)',
|
|
52
|
+
],
|
|
53
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "{{description}} - Micro SaaS MVP",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"start": "next start",
|
|
10
|
+
"lint": "next lint",
|
|
11
|
+
"type-check": "tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"next": "^15.0.0",
|
|
15
|
+
"react": "^19.0.0",
|
|
16
|
+
"react-dom": "^19.0.0",
|
|
17
|
+
"@digilogiclabs/platform-core": "^1.1.0",
|
|
18
|
+
"@digilogiclabs/app-sdk": "^1.0.0",
|
|
19
|
+
"@digilogiclabs/saas-factory-auth": "^1.0.7",
|
|
20
|
+
"@digilogiclabs/saas-factory-ui": "^1.0.1",
|
|
21
|
+
"tailwindcss": "^4.0.0",
|
|
22
|
+
"clsx": "^2.0.0",
|
|
23
|
+
"class-variance-authority": "^0.7.0",
|
|
24
|
+
"tailwind-merge": "^2.0.0",
|
|
25
|
+
"next-themes": "^0.4.0",
|
|
26
|
+
"lucide-react": "^0.460.0",
|
|
27
|
+
"zod": "^3.22.4"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^5.7.0",
|
|
31
|
+
"@types/node": "^22.0.0",
|
|
32
|
+
"@types/react": "^19.0.0",
|
|
33
|
+
"@types/react-dom": "^19.0.0",
|
|
34
|
+
"eslint": "^9.0.0",
|
|
35
|
+
"eslint-config-next": "^15.0.0",
|
|
36
|
+
"prettier": "^3.4.0"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|