@digilogiclabs/create-saas-app 1.5.4 → 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 (54) 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 +5 -2
  6. package/dist/templates/web/base/template/package.json +1 -1
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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/package.json +106 -106
  29. package/src/templates/mobile/base/template/App.tsx +113 -23
  30. package/src/templates/mobile/base/template/package.json +5 -2
  31. package/src/templates/web/base/template/package.json +1 -1
  32. package/src/templates/web/base/template/src/app/checkout/page.tsx +99 -8
  33. package/src/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
  34. package/src/templates/web/base/template/src/app/globals.css +97 -0
  35. package/src/templates/web/base/template/src/app/login/page.tsx +36 -8
  36. package/src/templates/web/base/template/src/app/page.tsx +123 -83
  37. package/src/templates/web/base/template/src/app/signup/page.tsx +36 -8
  38. package/src/templates/web/base/template/src/components/shared/header.tsx +49 -30
  39. package/src/templates/web/ui-auth/template/package.json +2 -2
  40. package/src/templates/web/ui-auth/template/src/app/page.tsx +203 -61
  41. package/src/templates/web/ui-auth-payments/template/package.json +2 -2
  42. package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
  43. package/src/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
  44. package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
  45. package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
  46. package/src/templates/web/ui-auth-payments-audio/template/package.json +2 -2
  47. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
  48. package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
  49. package/src/templates/web/ui-auth-payments-video/template/package.json +2 -2
  50. package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
  51. package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
  52. package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
  53. package/dist/index.js +0 -1173
  54. package/dist/index.js.map +0 -1
@@ -1,12 +1,30 @@
1
1
  'use client'
2
2
 
3
- import { Button, Card, AudioPlayer } from '@digilogiclabs/saas-factory-ui'
4
- import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Music } from 'lucide-react'
3
+ import {
4
+ Button,
5
+ Card,
6
+ AudioPlayer,
7
+ PageTransition,
8
+ MobileContainer,
9
+ MobileHero,
10
+ ResponsiveGrid,
11
+ NetworkAwareContent,
12
+ OfflineWrapper,
13
+ SwipeableCard,
14
+ PullToRefresh,
15
+ useNetworkInfo,
16
+ useOfflineState
17
+ } from '@digilogiclabs/saas-factory-ui'
18
+ import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Music, Wifi, WifiOff } from 'lucide-react'
5
19
  import { useAuth } from '@digilogiclabs/saas-factory-auth'
6
20
  import Link from 'next/link'
21
+ import { useState } from 'react'
7
22
 
