@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
@@ -2,12 +2,21 @@
2
2
 
3
3
  import React from 'react';
4
4
  import Link from 'next/link';
5
- import { LogOut, CreditCard } from 'lucide-react';
5
+ import { LogOut, CreditCard, User, Settings, Home, Video, Film, Play } from 'lucide-react';
6
6
  import { useAuth } from '@digilogiclabs/saas-factory-auth';
7
- import { ThemeToggle } from '../ui/theme-toggle';
7
+ import {
8
+ ResponsiveHeader,
9
+ MobileNavigation,
10
+ HamburgerIcon,
11
+ useNetworkInfo,
12
+ useOfflineState
13
+ } from '@digilogiclabs/saas-factory-ui';
14
+ import { ThemeToggle } from '@/components/ui/theme-toggle';
8
15
 
9
16
  export function Header() {
10
17
  const { user, signOut } = useAuth();
18
+ const networkInfo = useNetworkInfo();
19
+ const isOnline = useOfflineState();
11
20
 
12
21
  const handleSignOut = async () => {
13
22
  try {
@@ -17,46 +26,129 @@ export function Header() {
17
26
  }
18
27
  };
19
28
 
29
+ const navigationItems = [
30
+ {
31
+ label: 'Home',
32
+ href: '/',
33
+ icon: Home,
34
+ protected: false
35
+ },
36
+ {
37
+ label: 'Video Library',
38
+ href: '/videos',
39
+ icon: Video,
40
+ protected: true
41
+ },
42
+ {
43
+ label: 'Watch Later',
44
+ href: '/watchlater',
45
+ icon: Film,
46
+ protected: true
47
+ },
48
+ {
49
+ label: 'Dashboard',
50
+ href: '/dashboard',
51
+ icon: User,
52
+ protected: true
53
+ },
54
+ {
55
+ label: 'Billing',
56
+ href: '/billing',
57
+ icon: CreditCard,
58
+ protected: true
59
+ },
60
+ {
61
+ label: 'Checkout',
62
+ href: '/checkout',
63
+ icon: CreditCard,
64
+ protected: false
65
+ },
66
+ {
67
+ label: 'Settings',
68
+ href: '/settings',
69
+ icon: Settings,
70
+ protected: true
71
+ }
72
+ ];
73
+
74
+ const authActions = user ? [
75
+ {
76
+ label: 'Sign Out',
77
+ icon: LogOut,
78
+ onClick: handleSignOut,
79
+ variant: 'ghost' as const
80
+ }
81
+ ] : [
82
+ {
83
+ label: 'Login',
84
+ href: '/login',
85
+ variant: 'ghost' as const
86
+ },
87
+ {
88
+ label: 'Sign Up',
89
+ href: '/signup',
90
+ variant: 'default' as const
91
+ }
92
+ ];
93
+
20
94
  return (
21
- <header className="bg-white dark:bg-gray-800 shadow-md">
22
- <div className="container mx-auto px-4 py-4 flex justify-between items-center">
23
- <Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
24
- {{titleCaseName}}
25
- </Link>
26
- <nav className="flex items-center gap-4">
27
- <ThemeToggle />
28
- {user ? (
29
- <>
30
- <Link href="/dashboard" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
31
- Dashboard
32
- </Link>
33
- <Link href="/billing" className="flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
34
- <CreditCard className="h-4 w-4" />
35
- Billing
36
- </Link>
37
- <button
38
- onClick={handleSignOut}
39
- className="p-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"
40
- >
41
- <LogOut className="h-5 w-5" />
42
- </button>
43
- </>
44
- ) : (
45
- <>
46
- <Link href="/login" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
47
- Login
48
- </Link>
49
- <Link
50
- href="/signup"
51
- className="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
52
- >
53
- Sign Up
54
- </Link>
55
- </>
56
- )}
57
- </nav>
58
- </div>
59
- </header>
95
+ <>
96
+ {/* Network Status Banner */}
97
+ {!isOnline && (
98
+ <div className="bg-red-500 text-white text-center py-2 text-sm animate-pulse">
99
+ <span>📹 Offline - Cached videos only</span>
100
+ </div>
101
+ )}
102
+
103
+ {/* Video Quality Banner */}
104
+ {isOnline && networkInfo?.effectiveType === '2g' && (
105
+ <div className="bg-yellow-500 text-white text-center py-2 text-sm">
106
+ <div className="animate-marquee whitespace-nowrap">
107
+ 🐌 Slow connection - Video quality reduced to 360p • Buffering optimized • Download recommended for smooth playback
108
+ </div>
109
+ </div>
110
+ )}
111
+
112
+ {/* HD Video Quality Banner */}
113
+ {isOnline && (networkInfo?.effectiveType === '4g' || networkInfo?.effectiveType === '5g') && (
114
+ <div className="bg-green-500 text-white text-center py-2 text-sm">
115
+ <div className="animate-marquee whitespace-nowrap">
116
+ 🎬 High-speed connection - HD/4K video quality enabled • Instant streaming • Auto-quality adjustment active
117
+ </div>
118
+ </div>
119
+ )}
120
+
121
+ <ResponsiveHeader
122
+ logo={{
123
+ text: '{{titleCaseName}}',
124
+ href: '/',
125
+ className: 'text-2xl font-bold flex items-center gap-2',
126
+ icon: <Play className="w-6 h-6" />
127
+ }}
128
+ navigationItems={navigationItems}
129
+ actions={authActions}
130
+ showThemeToggle={true}
131
+ user={user}
132
+ mobileBreakpoint="md"
133
+ className="bg-white dark:bg-gray-800 shadow-md"
134
+ hamburgerIcon={
135
+ <HamburgerIcon
136
+ className="w-6 h-6 text-gray-600 dark:text-gray-300"
137
+ animated={true}
138
+ hapticFeedback={true}
139
+ />
140
+ }
141
+ networkStatus={{
142
+ isOnline,
143
+ connectionType: networkInfo?.effectiveType,
144
+ showIndicator: true,
145
+ customLabels: {
146
+ online: 'Streaming Ready',
147
+ offline: 'Offline Mode'
148
+ }
149
+ }}
150
+ />
151
+ </>
60
152
  );
61
153
  }
62
154
 
@@ -4,7 +4,7 @@
4
4
  "description": "{{description}} (with UI Package v0.11.1)",
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",