@digilogiclabs/create-saas-app 2.8.0 → 2.9.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 (94) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/generators/template-generator.js +8 -8
  3. package/dist/generators/template-generator.js.map +1 -1
  4. package/dist/templates/shared/quality/web/src/__tests__/accessibility.test.tsx +3 -3
  5. package/dist/templates/web/ai-platform/template/src/app/page.tsx +207 -207
  6. package/dist/templates/web/base/template/package.json +1 -3
  7. package/dist/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
  8. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +6 -43
  9. package/dist/templates/web/base/template/src/app/globals.css +158 -157
  10. package/dist/templates/web/base/template/src/app/page.tsx +2 -2
  11. package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +800 -800
  12. package/dist/templates/web/ui-auth/template/src/app/globals.css +96 -95
  13. package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +109 -109
  14. package/dist/templates/web/ui-auth/template/src/app/page.tsx +4 -3
  15. package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -128
  16. package/dist/templates/web/ui-auth-ai/template/src/app/globals.css +35 -40
  17. package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +1 -0
  18. package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +3 -3
  19. package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +10 -49
  20. package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +800 -800
  21. package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
  22. package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -109
  23. package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -350
  24. package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +506 -506
  25. package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -128
  26. package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +143 -143
  27. package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +184 -184
  28. package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +143 -233
  29. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +10 -50
  30. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +800 -800
  31. package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
  32. package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +325 -364
  33. package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
  34. package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +389 -532
  35. package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +644 -644
  36. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +119 -163
  37. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +158 -201
  38. package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
  39. package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +10 -51
  40. package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
  41. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +402 -403
  42. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +143 -143
  43. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +184 -184
  44. package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
  45. package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
  46. package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +4 -7
  47. package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
  48. package/dist/templates/web/ui-only/template/src/app/globals.css +43 -42
  49. package/package.json +1 -1
  50. package/src/templates/shared/quality/web/src/__tests__/accessibility.test.tsx +3 -3
  51. package/src/templates/web/ai-platform/template/src/app/page.tsx +207 -207
  52. package/src/templates/web/base/template/package.json +1 -3
  53. package/src/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
  54. package/src/templates/web/base/template/src/app/dashboard/page.tsx +6 -43
  55. package/src/templates/web/base/template/src/app/globals.css +158 -157
  56. package/src/templates/web/base/template/src/app/page.tsx +2 -2
  57. package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +800 -800
  58. package/src/templates/web/ui-auth/template/src/app/globals.css +96 -95
  59. package/src/templates/web/ui-auth/template/src/app/login/page.tsx +109 -109
  60. package/src/templates/web/ui-auth/template/src/app/page.tsx +4 -3
  61. package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -128
  62. package/src/templates/web/ui-auth-ai/template/src/app/globals.css +35 -40
  63. package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +1 -0
  64. package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +3 -3
  65. package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +10 -49
  66. package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +800 -800
  67. package/src/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
  68. package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -109
  69. package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -350
  70. package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +506 -506
  71. package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -128
  72. package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +143 -143
  73. package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +184 -184
  74. package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +143 -233
  75. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +10 -50
  76. package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +800 -800
  77. package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
  78. package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +325 -364
  79. package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
  80. package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +389 -532
  81. package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +644 -644
  82. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +119 -163
  83. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +158 -201
  84. package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
  85. package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +10 -51
  86. package/src/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
  87. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +402 -403
  88. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +143 -143
  89. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +184 -184
  90. package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
  91. package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
  92. package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +4 -7
  93. package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
  94. package/src/templates/web/ui-only/template/src/app/globals.css +43 -42