8
23
  export default function Home() {
9
24
  const { user, signOut, loading } = useAuth()
25
+ const networkInfo = useNetworkInfo()
26
+ const isOnline = useOfflineState()
27
+ const [isRefreshing, setIsRefreshing] = useState(false)
10
28
 
11
29
  const handleSignOut = async () => {
12
30
  try {
@@ -16,11 +34,50 @@ export default function Home() {
16
34
  }
17
35
  }
18
36
 
37
+ const handleRefresh = async () => {
38
+ setIsRefreshing(true)
39
+ // Simulate refresh
40
+ await new Promise(resolve => setTimeout(resolve, 1500))
41
+ setIsRefreshing(false)
42
+ }
43
+
19
44
  return (
20
- <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
21
- <div className="container mx-auto px-4 py-16">
22
- {/* Auth Status Bar */}
23
- <div className="flex justify-end mb-8">
45
+ <PageTransition type="fade" duration={300}>
46
+ <OfflineWrapper
47
+ cacheStrategy="stale-while-revalidate"
48
+ showOfflineIndicator={true}
49
+ backgroundSync={true}
50
+ >
51
+ <PullToRefresh
52
+ onRefresh={handleRefresh}
53
+ threshold={80}
54
+ loadingIndicator="spinner"
55
+ hapticOnTrigger={true}
56
+ networkAware={true}
57
+ >
58
+ <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
59
+ <MobileContainer className="py-16">
60
+ {/* Auth Status Bar with Network Info */}
61
+ <div className="flex flex-col sm:flex-row justify-between items-center mb-8 gap-4">
62
+ <div className="flex items-center gap-2 text-sm">
63
+ {isOnline ? (
64
+ <div className="flex items-center gap-2 text-green-600">
65
+ <Wifi className="w-4 h-4" />
66
+ <span>Online</span>
67
+ {networkInfo?.effectiveType && (
68
+ <span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
69
+ {networkInfo.effectiveType.toUpperCase()}
70
+ </span>
71
+ )}
72
+ </div>
73
+ ) : (
74
+ <div className="flex items-center gap-2 text-red-600">
75
+ <WifiOff className="w-4 h-4" />
76
+ <span>Offline</span>
77
+ </div>
78
+ )}
79
+ </div>
80
+
24
81
  {loading ? (
25
82
  <div className="text-sm text-gray-600">Loading...</div>
26
83
  ) : user ? (
@@ -47,78 +104,157 @@ export default function Home() {
47
104
  </div>
48
105
 
49
106
  {/* Hero Section */}
50
- <div className="text-center mb-16">
51
- <div className="inline-flex items-center px-4 py-2 rounded-full text-sm font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 mb-6">
52
- <CheckCircle className="w-4 h-4 mr-2" />
53
- Audio Player App - UI Package v0.10.0 + Auth v0.4.4 + Payments Integrated Successfully
54
- </div>
55
- <h1 className="text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6">
56
- Welcome to{' '}
57
- <span className="text-blue-600 dark:text-blue-400">{{titleCaseName}}</span>
58
- </h1>
59
- <p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl mx-auto">
60
- {{description}}. This audio streaming app template uses SaaS Factory UI package v0.10.0 with audio player components, authentication v0.4.4 and payments integration.
61
- </p>
62
- <div className="flex flex-col sm:flex-row gap-4 justify-center">
63
- <Link href="/checkout">
64
- <Button size="lg" className="text-lg px-8">
65
- View Pricing
66
- <ArrowRight className="ml-2 h-5 w-5" />
67
- </Button>
68
- </Link>
69
- <Button variant="outline" size="lg" className="text-lg px-8">
70
- Learn More
71
- </Button>
72
- </div>
73
- </div>
107
+ <MobileHero
108
+ badge={{
109
+ text: "Audio Player App - UI Package v0.13.0 + Auth v1.0.0 + Payments Integrated Successfully",
110
+ variant: "secondary",
111
+ icon: CheckCircle
112
+ }}
113
+ title={{
114
+ text: "Welcome to {{titleCaseName}}",
115
+ highlight: "{{titleCaseName}}",
116
+ size: "xl"
117
+ }}
118
+ description="{{description}}. This mobile-optimized audio streaming app template uses SaaS Factory UI package v0.13.0 with touch-friendly audio player components, authentication v1.0.0 and payments integration."
119
+ actions={[
120
+ {
121
+ label: "View Pricing",
122
+ href: "/checkout",
123
+ icon: ArrowRight,
124
+ variant: "default",
125
+ size: "lg"
126
+ },
127
+ {
128
+ label: "Learn More",
129
+ variant: "outline",
130
+ size: "lg"
131
+ }
132
+ ]}
133
+ className="text-center mb-16"
134
+ />
74
135
 
75
136
  {/* Audio Player Showcase */}
76
- <div className="max-w-4xl mx-auto mb-16">
77
- <Card className="p-8">
78
- <div className="text-center mb-8">
79
- <div className="mx-auto w-16 h-16 bg-purple-100 dark:bg-purple-900 rounded-full flex items-center justify-center mb-4">
80
- <Music className="h-8 w-8 text-purple-600 dark:text-purple-400" />
81
- </div>
82
- <h2 className="text-3xl font-bold mb-4">Audio Player Component</h2>
83
- <p className="text-gray-600 dark:text-gray-300">
84
- Experience our feature-rich audio player with playlist support, advanced controls, and cross-platform compatibility
85
- </p>
137
+ <NetworkAwareContent
138
+ showOnSlow={
139
+ <div className="max-w-4xl mx-auto mb-16">
140
+ <Card className="p-6">
141
+ <div className="text-center mb-6">
142
+ <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-full flex items-center justify-center mb-4">
143
+ <Music className="h-6 w-6 text-purple-600 dark:text-purple-400" />
144
+ </div>
145
+ <h2 className="text-xl font-bold mb-2">Mobile Audio Player</h2>
146
+ <p className="text-sm text-gray-600 dark:text-gray-300">
147
+ Optimized for slower connections
148
+ </p>
149
+ </div>
150
+ <AudioPlayer
151
+ playlist={[
152
+ {
153
+ id: '1',
154
+ title: 'Sample Audio Track',
155
+ artist: 'Demo Artist',
156
+ album: 'Demo Album',
157
+ duration: 180,
158
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
159
+ coverArt: 'https://via.placeholder.com/150x150?text=Demo'
160
+ }
161
+ ]}
162
+ mobileOptimized={true}
163
+ touchFriendly={true}
164
+ showMinimalUI={true}
165
+ className="max-w-lg mx-auto"
166
+ />
167
+ </Card>
86
168
  </div>
87
- <AudioPlayer
88
- playlist={[
89
- {
90
- id: '1',
91
- title: 'Sample Audio Track',
92
- artist: 'Demo Artist',
93
- album: 'Demo Album',
94
- duration: 180,
95
- url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
96
- coverArt: 'https://via.placeholder.com/300x300?text=Demo+Track'
97
- },
98
- {
99
- id: '2',
100
- title: 'Another Great Song',
101
- artist: 'Sample Band',
102
- album: 'Greatest Hits',
103
- duration: 210,
104
- url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
105
- coverArt: 'https://via.placeholder.com/300x300?text=Track+2'
106
- }
107
- ]}
108
- className="max-w-2xl mx-auto"
109
- />
110
- </Card>
111
- </div>
169
+ }
170
+ >
171
+ <SwipeableCard
172
+ leftActions={[
173
+ {
174
+ id: 'previous',
175
+ label: 'Previous',
176
+ onAction: () => console.log('Previous track'),
177
+ color: 'blue',
178
+ icon: Music
179
+ }
180
+ ]}
181
+ rightActions={[
182
+ {
183
+ id: 'next',
184
+ label: 'Next',
185
+ onAction: () => console.log('Next track'),
186
+ color: 'green',
187
+ icon: Music
188
+ }
189
+ ]}
190
+ threshold={60}
191
+ hapticFeedback={true}
192
+ showActionLabels={true}
193
+ className="max-w-4xl mx-auto mb-16"
194
+ >
195
+ <Card className="p-8">
196
+ <div className="text-center mb-8">
197
+ <div className="mx-auto w-16 h-16 bg-purple-100 dark:bg-purple-900 rounded-full flex items-center justify-center mb-4">
198
+ <Music className="h-8 w-8 text-purple-600 dark:text-purple-400" />
199
+ </div>
200
+ <h2 className="text-3xl font-bold mb-4">Touch-Optimized Audio Player</h2>
201
+ <p className="text-gray-600 dark:text-gray-300 mb-2">
202
+ Experience our feature-rich audio player with playlist support, touch gestures, and mobile-first design
203
+ </p>
204
+ <p className="text-sm text-gray-500">
205
+ Swipe left/right to change tracks • Pull down to refresh
206
+ </p>
207
+ </div>
208
+ <AudioPlayer
209
+ playlist={[
210
+ {
211
+ id: '1',
212
+ title: 'Sample Audio Track',
213
+ artist: 'Demo Artist',
214
+ album: 'Demo Album',
215
+ duration: 180,
216
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
217
+ coverArt: 'https://via.placeholder.com/300x300?text=Demo+Track'
218
+ },
219
+ {
220
+ id: '2',
221
+ title: 'Another Great Song',
222
+ artist: 'Sample Band',
223
+ album: 'Greatest Hits',
224
+ duration: 210,
225
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
226
+ coverArt: 'https://via.placeholder.com/300x300?text=Track+2'
227
+ },
228
+ {
229
+ id: '3',
230
+ title: 'Mobile Optimized Track',
231
+ artist: 'Touch Artist',
232
+ album: 'Mobile Collection',
233
+ duration: 195,
234
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
235
+ coverArt: 'https://via.placeholder.com/300x300?text=Track+3'
236
+ }
237
+ ]}
238
+ mobileOptimized={true}
239
+ touchFriendly={true}
240
+ hapticFeedback={true}
241
+ offlineSupport={true}
242
+ networkAware={true}
243
+ className="max-w-2xl mx-auto"
244
+ />
245
+ </Card>
246
+ </SwipeableCard>
247
+ </NetworkAwareContent>
112
248
 
113
249
  {/* Component Showcase */}
114
- <div className="grid md:grid-cols-4 gap-8 mb-16">
250
+ <ResponsiveGrid columns={{ base: 1, sm: 2, md: 4 }} gap="lg" className="mb-16">
115
251
  <Card className="text-center p-6">
116
252
  <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
117
253
  <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
118
254
  </div>
119
- <h3 className="text-xl font-semibold mb-2">Audio UI Components</h3>
120
- <p className="text-gray-600 dark:text-gray-300">
121
- Audio Player, Button, and Card components from @digilogiclabs/saas-factory-ui v0.10.0
255
+ <h3 className="text-lg font-semibold mb-2">Mobile Audio UI</h3>
256
+ <p className="text-sm text-gray-600 dark:text-gray-300">
257
+ Touch-friendly Audio Player with haptic feedback from @digilogiclabs/saas-factory-ui v0.13.0
122
258
  </p>
123
259
  </Card>
124
260
 
@@ -126,9 +262,9 @@ export default function Home() {
126
262
  <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
127
263
  <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
128
264
  </div>
129
- <h3 className="text-xl font-semibold mb-2">Authentication</h3>
130
- <p className="text-gray-600 dark:text-gray-300">
131
- Secure user authentication with @digilogiclabs/saas-factory-auth
265
+ <h3 className="text-lg font-semibold mb-2">Cross-Device Auth</h3>
266
+ <p className="text-sm text-gray-600 dark:text-gray-300">
267
+ Secure authentication across all devices with @digilogiclabs/saas-factory-auth v1.0.0
132
268
  </p>
133
269
  </Card>
134
270
 
@@ -136,9 +272,9 @@ export default function Home() {
136
272
  <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
137
273
  <Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
138
274
  </div>
139
- <h3 className="text-xl font-semibold mb-2">TypeScript Ready</h3>
140
- <p className="text-gray-600 dark:text-gray-300">
141
- Full type safety with enhanced component definitions
275
+ <h3 className="text-lg font-semibold mb-2">Performance First</h3>
276
+ <p className="text-sm text-gray-600 dark:text-gray-300">
277
+ Network-aware components with offline support and lazy loading
142
278
  </p>
143
279
  </Card>
144
280
 
@@ -148,12 +284,12 @@ export default function Home() {
148
284
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
149
285
  </svg>
150
286
  </div>
151
- <h3 className="text-xl font-semibold mb-2">Payments Integration</h3>
152
- <p className="text-gray-600 dark:text-gray-300">
153
- Complete payment processing with @digilogiclabs/saas-factory-payments
287
+ <h3 className="text-lg font-semibold mb-2">Mobile Payments</h3>
288
+ <p className="text-sm text-gray-600 dark:text-gray-300">
289
+ Touch-optimized payment flows with @digilogiclabs/saas-factory-payments v1.0.0
154
290
  </p>
155
291
  </Card>
156
- </div>
292
+ </ResponsiveGrid>
157
293
 
158
294
  {/* Button Variants Showcase */}
159
295
  <Card className="max-w-4xl mx-auto p-8">
@@ -171,11 +307,14 @@ export default function Home() {
171
307
  </div>
172
308
  <div className="text-center">
173
309
  <p className="text-sm text-gray-500">
174
- All components from @digilogiclabs/saas-factory-ui v0.10.0 + auth v0.4.4 + payments
310
+ All mobile-optimized components from @digilogiclabs/saas-factory-ui v0.13.0 + auth v1.0.0 + payments
175
311
  </p>
176
312
  </div>
177
313
  </Card>
178
- </div>
179
- </main>
314
+ </MobileContainer>
315
+ </main>
316
+ </PullToRefresh>
317
+ </OfflineWrapper>
318
+ </PageTransition>
180
319
  )
181
320
  }
@@ -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, Music, Headphones } from 'lucide-react';
6
6
  import { useAuth } from '@digilogiclabs/saas-factory-auth';
7
+ import {
8
+ ResponsiveHeader,
9
+ MobileNavigation,
10
+ HamburgerIcon,
11
+ useNetworkInfo,
12
+ useOfflineState
13
+ } from '@digilogiclabs/saas-factory-ui';
7
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: 'Music Library',
38
+ href: '/music',
39
+ icon: Music,
40
+ protected: true
41
+ },
42
+ {
43
+ label: 'Playlists',
44
+ href: '/playlists',
45
+ icon: Headphones,
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 - Playing cached audio only</span>
100
+ </div>
101
+ )}
102
+
103
+ {/* Audio 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 - Audio quality optimized for better streaming • Lower bitrate enabled • Cached tracks prioritized
108
+ </div>
109
+ </div>
110
+ )}
111
+
112
+ {/* High Quality Audio 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 detected - Premium audio quality enabled • Lossless streaming available • Instant playback ready
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: <Music 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
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "{{packageName}}",
3
3
  "version": "0.1.0",
4
- "description": "{{description}} - Video Player App (with UI Package v0.11.1 + Auth v1.0.0 + Payments)",
4
+ "description": "{{description}} - Video Player App (with UI Package v0.13.0 + Auth v1.0.0 + Payments)",
5
5
  "private": true,
6
6
  "scripts": {
7
7
  "dev": "next dev",
@@ -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
  "@digilogiclabs/saas-factory-payments": "^1.0.0",
23
23
  "stripe": "^14.0.0",