@digilogiclabs/create-saas-app 1.5.3 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +109 -49
  2. package/bin/index.js +1 -1
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/templates/mobile/base/template/App.tsx +113 -23
  5. package/dist/templates/mobile/base/template/package.json +41 -38
  6. package/dist/templates/web/base/template/package.json +2 -2
  7. package/dist/templates/web/base/template/src/app/checkout/page.tsx +99 -8
  8. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
  9. package/dist/templates/web/base/template/src/app/globals.css +97 -0
  10. package/dist/templates/web/base/template/src/app/login/page.tsx +36 -8
  11. package/dist/templates/web/base/template/src/app/page.tsx +123 -83
  12. package/dist/templates/web/base/template/src/app/signup/page.tsx +36 -8
  13. package/dist/templates/web/base/template/src/components/shared/header.tsx +49 -30
  14. package/dist/templates/web/ui-auth/template/package.json +3 -3
  15. package/dist/templates/web/ui-auth/template/src/app/page.tsx +203 -61
  16. package/dist/templates/web/ui-auth-payments/template/package.json +3 -3
  17. package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
  18. package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
  19. package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
  20. package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
  21. package/dist/templates/web/ui-auth-payments-audio/template/package.json +3 -3
  22. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
  23. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
  24. package/dist/templates/web/ui-auth-payments-video/template/package.json +3 -3
  25. package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
  26. package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
  27. package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
  28. package/dist/templates/web/ui-only/template/package.json +1 -1
  29. package/package.json +106 -106
  30. package/src/templates/mobile/base/template/App.tsx +113 -23
  31. package/src/templates/mobile/base/template/package.json +41 -38
  32. package/src/templates/web/base/template/package.json +2 -2
  33. package/src/templates/web/base/template/src/app/checkout/page.tsx +99 -8
  34. package/src/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
  35. package/src/templates/web/base/template/src/app/globals.css +97 -0
  36. package/src/templates/web/base/template/src/app/login/page.tsx +36 -8
  37. package/src/templates/web/base/template/src/app/page.tsx +123 -83
  38. package/src/templates/web/base/template/src/app/signup/page.tsx +36 -8
  39. package/src/templates/web/base/template/src/components/shared/header.tsx +49 -30
  40. package/src/templates/web/ui-auth/template/package.json +3 -3
  41. package/src/templates/web/ui-auth/template/src/app/page.tsx +203 -61
  42. package/src/templates/web/ui-auth-payments/template/package.json +3 -3
  43. package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
  44. package/src/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
  45. package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
  46. package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
  47. package/src/templates/web/ui-auth-payments-audio/template/package.json +3 -3
  48. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
  49. package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
  50. package/src/templates/web/ui-auth-payments-video/template/package.json +3 -3
  51. package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
  52. package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
  53. package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
  54. package/src/templates/web/ui-only/template/package.json +1 -1
  55. package/dist/index.js +0 -1173
  56. package/dist/index.js.map +0 -1
@@ -5,97 +5,136 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
5
5
  import { Badge } from '@/components/ui/badge'
6
6
  import { ArrowRight, Zap, Shield, Rocket, LogOut } from 'lucide-react'
7
7
  import { useAuth } from '@digilogiclabs/saas-factory-auth'
8
+ import {
9
+ MobileHero,
10
+ LazyImage,
11
+ ProgressiveImage,
12
+ NetworkAwareContent,
13
+ PageTransition,
14
+ ResponsiveGrid,
15
+ MobileContainer
16
+ } from '@digilogiclabs/saas-factory-ui'
8
17
  import Link from 'next/link'
9
18
 