@@ -1,403 +1,402 @@
1
- 'use client'
2
-
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
- FixedAudioBar,
18
- PlaylistCard,
19
- TrackList,
20
- WaveformVisualizer,
21
- AudioControls,
22
- VolumeSlider,
23
- ProgressBar,
24
- ShuffleButton,
25
- RepeatButton,
26
- LikeButton,
27
- ShareButton,
28
- PlaylistSidebar,
29
- AudioSearch,
30
- NowPlayingCard,
31
- useAnimationTokens,
32
- useGlassmorphism
33
- } from '@digilogiclabs/saas-factory-ui'
34
- import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Music, Wifi, WifiOff } from 'lucide-react'
35
- import { useAuth } from '@digilogiclabs/app-sdk'
36
- import Link from 'next/link'
37
- import { useState } from 'react'
38
-
39
- export default function Home() {
40
- const { user, signOut, loading } = useAuth()
41
- const networkInfo = useNetworkInfo()
42
- const isOnline = useOfflineState()
43
- const [isRefreshing, setIsRefreshing] = useState(false)
44
- const [currentTrack, setCurrentTrack] = useState(null)
45
- const [isPlaying, setIsPlaying] = useState(false)
46
- const [showPlaylistSidebar, setShowPlaylistSidebar] = useState(false)
47
-
48
- // Modern design tokens
49
- const animations = useAnimationTokens()
50
- const glass = useGlassmorphism()
51
-
52
- const projectName = "{{projectName}}"
53
- const projectDescription = "{{description}}"
54
-
55
- // Static glassmorphism classes to avoid template literal corruption
56
- const glassCard = "bg-white/10 backdrop-blur-lg border border-white/20"
57
- const glassCardRounded = "bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl"
58
- const glassCardWithHover = "bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl hover:scale-105 transition-all duration-300"
59
- const glassAccentIcon = "bg-white/10 backdrop-blur-lg border border-white/20 rounded-xl flex items-center justify-center hover:shadow-lg hover:shadow-purple-500/25 transition-all duration-300"
60
- const glassBackground = "bg-gradient-to-br from-purple-900/20 via-blue-900/20 to-teal-900/20"
61
- const glassBackgroundAccent = "bg-gradient-to-br from-purple-500/10 via-blue-500/10 to-teal-500/10"
62
-
63
- const gridConfig = {
64
- columns_1_2: { base: 1, md: 2 },
65
- columns_1_3: { base: 1, md: 3 },
66
- columns_1_sm2: { base: 1, sm: 2 },
67
- columns_1_sm2_md3: { base: 1, sm: 2, md: 3 },
68
- columns_1_sm2_md4: { base: 1, sm: 2, md: 4 },
69
- columns_2: { base: 2 },
70
- columns_2_md3: { base: 2, md: 3 },
71
- columns_2_2: { base: 2 },
72
- columns_2_md4: { base: 2, md: 4 }
73
- }
74
-
75
- // Demo playlist data
76
- const demoPlaylist = [
77
- {
78
- id: '1',
79
- title: 'Midnight Echoes',
80
- artist: 'Luna Rivers',
81
- album: 'Digital Dreams',
82
- duration: 180,
83
- url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
84
- coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiM4QjVDRjYiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
85
- liked: false
86
- },
87
- {
88
- id: '2',
89
- title: 'Neon Nights',
90
- artist: 'The Frequency',
91
- album: 'Electric Pulse',
92
- duration: 210,
93
- url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
94
- coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNFRjQ0NDQiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
95
- liked: true
96
- },
97
- {
98
- id: '3',
99
- title: 'Ocean Waves',
100
- artist: 'Ambient Flow',
101
- album: 'Nature Sounds',
102
- duration: 195,
103
- url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
104
- coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiMwNjkyQzUiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
105
- liked: false
106
- },
107
- {
108
- id: '4',
109
- title: 'City Lights',
110
- artist: 'Urban Echo',
111
- album: 'Metropolitan',
112
- duration: 225,
113
- url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
114
- coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNGNTk3MDAiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
115
- liked: true
116
- }
117
- ]
118
-
119
- const heroConfig = {
120
- badge: {
121
- text: "🎵 Premium Audio Experience",
122
- variant: "secondary" as const,
123
- icon: CheckCircle
124
- },
125
- title: {
126
- text: "Welcome to " + projectName,
127
- highlight: projectName,
128
- size: "xl" as const
129
- },
130
- description: projectDescription + ". Stream your favorite music with crystal-clear quality, offline downloads, and seamless playback across all your devices."
131
- }
132
-
133
- const handleSignOut = async () => {
134
- try {
135
- await signOut()
136
- } catch (err) {
137
- console.error('Sign out error:', err)
138
- }
139
- }
140
-
141
- const handleRefresh = async () => {
142
- setIsRefreshing(true)
143
- // Simulate refresh
144
- await new Promise(resolve => setTimeout(resolve, 1500))
145
- setIsRefreshing(false)
146
- }
147
-
148
- return (
149
- <PageTransition type="fade" duration={300}>
150
- <OfflineWrapper
151
- cacheStrategy="stale-while-revalidate"
152
- showOfflineIndicator={true}
153
- backgroundSync={true}
154
- >
155
- <PullToRefresh
156
- onRefresh={handleRefresh}
157
- threshold={80}
158
- loadingIndicator="spinner"
159
- hapticOnTrigger={true}
160
- networkAware={true}
161
- >
162
- <main className="min-h-screen relative overflow-hidden bg-background">
163
- {/* Theme-aware gradient background for audio streaming */}
164
- <div className="absolute inset-0 bg-gradient-to-br from-primary/15 via-background to-accent/15 dark:from-primary/25 dark:via-background dark:to-accent/25" />
165
- <div className="absolute inset-0 bg-gradient-to-tr from-secondary/10 via-transparent to-primary/10 dark:from-secondary/15 dark:via-transparent dark:to-primary/15" />
166
- <div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))] from-accent/20 via-transparent to-transparent dark:from-accent/30 dark:via-transparent dark:to-transparent" />
167
- {/* Animated music-themed particles */}
168
- <div className="absolute inset-0 opacity-25 dark:opacity-15">
169
- <div className="absolute top-1/3 left-1/6 w-64 h-64 bg-primary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse dark:bg-primary/70"></div>
170
- <div className="absolute top-2/3 right-1/5 w-80 h-80 bg-accent/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-2000 dark:bg-accent/70"></div>
171
- <div className="absolute top-1/5 right-1/3 w-56 h-56 bg-secondary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-4000 dark:bg-secondary/70"></div>
172
- </div>
173
- {/* Audio wave overlay */}
174
- <div className="absolute inset-0 bg-gradient-to-t from-transparent via-primary/5 to-transparent opacity-60" />
175
- <div className="relative z-10">
176
- <MobileContainer className="py-8">
177
- {/* Simple Auth Status */}
178
- {user && (
179
- <div className="flex justify-end mb-8">
180
- <div className="flex items-center gap-4">
181
- <span className="text-sm text-gray-600 dark:text-gray-300">
182
- Welcome, {user.email?.split('@')[0]}
183
- </span>
184
- <Button variant="outline" size="sm" onClick={handleSignOut}>
185
- <LogOut className="w-4 h-4 mr-2" />
186
- Sign Out
187
- </Button>
188
- </div>
189
- </div>
190
- )}
191
-
192
- {!user && !loading && (
193
- <div className="flex justify-end mb-8">
194
- <div className="flex gap-2">
195
- <Link href="/login">
196
- <Button variant="outline" size="sm">Sign In</Button>
197
- </Link>
198
- <Link href="/signup">
199
- <Button size="sm">Sign Up</Button>
200
- </Link>
201
- </div>
202
- </div>
203
- )}
204
-
205
- {/* Hero Section with Search */}
206
- <MobileHero
207
- badge={heroConfig.badge}
208
- title={heroConfig.title}
209
- description={heroConfig.description}
210
- actions={[
211
- {
212
- label: "View Pricing",
213
- href: "/checkout",
214
- icon: ArrowRight,
215
- variant: "default",
216
- size: "lg"
217
- },
218
- {
219
- label: "Learn More",
220
- variant: "outline",
221
- size: "lg"
222
- }
223
- ]}
224
- className="text-center mb-8"
225
- />
226
-
227
- {/* Search Bar with Glassmorphism */}
228
- <div className="max-w-2xl mx-auto mb-12">
229
- <div className={glass.card + " " + glass.border + " p-1 rounded-2xl " + animations.hover.lift}>
230
- <AudioSearch
231
- placeholder="Search for tracks, artists, or albums..."
232
- onSearch={(query) => console.log('Searching:', query)}
233
- showTrending={true}
234
- recentSearches={['Luna Rivers', 'Ambient Flow', 'Electronic']}
235
- className="w-full bg-transparent border-none"
236
- />
237
- </div>
238
- </div>
239
-
240
- {/* Main Content Area */}
241
- <div className="grid grid-cols-1 lg:grid-cols-4 gap-8 mb-20">
242
- {/* Main Content */}
243
- <div className="lg:col-span-3 space-y-8">
244
- {/* Now Playing Card with Enhanced Glassmorphism */}
245
- <div className={glass.card + " " + glass.border + " rounded-3xl p-6 mb-8 " + animations.hover.lift + " " + animations.transition.smooth}>
246
- <NowPlayingCard
247
- track={currentTrack || demoPlaylist[0]}
248
- isPlaying={isPlaying}
249
- onPlayPause={() => setIsPlaying(!isPlaying)}
250
- showWaveform={true}
251
- className="bg-transparent"
252
- />
253
- </div>
254
-
255
- {/* Featured Playlists with Staggered Animation */}
256
- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
257
- <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.short}>
258
- <PlaylistCard
259
- title="Today's Top Hits"
260
- description="The most played songs today"
261
- trackCount={50}
262
- coverImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNGRjc4NzgiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjMiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4="
263
- onClick={() => console.log('Opening Top Hits playlist')}
264
- className="bg-transparent border-none"
265
- />
266
- </div>
267
- <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.medium}>
268
- <PlaylistCard
269
- title="Chill Vibes"
270
- description="Relaxing music for focus and creativity"
271
- trackCount={32}
272
- coverImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiM2MEE1RkEiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjMiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4="
273
- onClick={() => console.log('Opening Chill Vibes playlist')}
274
- className="bg-transparent border-none"
275
- />
276
- </div>
277
- <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.long}>
278
- <PlaylistCard
279
- title="Electronic Pulse"
280
- description="High-energy electronic and dance music"
281
- trackCount={28}
282
- coverImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiM5QzI3QjAiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjMiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4="
283
- onClick={() => console.log('Opening Electronic Pulse playlist')}
284
- className="bg-transparent border-none"
285
- />
286
- </div>
287
- </div>
288
-
289
- {/* Track List with Glassmorphism */}
290
- <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.transition.smooth}>
291
- <TrackList
292
- tracks={demoPlaylist}
293
- currentTrackId={currentTrack?.id}
294
- onTrackSelect={(track) => setCurrentTrack(track)}
295
- onTrackPlay={(track) => {
296
- setCurrentTrack(track)
297
- setIsPlaying(true)
298
- }}
299
- showArtwork={true}
300
- showDuration={true}
301
- showLikeButton={true}
302
- className="mb-8 bg-transparent"
303
- />
304
- </div>
305
- </div>
306
-
307
- {/* Sidebar with Glassmorphism */}
308
- <div className="lg:col-span-1">
309
- <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.lift + " " + animations.transition.smooth}>
310
- <PlaylistSidebar
311
- playlists={[
312
- { id: '1', name: 'Liked Songs', trackCount: 47 },
313
- { id: '2', name: 'Recently Played', trackCount: 23 },
314
- { id: '3', name: 'My Playlist #1', trackCount: 15 },
315
- { id: '4', name: 'Favorites', trackCount: 32 }
316
- ]}
317
- onPlaylistSelect={(playlist) => console.log('Selected playlist:', playlist)}
318
- currentPlaylistId="1"
319
- className="sticky top-4 bg-transparent"
320
- />
321
- </div>
322
- </div>
323
- </div>
324
-
325
- {/* Features Overview with Enhanced Glassmorphism */}
326
- <ResponsiveGrid columns={gridConfig.columns_1_sm2_md4} gap="lg" className="mb-16">
327
- <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.short}>
328
- <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
329
- <Zap className="h-6 w-6 text-blue-400" />
330
- </div>
331
- <h3 className="text-lg font-semibold mb-2">High-Quality Streaming</h3>
332
- <p className="text-sm text-gray-600 dark:text-gray-300">
333
- Lossless audio with adaptive bitrate for the best experience
334
- </p>
335
- </div>
336
-
337
- <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.medium}>
338
- <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
339
- <Shield className="h-6 w-6 text-green-400" />
340
- </div>
341
- <h3 className="text-lg font-semibold mb-2">Secure & Private</h3>
342
- <p className="text-sm text-gray-600 dark:text-gray-300">
343
- Your listening habits and data are always protected
344
- </p>
345
- </div>
346
-
347
- <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.long}>
348
- <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
349
- <Rocket className="h-6 w-6 text-purple-400" />
350
- </div>
351
- <h3 className="text-lg font-semibold mb-2">Offline Support</h3>
352
- <p className="text-sm text-gray-600 dark:text-gray-300">
353
- Download your favorites for offline listening anywhere
354
- </p>
355
- </div>
356
-
357
- <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.extra}>
358
- <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
359
- <svg className="h-6 w-6 text-orange-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
360
- <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" />
361
- </svg>
362
- </div>
363
- <h3 className="text-lg font-semibold mb-2">Premium Plans</h3>
364
- <p className="text-sm text-gray-600 dark:text-gray-300">
365
- Flexible subscription options for every music lover
366
- </p>
367
- </div>
368
- </ResponsiveGrid>
369
- </MobileContainer>
370
- </div>
371
- </main>
372
- </PullToRefresh>
373
- </OfflineWrapper>
374
-
375
- {/* Fixed Audio Player Bar with Enhanced Glassmorphism */}
376
- <div className={"fixed bottom-0 left-0 right-0 z-50" + " " + glass.card + " " + glass.border + " " + "border-t backdrop-blur-xl"}>
377
- <FixedAudioBar
378
- track={currentTrack || demoPlaylist[0]}
379
- isPlaying={isPlaying}
380
- onPlayPause={() => setIsPlaying(!isPlaying)}
381
- onNext={() => {
382
- const currentIndex = demoPlaylist.findIndex(track => track.id === (currentTrack?.id || demoPlaylist[0].id))
383
- const nextIndex = (currentIndex + 1) % demoPlaylist.length
384
- setCurrentTrack(demoPlaylist[nextIndex])
385
- }}
386
- onPrevious={() => {
387
- const currentIndex = demoPlaylist.findIndex(track => track.id === (currentTrack?.id || demoPlaylist[0].id))
388
- const prevIndex = (currentIndex - 1 + demoPlaylist.length) % demoPlaylist.length
389
- setCurrentTrack(demoPlaylist[prevIndex])
390
- }}
391
- showWaveform={true}
392
- showVolumeControl={true}
393
- showTimeProgress={true}
394
- showLikeButton={true}
395
- showShareButton={true}
396
- showShuffleRepeat={true}
397
- allowMinimize={true}
398
- className="bg-transparent"
399
- />
400
- </div>
401
- </PageTransition>
402
- )
403
- }
1
+ 'use client'
2
+
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
+ FixedAudioBar,
18
+ PlaylistCard,
19
+ TrackList,
20
+ WaveformPlayer,
21
+ VolumeSlider,
22
+ ProgressBar,
23
+ ShuffleButton,
24
+ RepeatButton,
25
+ LikeButton,
26
+ ShareButton,
27
+ PlaylistSidebar,
28
+ AudioSearch,
29
+ NowPlayingCard,
30
+ useAnimationTokens,
31
+ useGlassmorphism
32
+ } from '@digilogiclabs/saas-factory-ui'
33
+ import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Music, Wifi, WifiOff } from 'lucide-react'
34
+ import { useAuth } from '@digilogiclabs/app-sdk'
35
+ import Link from 'next/link'
36
+ import { useState } from 'react'
37
+
38
+ export default function Home() {
39
+ const { user, signOut, loading } = useAuth()
40
+ const networkInfo = useNetworkInfo()
41
+ const isOnline = useOfflineState()
42
+ const [isRefreshing, setIsRefreshing] = useState(false)
43
+ const [currentTrack, setCurrentTrack] = useState(null)
44
+ const [isPlaying, setIsPlaying] = useState(false)
45
+ const [showPlaylistSidebar, setShowPlaylistSidebar] = useState(false)
46
+
47
+ // Modern design tokens
48
+ const animations = useAnimationTokens()
49
+ const glass = useGlassmorphism()
50
+
51
+ const projectName = "{{projectName}}"
52
+ const projectDescription = "{{description}}"
53
+
54
+ // Static glassmorphism classes to avoid template literal corruption
55
+ const glassCard = "bg-white/10 backdrop-blur-lg border border-white/20"
56
+ const glassCardRounded = "bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl"
57
+ const glassCardWithHover = "bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl hover:scale-105 transition-all duration-300"
58
+ const glassAccentIcon = "bg-white/10 backdrop-blur-lg border border-white/20 rounded-xl flex items-center justify-center hover:shadow-lg hover:shadow-purple-500/25 transition-all duration-300"
59
+ const glassBackground = "bg-gradient-to-br from-purple-900/20 via-blue-900/20 to-teal-900/20"
60
+ const glassBackgroundAccent = "bg-gradient-to-br from-purple-500/10 via-blue-500/10 to-teal-500/10"
61
+
62
+ const gridConfig = {
63
+ columns_1_2: { base: 1, md: 2 },
64
+ columns_1_3: { base: 1, md: 3 },
65
+ columns_1_sm2: { base: 1, sm: 2 },
66
+ columns_1_sm2_md3: { base: 1, sm: 2, md: 3 },
67
+ columns_1_sm2_md4: { base: 1, sm: 2, md: 4 },
68
+ columns_2: { base: 2 },
69
+ columns_2_md3: { base: 2, md: 3 },
70
+ columns_2_2: { base: 2 },
71
+ columns_2_md4: { base: 2, md: 4 }
72
+ }
73
+
74
+ // Demo playlist data
75
+ const demoPlaylist = [
76
+ {
77
+ id: '1',
78
+ title: 'Midnight Echoes',
79
+ artist: 'Luna Rivers',
80
+ album: 'Digital Dreams',
81
+ duration: 180,
82
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
83
+ coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiM4QjVDRjYiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
84
+ liked: false
85
+ },
86
+ {
87
+ id: '2',
88
+ title: 'Neon Nights',
89
+ artist: 'The Frequency',
90
+ album: 'Electric Pulse',
91
+ duration: 210,
92
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
93
+ coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNFRjQ0NDQiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
94
+ liked: true
95
+ },
96
+ {
97
+ id: '3',
98
+ title: 'Ocean Waves',
99
+ artist: 'Ambient Flow',
100
+ album: 'Nature Sounds',
101
+ duration: 195,
102
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
103
+ coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiMwNjkyQzUiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
104
+ liked: false
105
+ },
106
+ {
107
+ id: '4',
108
+ title: 'City Lights',
109
+ artist: 'Urban Echo',
110
+ album: 'Metropolitan',
111
+ duration: 225,
112
+ url: 'https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3',
113
+ coverArt: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNGNTk3MDAiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjIiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=',
114
+ liked: true
115
+ }
116
+ ]
117
+
118
+ const heroConfig = {
119
+ badge: {
120
+ text: "🎵 Premium Audio Experience",
121
+ variant: "secondary" as const,
122
+ icon: <CheckCircle className="w-4 h-4" />
123
+ },
124
+ title: {
125
+ text: "Welcome to " + projectName,
126
+ highlight: projectName,
127
+ size: "xl" as const
128
+ },
129
+ description: projectDescription + ". Stream your favorite music with crystal-clear quality, offline downloads, and seamless playback across all your devices."
130
+ }
131
+
132
+ const handleSignOut = async () => {
133
+ try {
134
+ await signOut()
135
+ } catch (err) {
136
+ console.error('Sign out error:', err)
137
+ }
138
+ }
139
+
140
+ const handleRefresh = async () => {
141
+ setIsRefreshing(true)
142
+ // Simulate refresh
143
+ await new Promise(resolve => setTimeout(resolve, 1500))
144
+ setIsRefreshing(false)
145
+ }
146
+
147
+ return (
148
+ <PageTransition type="fade" duration={300}>
149
+ <OfflineWrapper
150
+ cacheStrategy="stale-while-revalidate"
151
+ showOfflineIndicator={true}
152
+ backgroundSync={true}
153
+ >
154
+ <PullToRefresh
155
+ onRefresh={handleRefresh}
156
+ threshold={80}
157
+ loadingIndicator="spinner"
158
+ hapticOnTrigger={true}
159
+ networkAware={true}
160
+ >
161
+ <main className="min-h-screen relative overflow-hidden bg-background">
162
+ {/* Theme-aware gradient background for audio streaming */}
163
+ <div className="absolute inset-0 bg-gradient-to-br from-primary/15 via-background to-accent/15 dark:from-primary/25 dark:via-background dark:to-accent/25" />
164
+ <div className="absolute inset-0 bg-gradient-to-tr from-secondary/10 via-transparent to-primary/10 dark:from-secondary/15 dark:via-transparent dark:to-primary/15" />
165
+ <div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))] from-accent/20 via-transparent to-transparent dark:from-accent/30 dark:via-transparent dark:to-transparent" />
166
+ {/* Animated music-themed particles */}
167
+ <div className="absolute inset-0 opacity-25 dark:opacity-15">
168
+ <div className="absolute top-1/3 left-1/6 w-64 h-64 bg-primary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse dark:bg-primary/70"></div>
169
+ <div className="absolute top-2/3 right-1/5 w-80 h-80 bg-accent/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-2000 dark:bg-accent/70"></div>
170
+ <div className="absolute top-1/5 right-1/3 w-56 h-56 bg-secondary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-4000 dark:bg-secondary/70"></div>
171
+ </div>
172
+ {/* Audio wave overlay */}
173
+ <div className="absolute inset-0 bg-gradient-to-t from-transparent via-primary/5 to-transparent opacity-60" />
174
+ <div className="relative z-10">
175
+ <MobileContainer className="py-8">
176
+ {/* Simple Auth Status */}
177
+ {user && (
178
+ <div className="flex justify-end mb-8">
179
+ <div className="flex items-center gap-4">
180
+ <span className="text-sm text-gray-600 dark:text-gray-300">
181
+ Welcome, {user.email?.split('@')[0]}
182
+ </span>
183
+ <Button variant="outline" size="sm" onClick={handleSignOut}>
184
+ <LogOut className="w-4 h-4 mr-2" />
185
+ Sign Out
186
+ </Button>
187
+ </div>
188
+ </div>
189
+ )}
190
+
191
+ {!user && !loading && (
192
+ <div className="flex justify-end mb-8">
193
+ <div className="flex gap-2">
194
+ <Link href="/login">
195
+ <Button variant="outline" size="sm">Sign In</Button>
196
+ </Link>
197
+ <Link href="/signup">
198
+ <Button size="sm">Sign Up</Button>
199
+ </Link>
200
+ </div>
201
+ </div>
202
+ )}
203
+
204
+ {/* Hero Section with Search */}
205
+ <MobileHero
206
+ badge={heroConfig.badge}
207
+ title={heroConfig.title}
208
+ description={heroConfig.description}
209
+ actions={[
210
+ {
211
+ label: "View Pricing",
212
+ href: "/checkout",
213
+ icon: ArrowRight,
214
+ variant: "default",
215
+ size: "lg"
216
+ },
217
+ {
218
+ label: "Learn More",
219
+ variant: "outline",
220
+ size: "lg"
221
+ }
222
+ ]}
223
+ className="text-center mb-8"
224
+ />
225
+
226
+ {/* Search Bar with Glassmorphism */}
227
+ <div className="max-w-2xl mx-auto mb-12">
228
+ <div className={glass.card + " " + glass.border + " p-1 rounded-2xl " + animations.hover.lift}>
229
+ <AudioSearch
230
+ placeholder="Search for tracks, artists, or albums..."
231
+ onSearch={(query) => console.log('Searching:', query)}
232
+ showTrending={true}
233
+ recentSearches={['Luna Rivers', 'Ambient Flow', 'Electronic']}
234
+ className="w-full bg-transparent border-none"
235
+ />
236
+ </div>
237
+ </div>
238
+
239
+ {/* Main Content Area */}
240
+ <div className="grid grid-cols-1 lg:grid-cols-4 gap-8 mb-20">
241
+ {/* Main Content */}
242
+ <div className="lg:col-span-3 space-y-8">
243
+ {/* Now Playing Card with Enhanced Glassmorphism */}
244
+ <div className={glass.card + " " + glass.border + " rounded-3xl p-6 mb-8 " + animations.hover.lift + " " + animations.transition.smooth}>
245
+ <NowPlayingCard
246
+ track={currentTrack || demoPlaylist[0]}
247
+ isPlaying={isPlaying}
248
+ onPlayPause={() => setIsPlaying(!isPlaying)}
249
+ showWaveform={true}
250
+ className="bg-transparent"
251
+ />
252
+ </div>
253
+
254
+ {/* Featured Playlists with Staggered Animation */}
255
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
256
+ <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.short}>
257
+ <PlaylistCard
258
+ title="Today's Top Hits"
259
+ description="The most played songs today"
260
+ trackCount={50}
261
+ coverImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNGRjc4NzgiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjMiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4="
262
+ onClick={() => console.log('Opening Top Hits playlist')}
263
+ className="bg-transparent border-none"
264
+ />
265
+ </div>
266
+ <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.medium}>
267
+ <PlaylistCard
268
+ title="Chill Vibes"
269
+ description="Relaxing music for focus and creativity"
270
+ trackCount={32}
271
+ coverImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiM2MEE1RkEiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjMiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4="
272
+ onClick={() => console.log('Opening Chill Vibes playlist')}
273
+ className="bg-transparent border-none"
274
+ />
275
+ </div>
276
+ <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.long}>
277
+ <PlaylistCard
278
+ title="Electronic Pulse"
279
+ description="High-energy electronic and dance music"
280
+ trackCount={28}
281
+ coverImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiM5QzI3QjAiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSIxNTAiIHI9IjYwIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjMiLz48cGF0aCBkPSJNMTMwIDEyMFYxODBMMTcwIDE1MEwxMzAgMTIwWiIgZmlsbD0id2hpdGUiLz48L3N2Zz4="
282
+ onClick={() => console.log('Opening Electronic Pulse playlist')}
283
+ className="bg-transparent border-none"
284
+ />
285
+ </div>
286
+ </div>
287
+
288
+ {/* Track List with Glassmorphism */}
289
+ <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.transition.smooth}>
290
+ <TrackList
291
+ tracks={demoPlaylist}
292
+ currentTrackId={currentTrack?.id}
293
+ onTrackSelect={(track) => setCurrentTrack(track)}
294
+ onTrackPlay={(track) => {
295
+ setCurrentTrack(track)
296
+ setIsPlaying(true)
297
+ }}
298
+ showArtwork={true}
299
+ showDuration={true}
300
+ showLikeButton={true}
301
+ className="mb-8 bg-transparent"
302
+ />
303
+ </div>
304
+ </div>
305
+
306
+ {/* Sidebar with Glassmorphism */}
307
+ <div className="lg:col-span-1">
308
+ <div className={glass.card + " " + glass.border + " rounded-2xl overflow-hidden " + animations.hover.lift + " " + animations.transition.smooth}>
309
+ <PlaylistSidebar
310
+ playlists={[
311
+ { id: '1', name: 'Liked Songs', trackCount: 47 },
312
+ { id: '2', name: 'Recently Played', trackCount: 23 },
313
+ { id: '3', name: 'My Playlist #1', trackCount: 15 },
314
+ { id: '4', name: 'Favorites', trackCount: 32 }
315
+ ]}
316
+ onPlaylistSelect={(playlist) => console.log('Selected playlist:', playlist)}
317
+ currentPlaylistId="1"
318
+ className="sticky top-4 bg-transparent"
319
+ />
320
+ </div>
321
+ </div>
322
+ </div>
323
+
324
+ {/* Features Overview with Enhanced Glassmorphism */}
325
+ <ResponsiveGrid columns={gridConfig.columns_1_sm2_md4} gap={6} className="mb-16">
326
+ <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.short}>
327
+ <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
328
+ <Zap className="h-6 w-6 text-blue-400" />
329
+ </div>
330
+ <h3 className="text-lg font-semibold mb-2">High-Quality Streaming</h3>
331
+ <p className="text-sm text-gray-600 dark:text-gray-300">
332
+ Lossless audio with adaptive bitrate for the best experience
333
+ </p>
334
+ </div>
335
+
336
+ <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.medium}>
337
+ <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
338
+ <Shield className="h-6 w-6 text-green-400" />
339
+ </div>
340
+ <h3 className="text-lg font-semibold mb-2">Secure & Private</h3>
341
+ <p className="text-sm text-gray-600 dark:text-gray-300">
342
+ Your listening habits and data are always protected
343
+ </p>
344
+ </div>
345
+
346
+ <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.long}>
347
+ <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
348
+ <Rocket className="h-6 w-6 text-purple-400" />
349
+ </div>
350
+ <h3 className="text-lg font-semibold mb-2">Offline Support</h3>
351
+ <p className="text-sm text-gray-600 dark:text-gray-300">
352
+ Download your favorites for offline listening anywhere
353
+ </p>
354
+ </div>
355
+
356
+ <div className={glass.card + " " + glass.border + " text-center p-6 rounded-2xl " + animations.hover.scale + " " + animations.transition.smooth + " " + animations.delay.extra}>
357
+ <div className={"mx-auto w-12 h-12" + " " + glass.accent + " " + "rounded-xl flex items-center justify-center mb-4" + " " + animations.hover.glow}>
358
+ <svg className="h-6 w-6 text-orange-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
359
+ <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" />
360
+ </svg>
361
+ </div>
362
+ <h3 className="text-lg font-semibold mb-2">Premium Plans</h3>
363
+ <p className="text-sm text-gray-600 dark:text-gray-300">
364
+ Flexible subscription options for every music lover
365
+ </p>
366
+ </div>
367
+ </ResponsiveGrid>
368
+ </MobileContainer>
369
+ </div>
370
+ </main>
371
+ </PullToRefresh>
372
+ </OfflineWrapper>
373
+
374
+ {/* Fixed Audio Player Bar with Enhanced Glassmorphism */}
375
+ <div className={"fixed bottom-0 left-0 right-0 z-50" + " " + glass.card + " " + glass.border + " " + "border-t backdrop-blur-xl"}>
376
+ <FixedAudioBar
377
+ track={currentTrack || demoPlaylist[0]}
378
+ isPlaying={isPlaying}
379
+ onPlayPause={() => setIsPlaying(!isPlaying)}
380
+ onNext={() => {
381
+ const currentIndex = demoPlaylist.findIndex(track => track.id === (currentTrack?.id || demoPlaylist[0].id))
382
+ const nextIndex = (currentIndex + 1) % demoPlaylist.length
383
+ setCurrentTrack(demoPlaylist[nextIndex])
384
+ }}
385
+ onPrevious={() => {
386
+ const currentIndex = demoPlaylist.findIndex(track => track.id === (currentTrack?.id || demoPlaylist[0].id))
387
+ const prevIndex = (currentIndex - 1 + demoPlaylist.length) % demoPlaylist.length
388
+ setCurrentTrack(demoPlaylist[prevIndex])
389
+ }}
390
+ showWaveform={true}
391
+ showVolumeControl={true}
392
+ showTimeProgress={true}
393
+ showLikeButton={true}
394
+ showShareButton={true}
395
+ showShuffleRepeat={true}
396
+ allowMinimize={true}
397
+ className="bg-transparent"
398
+ />
399
+ </div>
400
+ </PageTransition>
401
+ )
402
+ }