@digilogiclabs/create-saas-app 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/bin/index.js +36 -3
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/index.js +390 -20094
  5. package/dist/index.js.map +1 -1
  6. package/dist/mobile/base/template/.env.example +15 -0
  7. package/dist/templates/mobile/base/template/.env.example +15 -0
  8. package/dist/templates/mobile/base/template/App.tsx +88 -0
  9. package/dist/templates/mobile/base/template/app/(auth)/login.tsx +44 -0
  10. package/dist/templates/mobile/base/template/app/(auth)/signup.tsx +43 -0
  11. package/dist/templates/mobile/base/template/app/checkout.tsx +20 -0
  12. package/dist/templates/mobile/base/template/package.json +38 -0
  13. package/dist/templates/shared/auth/firebase/web/config.ts +23 -0
  14. package/dist/templates/shared/auth/supabase/web/config.ts +8 -0
  15. package/dist/templates/web/base/template/.env.example +15 -0
  16. package/dist/templates/web/base/template/.eslintrc.js +8 -0
  17. package/dist/templates/web/base/template/README.md +68 -0
  18. package/dist/templates/web/base/template/next.config.js +15 -0
  19. package/dist/templates/web/base/template/package.json +48 -0
  20. package/dist/templates/web/base/template/postcss.config.js +7 -0
  21. package/dist/templates/web/base/template/src/app/auth/callback/route.ts +18 -0
  22. package/dist/templates/web/base/template/src/app/checkout/page.tsx +28 -0
  23. package/dist/templates/web/base/template/src/app/globals.css +60 -0
  24. package/dist/templates/web/base/template/src/app/layout.tsx +29 -0
  25. package/dist/templates/web/base/template/src/app/login/page.tsx +39 -0
  26. package/dist/templates/web/base/template/src/app/page.tsx +132 -0
  27. package/dist/templates/web/base/template/src/app/signup/page.tsx +39 -0
  28. package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +29 -0
  29. package/dist/templates/web/base/template/src/components/shared/header.tsx +42 -0
  30. package/dist/templates/web/base/template/src/components/ui/badge.tsx +36 -0
  31. package/dist/templates/web/base/template/src/components/ui/button.tsx +56 -0
  32. package/dist/templates/web/base/template/src/components/ui/card.tsx +71 -0
  33. package/dist/templates/web/base/template/src/lib/utils.ts +7 -0
  34. package/dist/templates/web/base/template/tailwind.config.js +77 -0
  35. package/dist/templates/web/base/template/tsconfig.json +33 -0
  36. package/dist/templates/web/base/template.backup/.env.example +15 -0
  37. package/dist/templates/web/base/template.backup.20250817/.env.example +15 -0
  38. package/dist/templates/web/ui-package-test/template/package.json +42 -0
  39. package/dist/templates/web/ui-package-test/template/src/app/page.tsx +106 -0
  40. package/dist/templates/web/ui-package-test/template/tsconfig.json +41 -0
  41. package/dist/templates/web/web-ui-package/template/.env.example +15 -0
  42. package/dist/templates/web/web-ui-package/template/.eslintrc.js +8 -0
  43. package/dist/templates/web/web-ui-package/template/README.md +68 -0
  44. package/dist/templates/web/web-ui-package/template/next.config.js +15 -0
  45. package/dist/templates/web/web-ui-package/template/package.json +39 -0
  46. package/dist/templates/web/web-ui-package/template/postcss.config.js +7 -0
  47. package/dist/templates/web/web-ui-package/template/src/app/auth/callback/route.ts +18 -0
  48. package/dist/templates/web/web-ui-package/template/src/app/checkout/page.tsx +28 -0
  49. package/dist/templates/web/web-ui-package/template/src/app/globals.css +42 -0
  50. package/dist/templates/web/web-ui-package/template/src/app/layout.tsx +29 -0
  51. package/dist/templates/web/web-ui-package/template/src/app/login/page.tsx +39 -0
  52. package/dist/templates/web/web-ui-package/template/src/app/page.tsx +91 -0
  53. package/dist/templates/web/web-ui-package/template/src/app/signup/page.tsx +39 -0
  54. package/dist/templates/web/web-ui-package/template/src/components/providers/app-providers.tsx +29 -0
  55. package/dist/templates/web/web-ui-package/template/src/components/shared/header.tsx +42 -0
  56. package/dist/templates/web/web-ui-package/template/src/components/ui/badge.tsx +36 -0
  57. package/dist/templates/web/web-ui-package/template/src/lib/utils.ts +7 -0
  58. package/dist/templates/web/web-ui-package/template/tailwind.config.js +77 -0
  59. package/dist/templates/web/web-ui-package/template/tsconfig.json +33 -0
  60. package/dist/templates/web/web-ui-package/template.backup/.env.example +15 -0
  61. package/dist/templates/web/web-ui-package/template.backup.20250817/.env.example +15 -0
  62. package/dist/web/base/template/.env.example +15 -0
  63. package/dist/web/base/template/.eslintrc.js +8 -0
  64. package/dist/web/base/template.backup/.env.example +15 -0
  65. package/dist/web/base/template.backup.20250817/.env.example +15 -0
  66. package/dist/web/ui-package-test/template/.env.example +15 -0
  67. package/dist/web/ui-package-test/template/.eslintrc.js +8 -0
  68. package/dist/web/ui-package-test/template.backup/.env.example +15 -0
  69. package/dist/web/ui-package-test/template.backup.20250817/.env.example +15 -0
  70. package/dist/web/web-ui-package/template/.env.example +15 -0
  71. package/dist/web/web-ui-package/template/.eslintrc.js +8 -0
  72. package/dist/web/web-ui-package/template.backup/.env.example +15 -0
  73. package/dist/web/web-ui-package/template.backup.20250817/.env.example +15 -0
  74. package/package.json +105 -105
  75. package/src/templates/mobile/base/template/.env.example +15 -0
  76. package/src/templates/mobile/base/template/App.tsx +51 -10
  77. package/src/templates/mobile/base/template/app/(auth)/login.tsx +44 -0
  78. package/src/templates/mobile/base/template/app/(auth)/signup.tsx +43 -0
  79. package/src/templates/mobile/base/template/app/checkout.tsx +20 -0
  80. package/src/templates/mobile/base/template/package.json +6 -6
  81. package/src/templates/shared/auth/firebase/web/config.ts +23 -24
  82. package/src/templates/shared/auth/supabase/web/config.ts +8 -9
  83. package/src/templates/web/base/template/.env.example +12 -31
  84. package/src/templates/web/base/template/package.json +6 -6
  85. package/src/templates/web/base/template/src/app/auth/callback/route.ts +18 -0
  86. package/src/templates/web/base/template/src/app/checkout/page.tsx +28 -0
  87. package/src/templates/web/base/template/src/app/layout.tsx +2 -1
  88. package/src/templates/web/base/template/src/app/login/page.tsx +39 -0
  89. package/src/templates/web/base/template/src/app/page.tsx +33 -9
  90. package/src/templates/web/base/template/src/app/signup/page.tsx +39 -0
  91. package/src/templates/web/base/template/src/components/providers/app-providers.tsx +17 -9
  92. package/src/templates/web/base/template/src/components/shared/header.tsx +42 -0
  93. package/src/templates/web/base/template/tailwind.config.js +1 -1
  94. package/src/templates/web/base/template.backup/.env.example +15 -0
  95. package/src/templates/web/base/template.backup.20250817/.env.example +15 -0
  96. package/src/templates/web/ui-package-test/template/next-env.d.ts +5 -0
  97. package/src/templates/web/ui-package-test/template/package.json +42 -0
  98. package/src/templates/web/ui-package-test/template/src/app/page.tsx +106 -0
  99. package/src/templates/web/ui-package-test/template/tsconfig.json +41 -0
  100. package/src/templates/web/web-ui-package/template/.env.example +15 -0
  101. package/src/templates/web/web-ui-package/template/.eslintrc.js +8 -0
  102. package/src/templates/web/web-ui-package/template/README.md +68 -0
  103. package/src/templates/web/web-ui-package/template/next.config.js +15 -0
  104. package/src/templates/web/web-ui-package/template/package.json +39 -0
  105. package/src/templates/web/web-ui-package/template/postcss.config.js +7 -0
  106. package/src/templates/web/web-ui-package/template/src/app/auth/callback/route.ts +18 -0
  107. package/src/templates/web/web-ui-package/template/src/app/checkout/page.tsx +28 -0
  108. package/src/templates/web/web-ui-package/template/src/app/globals.css +42 -0
  109. package/src/templates/web/web-ui-package/template/src/app/layout.tsx +29 -0
  110. package/src/templates/web/web-ui-package/template/src/app/login/page.tsx +39 -0
  111. package/src/templates/web/web-ui-package/template/src/app/page.tsx +91 -0
  112. package/src/templates/web/web-ui-package/template/src/app/signup/page.tsx +39 -0
  113. package/src/templates/web/web-ui-package/template/src/components/providers/app-providers.tsx +29 -0
  114. package/src/templates/web/web-ui-package/template/src/components/shared/header.tsx +42 -0
  115. package/src/templates/web/web-ui-package/template/src/components/ui/badge.tsx +36 -0
  116. package/src/templates/web/web-ui-package/template/src/lib/utils.ts +7 -0
  117. package/src/templates/web/web-ui-package/template/tailwind.config.js +77 -0
  118. package/src/templates/web/web-ui-package/template/tsconfig.json +33 -0
  119. package/src/templates/web/web-ui-package/template.backup/.env.example +15 -0
  120. package/src/templates/web/web-ui-package/template.backup.20250817/.env.example +15 -0
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+
3
+ import { SignupForm } from '@digilogiclabs/saas-factory-ui';
4
+ import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
5
+ import { createBrowserClient } from '@supabase/ssr';
6
+ import React from 'react';
7
+
8
+ export default function SignupPage() {
9
+ const supabase = createBrowserClient(
10
+ process.env.NEXT_PUBLIC_SUPABASE_URL!,
11
+ process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
12
+ );
13
+
14
+ const handleSignup = async (values: any) => {
15
+ await supabase.auth.signUp({
16
+ email: values.email,
17
+ password: values.password,
18
+ });
19
+ };
20
+
21
+ const handleGoogleSignup = async () => {
22
+ await supabase.auth.signInWithOAuth({
23
+ provider: 'google',
24
+ options: {
25
+ redirectTo: `${location.origin}/auth/callback`,
26
+ },
27
+ });
28
+ };
29
+
30
+ return (
31
+ <div className="flex items-center justify-center min-h-screen bg-gray-100">
32
+ <SignupForm
33
+ onSubmit={handleSignup}
34
+ onGoogleSignIn={handleGoogleSignup}
35
+ authProvider={AuthProvider.SUPABASE}
36
+ />
37
+ </div>
38
+ );
39
+ }
@@ -0,0 +1,29 @@
1
+ 'use client'
2
+
3
+ import React from 'react'
4
+ import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
5
+ import { ThemeProvider } from 'next-themes'
6
+ import { StripeProvider } from '@digilogiclabs/saas-factory-payments'
7
+
8
+ interface AppProvidersProps {
9
+ children: React.ReactNode
10
+ }
11
+
12
+ export function AppProviders({ children }: AppProvidersProps) {
13
+ return (
14
+ <AuthProvider provider="supabase">
15
+ <StripeProvider
16
+ stripeKey={process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!}
17
+ >
18
+ <ThemeProvider
19
+ attribute="class"
20
+ defaultTheme="system"
21
+ enableSystem
22
+ disableTransitionOnChange
23
+ >
24
+ {children}
25
+ </ThemeProvider>
26
+ </StripeProvider>
27
+ </AuthProvider>
28
+ )
29
+ }
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import React from 'react';
4
+ import Link from 'next/link';
5
+ import { useAuth } from '@digilogiclabs/saas-factory-auth';
6
+ import { Button } from '@/components/ui/button';
7
+ import { LogOut } from 'lucide-react';
8
+
9
+ export function Header() {
10
+ const { user, signOut } = useAuth();
11
+
12
+ return (
13
+ <header className="bg-white dark:bg-gray-800 shadow-md">
14
+ <div className="container mx-auto px-4 py-4 flex justify-between items-center">
15
+ <Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
16
+ {{titleCaseName}}
17
+ </Link>
18
+ <nav className="flex items-center gap-4">
19
+ {user ? (
20
+ <>
21
+ <Link href="/dashboard" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
22
+ Dashboard
23
+ </Link>
24
+ <Button variant="ghost" size="icon" onClick={signOut}>
25
+ <LogOut className="h-5 w-5" />
26
+ </Button>
27
+ </>
28
+ ) : (
29
+ <>
30
+ <Link href="/login" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
31
+ Login
32
+ </Link>
33
+ <Button asChild>
34
+ <Link href="/signup">Sign Up</Link>
35
+ </Button>
36
+ </>
37
+ )}
38
+ </nav>
39
+ </div>
40
+ </header>
41
+ );
42
+ }
@@ -0,0 +1,36 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cn } from "@/lib/utils"
4
+
5
+ const badgeVariants = cva(
6
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default:
11
+ "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
12
+ secondary:
13
+ "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
+ destructive:
15
+ "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
16
+ outline: "text-foreground",
17
+ },
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ },
22
+ }
23
+ )
24
+
25
+ export interface BadgeProps
26
+ extends React.HTMLAttributes<HTMLDivElement>,
27
+ VariantProps<typeof badgeVariants> {}
28
+
29
+ function Badge({ className, variant, ...props }: BadgeProps) {
30
+ return (
31
+ <div className={cn(badgeVariants({ variant }), className)} {...props} />
32
+ )
33
+ }
34
+
35
+ export { Badge, badgeVariants }
36
+
@@ -0,0 +1,7 @@
1
+ import { type ClassValue, clsx } from "clsx"
2
+ import { twMerge } from "tailwind-merge"
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
7
+
@@ -0,0 +1,77 @@
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
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": ["dom", "dom.iterable", "es6"],
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
+ "baseUrl": ".",
22
+ "paths": {
23
+ "@/*": ["./src/*"],
24
+ "@/components/*": ["./src/components/*"],
25
+ "@/lib/*": ["./src/lib/*"],
26
+ "@/hooks/*": ["./src/hooks/*"],
27
+ "@/types/*": ["./src/types/*"]
28
+ }
29
+ },
30
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
31
+ "exclude": ["node_modules"]
32
+ }
33
+
@@ -0,0 +1,15 @@
1
+ # Auth Configuration
2
+ NEXT_PUBLIC_AUTH_PROVIDER=supabase|firebase
3
+
4
+ # Supabase
5
+ NEXT_PUBLIC_SUPABASE_URL=
6
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=
7
+
8
+ # Firebase
9
+ NEXT_PUBLIC_FIREBASE_API_KEY=
10
+ NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
11
+ NEXT_PUBLIC_FIREBASE_PROJECT_ID=
12
+
13
+ # Payments
14
+ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
15
+ STRIPE_SECRET_KEY=
@@ -0,0 +1,15 @@
1
+ # Auth Configuration
2
+ NEXT_PUBLIC_AUTH_PROVIDER=supabase|firebase
3
+
4
+ # Supabase
5
+ NEXT_PUBLIC_SUPABASE_URL=
6
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=
7
+
8
+ # Firebase
9
+ NEXT_PUBLIC_FIREBASE_API_KEY=
10
+ NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
11
+ NEXT_PUBLIC_FIREBASE_PROJECT_ID=
12
+
13
+ # Payments
14
+ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
15
+ STRIPE_SECRET_KEY=