10
19
  export default function Home() {
11
20
  const { user, signOut } = useAuth()
12
21
 
13
22
  return (
14
- <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
15
- <div className="container mx-auto px-4 py-16">
23
+ <PageTransition type="fade" duration={300}>
24
+ <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
25
+ <MobileContainer className="py-16">
16
26
  {/* Hero Section */}
17
- <div className="text-center mb-16">
18
- <Badge variant="secondary" className="mb-4">
19
- Built with Digi Logic Labs
20
- </Badge>
21
- <h1 className="text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6">
22
- Welcome to{' '}
23
- <span className="text-blue-600 dark:text-blue-400">{{titleCaseName}}</span>
24
- </h1>
25
- <p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl mx-auto">
26
- {{description}}. Get started by editing{' '}
27
- <code className="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-sm">
28
- src/app/page.tsx
29
- </code>
30
- </p>
31
- <div className="flex flex-col sm:flex-row gap-4 justify-center">
32
- {!user ? (
33
- <>
34
- <Button size="lg" className="text-lg px-8" asChild>
35
- <Link href="/signup">
36
- Get Started
37
- <ArrowRight className="ml-2 h-5 w-5" />
38
- </Link>
39
- </Button>
40
- <Button variant="outline" size="lg" className="text-lg px-8" asChild>
41
- <Link href="/login">Learn More</Link>
42
- </Button>
43
- </>
44
- ) : (
45
- <>
46
- <Button size="lg" className="text-lg px-8" asChild>
47
- <Link href="/dashboard">
48
- Go to Dashboard
49
- <ArrowRight className="ml-2 h-5 w-5" />
50
- </Link>
51
- </Button>
52
- <Button variant="outline" size="lg" className="text-lg px-8" onClick={signOut}>
53
- <LogOut className="mr-2 h-5 w-5" />
54
- Sign Out
55
- </Button>
56
- </>
57
- )}
58
- </div>
59
- </div>
27
+ <MobileHero
28
+ badge={{
29
+ text: "Built with Digi Logic Labs",
30
+ variant: "secondary"
31
+ }}
32
+ title={{
33
+ text: "Welcome to {{titleCaseName}}",
34
+ highlight: "{{titleCaseName}}",
35
+ size: "xl"
36
+ }}
37
+ description="{{description}}. Get started by editing src/app/page.tsx"
38
+ actions={!user ? [
39
+ {
40
+ label: "Get Started",
41
+ href: "/signup",
42
+ icon: ArrowRight,
43
+ variant: "default",
44
+ size: "lg"
45
+ },
46
+ {
47
+ label: "Learn More",
48
+ href: "/login",
49
+ variant: "outline",
50
+ size: "lg"
51
+ }
52
+ ] : [
53
+ {
54
+ label: "Go to Dashboard",
55
+ href: "/dashboard",
56
+ icon: ArrowRight,
57
+ variant: "default",
58
+ size: "lg"
59
+ },
60
+ {
61
+ label: "Sign Out",
62
+ onClick: signOut,
63
+ icon: LogOut,
64
+ variant: "outline",
65
+ size: "lg"
66
+ }
67
+ ]}
68
+ className="text-center mb-16"
69
+ />
60
70
 
61
71
  {/* Features Grid */}
62
- <div className="grid md:grid-cols-3 gap-8 mb-16">
63
- <Card className="text-center">
64
- <CardHeader>
65
- <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
66
- <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
67
- </div>
68
- <CardTitle>Lightning Fast</CardTitle>
69
- <CardDescription>
70
- Built with Next.js 14 and optimized for performance
71
- </CardDescription>
72
- </CardHeader>
73
- </Card>
72
+ <NetworkAwareContent
73
+ showOnSlow={
74
+ <ResponsiveGrid columns={{ base: 1, md: 2 }} gap="md" className="mb-16">
75
+ <Card className="text-center">
76
+ <CardHeader>
77
+ <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
78
+ <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
79
+ </div>
80
+ <CardTitle>Lightning Fast</CardTitle>
81
+ <CardDescription>
82
+ Built with Next.js 15 and optimized for performance
83
+ </CardDescription>
84
+ </CardHeader>
85
+ </Card>
86
+ <Card className="text-center">
87
+ <CardHeader>
88
+ <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
89
+ <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
90
+ </div>
91
+ <CardTitle>Secure by Default</CardTitle>
92
+ <CardDescription>
93
+ {{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}} authentication and security best practices
94
+ </CardDescription>
95
+ </CardHeader>
96
+ </Card>
97
+ </ResponsiveGrid>
98
+ }
99
+ >
100
+ <ResponsiveGrid columns={{ base: 1, md: 3 }} gap="lg" className="mb-16">
101
+ <Card className="text-center">
102
+ <CardHeader>
103
+ <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
104
+ <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
105
+ </div>
106
+ <CardTitle>Lightning Fast</CardTitle>
107
+ <CardDescription>
108
+ Built with Next.js 15 and optimized for performance
109
+ </CardDescription>
110
+ </CardHeader>
111
+ </Card>
74
112
 
75
- <Card className="text-center">
76
- <CardHeader>
77
- <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
78
- <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
79
- </div>
80
- <CardTitle>Secure by Default</CardTitle>
81
- <CardDescription>
82
- {{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}} authentication and security best practices
83
- </CardDescription>
84
- </CardHeader>
85
- </Card>
113
+ <Card className="text-center">
114
+ <CardHeader>
115
+ <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
116
+ <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
117
+ </div>
118
+ <CardTitle>Secure by Default</CardTitle>
119
+ <CardDescription>
120
+ {{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}} authentication and security best practices
121
+ </CardDescription>
122
+ </CardHeader>
123
+ </Card>
86
124
 
87
- <Card className="text-center">
88
- <CardHeader>
89
- <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
90
- <Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
91
- </div>
92
- <CardTitle>Ready to Scale</CardTitle>
93
- <CardDescription>
94
- Production-ready with TypeScript, Tailwind CSS, and modern tooling
95
- </CardDescription>
96
- </CardHeader>
97
- </Card>
98
- </div>
125
+ <Card className="text-center">
126
+ <CardHeader>
127
+ <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
128
+ <Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
129
+ </div>
130
+ <CardTitle>Ready to Scale</CardTitle>
131
+ <CardDescription>
132
+ Production-ready with TypeScript, Tailwind CSS, and modern tooling
133
+ </CardDescription>
134
+ </CardHeader>
135
+ </Card>
136
+ </ResponsiveGrid>
137
+ </NetworkAwareContent>
99
138
 
100
139
  {/* Tech Stack */}
101
140
  <Card className="max-w-4xl mx-auto">
@@ -108,7 +147,7 @@ export default function Home() {
108
147
  <CardContent>
109
148
  <div className="grid grid-cols-2 md:grid-cols-4 gap-4 text-center">
110
149
  <div className="p-4">
111
- <div className="font-semibold">Next.js 14</div>
150
+ <div className="font-semibold">Next.js 15</div>
112
151
  <div className="text-sm text-gray-600 dark:text-gray-400">React Framework</div>
113
152
  </div>
114
153
  <div className="p-4">
@@ -126,7 +165,8 @@ export default function Home() {
126
165
  </div>
127
166
  </CardContent>
128
167
  </Card>
129
- </div>
130
- </main>
168
+ </MobileContainer>
169
+ </main>
170
+ </PageTransition>
131
171
  )
132
172
  }
@@ -1,6 +1,12 @@
1
1
  'use client';
2
2
 
3
- import { SignupForm } from '@digilogiclabs/saas-factory-ui';
3
+ import {
4
+ SignupForm,
5
+ PageTransition,
6
+ MobileContainer,
7
+ NetworkAwareContent,
8
+ OfflineWrapper
9
+ } from '@digilogiclabs/saas-factory-ui';
4
10
  import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
5
11
  import { createBrowserClient } from '@supabase/ssr';
6
12
  import React from 'react';
@@ -28,12 +34,34 @@ export default function SignupPage() {
28
34
  };
29
35
 
30
36
  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>
37
+ <PageTransition type="slide" direction="horizontal" duration={300}>
38
+ <OfflineWrapper
39
+ cacheStrategy="network-first"
40
+ showOfflineIndicator={true}
41
+ >
42
+ <NetworkAwareContent
43
+ showOnOffline={
44
+ <div className="flex items-center justify-center min-h-screen bg-gray-100">
45
+ <div className="text-center p-6">
46
+ <h2 className="text-xl font-semibold mb-2">You're offline</h2>
47
+ <p className="text-gray-600">Please check your connection to sign up.</p>
48
+ </div>
49
+ </div>
50
+ }
51
+ >
52
+ <div className="flex items-center justify-center min-h-screen bg-gray-100">
53
+ <MobileContainer className="w-full max-w-md">
54
+ <SignupForm
55
+ onSubmit={handleSignup}
56
+ onGoogleSignIn={handleGoogleSignup}
57
+ authProvider={AuthProvider.SUPABASE}
58
+ mobileOptimized={true}
59
+ touchFriendly={true}
60
+ />
61
+ </MobileContainer>
62
+ </div>
63
+ </NetworkAwareContent>
64
+ </OfflineWrapper>
65
+ </PageTransition>
38
66
  );
39
67
  }
@@ -5,40 +5,59 @@ import Link from 'next/link';
5
5
  import { useAuth } from '@digilogiclabs/saas-factory-auth';
6
6
  import { Button } from '@/components/ui/button';
7
7
  import { ThemeToggle } from '@/components/ui/theme-toggle';
8
- import { LogOut } from 'lucide-react';
8
+ import { ResponsiveHeader, MobileNavigation } from '@digilogiclabs/saas-factory-ui';
9
+ import { LogOut, Menu, User, Settings } from 'lucide-react';
9
10
 
10
11
  export function Header() {
11
12
  const { user, signOut } = useAuth();
12
13
 
14
+ const navigationItems = [
15
+ {
16
+ label: 'Dashboard',
17
+ href: '/dashboard',
18
+ icon: User,
19
+ protected: true
20
+ },
21
+ {
22
+ label: 'Settings',
23
+ href: '/settings',
24
+ icon: Settings,
25
+ protected: true
26
+ }
27
+ ];
28
+
29
+ const authActions = user ? [
30
+ {
31
+ label: 'Sign Out',
32
+ icon: LogOut,
33
+ onClick: signOut,
34
+ variant: 'ghost' as const
35
+ }
36
+ ] : [
37
+ {
38
+ label: 'Login',
39
+ href: '/login',
40
+ variant: 'ghost' as const
41
+ },
42
+ {
43
+ label: 'Sign Up',
44
+ href: '/signup',
45
+ variant: 'default' as const
46
+ }
47
+ ];
48
+
13
49
  return (
14
- <header className="bg-white dark:bg-gray-800 shadow-md">
15
- <div className="container mx-auto px-4 py-4 flex justify-between items-center">
16
- <Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
17
- {{titleCaseName}}
18
- </Link>
19
- <nav className="flex items-center gap-4">
20
- <ThemeToggle />
21
- {user ? (
22
- <>
23
- <Link href="/dashboard" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
24
- Dashboard
25
- </Link>
26
- <Button variant="ghost" size="icon" onClick={signOut}>
27
- <LogOut className="h-5 w-5" />
28
- </Button>
29
- </>
30
- ) : (
31
- <>
32
- <Link href="/login" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
33
- Login
34
- </Link>
35
- <Button asChild>
36
- <Link href="/signup">Sign Up</Link>
37
- </Button>
38
- </>
39
- )}
40
- </nav>
41
- </div>
42
- </header>
50
+ <ResponsiveHeader
51
+ logo={{
52
+ text: '{{titleCaseName}}',
53
+ href: '/'
54
+ }}
55
+ navigationItems={navigationItems}
56
+ actions={authActions}
57
+ showThemeToggle={true}
58
+ user={user}
59
+ mobileBreakpoint="md"
60
+ className="bg-white dark:bg-gray-800 shadow-md"
61
+ />
43
62
  );
44
63
  }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "{{packageName}}",
3
3
  "version": "0.1.0",
4
- "description": "{{description}} (with UI Package v0.11.1 + Auth v1.0.0)",
4
+ "description": "{{description}} (with UI Package v0.13.0 + Auth v1.0.0)",
5
5
  "private": true,
6
6
  "scripts": {
7
- "dev": "next dev --turbo",
7
+ "dev": "next dev",
8
8
  "build": "next build",
9
9
  "start": "next start",
10
10
  "lint": "next lint",
@@ -17,7 +17,7 @@
17
17
  "next": "^15.0.0",
18
18
  "react": "^19.0.0",
19
19
  "react-dom": "^19.0.0",
20
- "@digilogiclabs/saas-factory-ui": "^0.11.1",
20
+ "@digilogiclabs/saas-factory-ui": "^0.13.0",
21
21
  "@digilogiclabs/saas-factory-auth": "^1.0.0",
22
22
  "tailwindcss": "^3.3.0",
23
23
  "autoprefixer": "^10.4.16",