@jerydam/lumina-sdk 0.1.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 (152) hide show
  1. package/BUTTON_FIXES.md +59 -0
  2. package/DOCS_INDEX.md +332 -0
  3. package/DOCUMENTATION.md +252 -0
  4. package/DOCUMENTATION_BUILD_SUMMARY.md +376 -0
  5. package/DOCUMENTATION_COMPLETE.md +311 -0
  6. package/FEATURES.md +333 -0
  7. package/Lumina-sdk/src/components/lumina-provider.tsx +46 -0
  8. package/Lumina-sdk/src/components/transaction-confirm.tsx +242 -0
  9. package/Lumina-sdk/src/components/wallet-display.tsx +157 -0
  10. package/Lumina-sdk/src/components/wallet-login.tsx +163 -0
  11. package/Lumina-sdk/src/hooks/use-mobile.ts +19 -0
  12. package/Lumina-sdk/src/hooks/use-toast.ts +191 -0
  13. package/Lumina-sdk/src/index.ts +0 -0
  14. package/Lumina-sdk/src/lib/api.ts +66 -0
  15. package/Lumina-sdk/src/lib/utils.ts +6 -0
  16. package/Lumina-sdk/src/package.json +42 -0
  17. package/Lumina-sdk/src/tsconfig.json +19 -0
  18. package/NEW_FILES_MANIFEST.txt +146 -0
  19. package/README.md +298 -0
  20. package/app/dashboard/analytics/page.tsx +218 -0
  21. package/app/dashboard/api-keys/page.tsx +260 -0
  22. package/app/dashboard/billing/page.tsx +412 -0
  23. package/app/dashboard/integration/page.tsx +185 -0
  24. package/app/dashboard/layout.tsx +18 -0
  25. package/app/dashboard/page.tsx +244 -0
  26. package/app/dashboard/settings/page.tsx +285 -0
  27. package/app/dashboard/users/page.tsx +148 -0
  28. package/app/docs/api/authentication/page.tsx +246 -0
  29. package/app/docs/api/endpoints/page.tsx +397 -0
  30. package/app/docs/api/errors/page.tsx +305 -0
  31. package/app/docs/api/overview/page.tsx +306 -0
  32. package/app/docs/examples/basic-setup/page.tsx +256 -0
  33. package/app/docs/examples/multi-chain/page.tsx +331 -0
  34. package/app/docs/examples/nextjs-full-stack/page.tsx +332 -0
  35. package/app/docs/getting-started/environment-setup/page.tsx +243 -0
  36. package/app/docs/getting-started/installation/page.tsx +187 -0
  37. package/app/docs/getting-started/introduction/page.tsx +178 -0
  38. package/app/docs/getting-started/quick-start/page.tsx +199 -0
  39. package/app/docs/guides/nextjs/page.tsx +358 -0
  40. package/app/docs/guides/react/page.tsx +230 -0
  41. package/app/docs/guides/security/page.tsx +284 -0
  42. package/app/docs/layout.tsx +32 -0
  43. package/app/docs/page.tsx +180 -0
  44. package/app/docs/sdk/lumina-provider/page.tsx +186 -0
  45. package/app/docs/sdk/transaction-confirm/page.tsx +331 -0
  46. package/app/docs/sdk/wallet-display/page.tsx +224 -0
  47. package/app/docs/sdk/wallet-login/page.tsx +207 -0
  48. package/app/docs/troubleshooting/common-issues/page.tsx +301 -0
  49. package/app/docs/troubleshooting/faq/page.tsx +105 -0
  50. package/app/globals.css +125 -0
  51. package/app/invite/[token]/page.tsx +78 -0
  52. package/app/layout.tsx +36 -0
  53. package/app/login/page.tsx +175 -0
  54. package/app/page.tsx +336 -0
  55. package/app/sdk-demo/page.tsx +239 -0
  56. package/components/dashboard-sidebar.tsx +113 -0
  57. package/components/docs/breadcrumb.tsx +51 -0
  58. package/components/docs/callout.tsx +53 -0
  59. package/components/docs/code-block.tsx +77 -0
  60. package/components/docs/docs-sidebar.tsx +214 -0
  61. package/components/docs/table-of-contents.tsx +83 -0
  62. package/components/sdk/lumina-provider.tsx +46 -0
  63. package/components/sdk/transaction-confirm.tsx +242 -0
  64. package/components/sdk/wallet-display.tsx +157 -0
  65. package/components/sdk/wallet-login.tsx +163 -0
  66. package/components/theme-provider.tsx +11 -0
  67. package/components/ui/accordion.tsx +66 -0
  68. package/components/ui/alert-dialog.tsx +157 -0
  69. package/components/ui/alert.tsx +66 -0
  70. package/components/ui/aspect-ratio.tsx +11 -0
  71. package/components/ui/avatar.tsx +53 -0
  72. package/components/ui/badge.tsx +46 -0
  73. package/components/ui/breadcrumb.tsx +109 -0
  74. package/components/ui/button-group.tsx +83 -0
  75. package/components/ui/button.tsx +60 -0
  76. package/components/ui/calendar.tsx +213 -0
  77. package/components/ui/card.tsx +92 -0
  78. package/components/ui/carousel.tsx +241 -0
  79. package/components/ui/chart.tsx +351 -0
  80. package/components/ui/checkbox.tsx +32 -0
  81. package/components/ui/collapsible.tsx +33 -0
  82. package/components/ui/command.tsx +184 -0
  83. package/components/ui/context-menu.tsx +252 -0
  84. package/components/ui/dialog.tsx +143 -0
  85. package/components/ui/drawer.tsx +135 -0
  86. package/components/ui/dropdown-menu.tsx +257 -0
  87. package/components/ui/empty.tsx +104 -0
  88. package/components/ui/field.tsx +244 -0
  89. package/components/ui/form.tsx +167 -0
  90. package/components/ui/hover-card.tsx +44 -0
  91. package/components/ui/input-group.tsx +169 -0
  92. package/components/ui/input-otp.tsx +77 -0
  93. package/components/ui/input.tsx +21 -0
  94. package/components/ui/item.tsx +193 -0
  95. package/components/ui/kbd.tsx +28 -0
  96. package/components/ui/label.tsx +24 -0
  97. package/components/ui/menubar.tsx +276 -0
  98. package/components/ui/navigation-menu.tsx +166 -0
  99. package/components/ui/pagination.tsx +127 -0
  100. package/components/ui/popover.tsx +48 -0
  101. package/components/ui/progress.tsx +31 -0
  102. package/components/ui/radio-group.tsx +45 -0
  103. package/components/ui/resizable.tsx +56 -0
  104. package/components/ui/scroll-area.tsx +58 -0
  105. package/components/ui/select.tsx +185 -0
  106. package/components/ui/separator.tsx +28 -0
  107. package/components/ui/sheet.tsx +139 -0
  108. package/components/ui/sidebar.tsx +726 -0
  109. package/components/ui/skeleton.tsx +13 -0
  110. package/components/ui/slider.tsx +59 -0
  111. package/components/ui/sonner.tsx +25 -0
  112. package/components/ui/spinner.tsx +16 -0
  113. package/components/ui/switch.tsx +29 -0
  114. package/components/ui/table.tsx +116 -0
  115. package/components/ui/tabs.tsx +66 -0
  116. package/components/ui/textarea.tsx +18 -0
  117. package/components/ui/toast.tsx +129 -0
  118. package/components/ui/toaster.tsx +35 -0
  119. package/components/ui/toggle-group.tsx +73 -0
  120. package/components/ui/toggle.tsx +47 -0
  121. package/components/ui/tooltip.tsx +61 -0
  122. package/components/ui/use-mobile.tsx +19 -0
  123. package/components/ui/use-toast.ts +191 -0
  124. package/components.json +21 -0
  125. package/hooks/use-mobile.ts +19 -0
  126. package/hooks/use-toast.ts +191 -0
  127. package/lib/api.ts +66 -0
  128. package/lib/utils.ts +6 -0
  129. package/next-env.d.ts +6 -0
  130. package/next.config.mjs +11 -0
  131. package/package.json +73 -0
  132. package/pnpm-workspace.yaml +5 -0
  133. package/postcss.config.mjs +8 -0
  134. package/public/apple-icon.png +0 -0
  135. package/public/fav.jpeg +0 -0
  136. package/public/fav.png +0 -0
  137. package/public/icon-dark-32x32.png +0 -0
  138. package/public/icon-light-32x32.png +0 -0
  139. package/public/icon.png +0 -0
  140. package/public/icon.svg +26 -0
  141. package/public/logo.jpeg +0 -0
  142. package/public/logo.png +0 -0
  143. package/public/logo2.jpeg +0 -0
  144. package/public/logo2.png +0 -0
  145. package/public/placeholder-logo.png +0 -0
  146. package/public/placeholder-logo.svg +1 -0
  147. package/public/placeholder-user.jpg +0 -0
  148. package/public/placeholder.jpg +0 -0
  149. package/public/placeholder.svg +1 -0
  150. package/styles/globals.css +209 -0
  151. package/tailwind.config.ts +15 -0
  152. package/tsconfig.json +41 -0
package/app/page.tsx ADDED
@@ -0,0 +1,336 @@
1
+ 'use client'
2
+
3
+ import Link from 'next/link'
4
+ import { ArrowRight, Shield, Zap, TrendingUp, Code2, Lock, CheckCircle, Loader2, Menu, X } from 'lucide-react'
5
+ import { Button } from '@/components/ui/button'
6
+ import { useState, useEffect } from 'react'
7
+
8
+ interface PlatformStats {
9
+ active_wallets: number
10
+ operations_processed: number
11
+ uptime_pct: number
12
+ }
13
+
14
+ interface Plan {
15
+ name: string
16
+ monthly_usd: number
17
+ monthly_ops: number | null
18
+ gas_markup_pct: number
19
+ price_usd: number
20
+ }
21
+
22
+ export default function Home() {
23
+ const [stats, setStats] = useState<PlatformStats | null>(null)
24
+ const [plans, setPlans] = useState<Plan[]>([])
25
+ const [isLoading, setIsLoading] = useState(true)
26
+ const [mobileMenuOpen, setMobileMenuOpen] = useState(false) // ✅ Fix: was missing
27
+
28
+ useEffect(() => {
29
+ const fetchPublicData = async () => {
30
+ try {
31
+ const baseUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'
32
+
33
+ const [statsRes, plansRes] = await Promise.all([
34
+ fetch(`${baseUrl}/v1/billing/platform-stats`).then(res => res.json()),
35
+ fetch(`${baseUrl}/v1/billing/plans`).then(res => res.json())
36
+ ])
37
+
38
+ setStats(statsRes)
39
+ setPlans(plansRes.plans || [])
40
+ } catch (error) {
41
+ console.error('Failed to fetch platform data:', error)
42
+ } finally {
43
+ setIsLoading(false)
44
+ }
45
+ }
46
+
47
+ fetchPublicData()
48
+ }, [])
49
+
50
+ return (
51
+ <div className="min-h-screen bg-background">
52
+
53
+ {/* Navigation */}
54
+ <nav className="fixed top-0 z-50 w-full backdrop-blur-md bg-background/80 border-b border-border">
55
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-20 flex items-center justify-between">
56
+
57
+ {/* Logo */}
58
+ <div className="flex items-center">
59
+ <div className="flex items-center h-35 w-56 sm:w-64">
60
+ <img
61
+ src="/logo.png"
62
+ alt="Lumina Logo"
63
+ className="h-full w-full object-contain object-left"
64
+ />
65
+ </div>
66
+ </div>
67
+
68
+ {/* Desktop Links */}
69
+ <div className="hidden md:flex items-center gap-8">
70
+ <a href="#features" className="text-sm text-foreground/70 hover:text-foreground transition">Features</a>
71
+ <a href="#how-it-works" className="text-sm text-foreground/70 hover:text-foreground transition">How It Works</a>
72
+ <a href="#pricing" className="text-sm text-foreground/70 hover:text-foreground transition">Pricing</a>
73
+ <a href="/docs" className="text-sm text-foreground/70 hover:text-foreground transition">Docs</a>
74
+ </div>
75
+
76
+ {/* Desktop Buttons */}
77
+ <div className="hidden md:flex items-center gap-3">
78
+ <Link href="/login">
79
+ <Button variant="ghost" size="sm">Sign In</Button>
80
+ </Link>
81
+ <Link href="/login">
82
+ <Button size="sm" className="bg-emerald-600 hover:bg-emerald-700">Get Started</Button>
83
+ </Link>
84
+ </div>
85
+
86
+ {/* Mobile Hamburger Button */}
87
+ <button
88
+ className="md:hidden p-2 rounded-md text-foreground/70 hover:text-foreground hover:bg-white/10 transition"
89
+ onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
90
+ aria-label="Toggle menu"
91
+ >
92
+ {mobileMenuOpen ? <X size={22} /> : <Menu size={22} />}
93
+ </button>
94
+ </div>
95
+
96
+ {/* Mobile Menu Dropdown */}
97
+ {mobileMenuOpen && (
98
+ <div className="md:hidden border-t border-border/50 bg-background/95 backdrop-blur-md px-4 py-4 flex flex-col gap-4">
99
+ <a href="#features" onClick={() => setMobileMenuOpen(false)} className="text-sm text-foreground/70 hover:text-foreground transition py-2">
100
+ Features
101
+ </a>
102
+ <a href="#how-it-works" onClick={() => setMobileMenuOpen(false)} className="text-sm text-foreground/70 hover:text-foreground transition py-2">
103
+ How It Works
104
+ </a>
105
+ <a href="#pricing" onClick={() => setMobileMenuOpen(false)} className="text-sm text-foreground/70 hover:text-foreground transition py-2">
106
+ Pricing
107
+ </a>
108
+ <a href="/docs" onClick={() => setMobileMenuOpen(false)} className="text-sm text-foreground/70 hover:text-foreground transition py-2">
109
+ Docs
110
+ </a>
111
+ <div className="flex flex-col gap-2 pt-2 border-t border-border/50">
112
+ <Link href="/login" onClick={() => setMobileMenuOpen(false)}>
113
+ <Button variant="ghost" size="sm" className="w-full justify-center">Sign In</Button>
114
+ </Link>
115
+ <Link href="/login" onClick={() => setMobileMenuOpen(false)}>
116
+ <Button size="sm" className="w-full bg-emerald-600 hover:bg-emerald-700">Get Started</Button>
117
+ </Link>
118
+ </div>
119
+ </div>
120
+ )}
121
+ </nav>
122
+
123
+ {/* Hero Section */}
124
+ <section className="pt-32 pb-20 px-4 sm:px-6 lg:px-8 relative overflow-hidden">
125
+ <div className="absolute inset-0 -z-10">
126
+ <div className="absolute top-20 left-1/2 -translate-x-1/2 w-96 h-96 bg-emerald-500/20 rounded-full blur-3xl opacity-20"></div>
127
+ </div>
128
+ <div className="max-w-4xl mx-auto text-center animate-fade-in">
129
+ <h1 className="text-5xl md:text-7xl font-bold mb-6 text-balance">
130
+ Embedded Wallets for <span className="bg-gradient-to-r from-emerald-400 to-emerald-600 bg-clip-text text-transparent">Web3 Apps</span>
131
+ </h1>
132
+ <p className="text-xl text-foreground/70 mb-8 max-w-2xl mx-auto text-balance">
133
+ Secure, scalable wallet infrastructure that lets your users manage digital assets without leaving your app. Built for production.
134
+ </p>
135
+ <div className="flex flex-col sm:flex-row gap-4 justify-center">
136
+ <Link href="/login">
137
+ <Button size="lg" className="bg-emerald-600 hover:bg-emerald-700 text-lg">
138
+ Start Building <ArrowRight className="ml-2" size={20} />
139
+ </Button>
140
+ </Link>
141
+ <Link href="/docs">
142
+ <Button size="lg" variant="outline" className="text-lg border-emerald-600/30 hover:bg-emerald-600/10">
143
+ View Documentation
144
+ </Button>
145
+ </Link>
146
+ </div>
147
+ </div>
148
+ </section>
149
+
150
+ {/* Real-time Stats Section */}
151
+ <section className="py-16 px-4 sm:px-6 lg:px-8 border-b border-border/30">
152
+ <div className="max-w-6xl mx-auto grid grid-cols-1 md:grid-cols-3 gap-8">
153
+ <div className="text-center">
154
+ <div className="text-4xl font-bold text-emerald-500 mb-2">
155
+ {isLoading ? <Loader2 className="w-8 h-8 animate-spin mx-auto" /> : (stats?.active_wallets.toLocaleString() || '0')}
156
+ </div>
157
+ <p className="text-foreground/60">Active Wallets</p>
158
+ </div>
159
+ <div className="text-center">
160
+ <div className="text-4xl font-bold text-emerald-500 mb-2">
161
+ {isLoading ? <Loader2 className="w-8 h-8 animate-spin mx-auto" /> : (stats?.operations_processed.toLocaleString() || '0')}
162
+ </div>
163
+ <p className="text-foreground/60">Operations Processed</p>
164
+ </div>
165
+ <div className="text-center">
166
+ <div className="text-4xl font-bold text-emerald-500 mb-2">
167
+ {stats?.uptime_pct || '99.99'}%
168
+ </div>
169
+ <p className="text-foreground/60">Uptime SLA</p>
170
+ </div>
171
+ </div>
172
+ </section>
173
+
174
+ {/* Features Section */}
175
+ <section id="features" className="py-24 px-4 sm:px-6 lg:px-8">
176
+ <div className="max-w-6xl mx-auto">
177
+ <div className="text-center mb-16">
178
+ <h2 className="text-4xl md:text-5xl font-bold mb-4">Everything You Need</h2>
179
+ <p className="text-foreground/60 text-lg max-w-2xl mx-auto">
180
+ A complete embedded wallet solution with all the features modern Web3 apps require
181
+ </p>
182
+ </div>
183
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
184
+ {[
185
+ { icon: Shield, title: 'Bank-Level Security', description: 'Multi-signature wallets, hardware security modules, and insurance coverage for complete peace of mind.' },
186
+ { icon: Zap, title: 'Lightning Fast', description: 'Sub-second transaction finality with our optimized node infrastructure across multiple networks.' },
187
+ { icon: TrendingUp, title: 'Scalable Infrastructure', description: 'Handle millions of transactions per day without compromise on speed or security.' },
188
+ { icon: Code2, title: 'Developer Friendly', description: 'Simple REST APIs and SDKs in JavaScript, Python, and Go. Complete documentation and examples.' },
189
+ { icon: Lock, title: 'Privacy First', description: "End-to-end encryption with zero-knowledge proofs. Your users' data stays private." },
190
+ { icon: CheckCircle, title: 'Multi-Chain Support', description: 'Seamlessly integrate with Ethereum, Polygon, Solana, Arbitrum, and more.' },
191
+ ].map((feature, index) => (
192
+ <div key={index} className="glassmorphism-dark p-8 rounded-xl hover:bg-white/15 transition-all duration-300">
193
+ <feature.icon className="w-12 h-12 text-emerald-500 mb-4" />
194
+ <h3 className="text-xl font-semibold mb-2">{feature.title}</h3>
195
+ <p className="text-foreground/60">{feature.description}</p>
196
+ </div>
197
+ ))}
198
+ </div>
199
+ </div>
200
+ </section>
201
+
202
+ {/* How It Works Section */}
203
+ <section id="how-it-works" className="py-24 px-4 sm:px-6 lg:px-8 border-t border-border/30">
204
+ <div className="max-w-6xl mx-auto">
205
+ <div className="text-center mb-16">
206
+ <h2 className="text-4xl md:text-5xl font-bold mb-4">How It Works</h2>
207
+ <p className="text-foreground/60 text-lg max-w-2xl mx-auto">
208
+ Get your embedded wallet running in minutes, not weeks
209
+ </p>
210
+ </div>
211
+ <div className="grid grid-cols-1 md:grid-cols-4 gap-8">
212
+ {[
213
+ { step: '01', title: 'Create Account', description: 'Sign up for Lumina and get your API credentials.' },
214
+ { step: '02', title: 'Install SDK', description: 'Add our SDK to your application with npm or yarn.' },
215
+ { step: '03', title: 'Integrate Wallet', description: 'Initialize the wallet with your app configuration.' },
216
+ { step: '04', title: 'Go Live', description: 'Your users can now manage wallets seamlessly.' },
217
+ ].map((item, index) => (
218
+ <div key={index} className="relative">
219
+ <div className="glassmorphism-dark p-8 rounded-xl h-full">
220
+ <div className="text-4xl font-bold text-emerald-500 mb-4">{item.step}</div>
221
+ <h3 className="text-lg font-semibold mb-2">{item.title}</h3>
222
+ <p className="text-foreground/60">{item.description}</p>
223
+ </div>
224
+ {index < 3 && (
225
+ <div className="hidden md:block absolute top-1/2 -right-4 w-8 h-8 bg-emerald-500/20 rounded-full border border-emerald-500/40 z-10">
226
+ <ArrowRight className="w-4 h-4 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-emerald-500" />
227
+ </div>
228
+ )}
229
+ </div>
230
+ ))}
231
+ </div>
232
+ </div>
233
+ </section>
234
+
235
+ {/* Dynamic Pricing Section */}
236
+ <section id="pricing" className="py-24 px-4 sm:px-6 lg:px-8 border-t border-border/30">
237
+ <div className="max-w-6xl mx-auto">
238
+ <div className="text-center mb-16">
239
+ <h2 className="text-4xl md:text-5xl font-bold mb-4">Simple, Transparent Pricing</h2>
240
+ <p className="text-foreground/60 text-lg max-w-2xl mx-auto">
241
+ Scale at your own pace. Pay seamlessly entirely on-chain.
242
+ </p>
243
+ </div>
244
+ {isLoading ? (
245
+ <div className="flex justify-center py-12">
246
+ <Loader2 className="w-12 h-12 animate-spin text-emerald-500" />
247
+ </div>
248
+ ) : (
249
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-8 justify-center">
250
+ {plans.map((plan, index) => {
251
+ const isPro = plan.name.toLowerCase() === 'pro'
252
+ return (
253
+ <div
254
+ key={index}
255
+ className={`rounded-xl p-8 transition-all duration-300 ${
256
+ isPro
257
+ ? 'glassmorphism-dark border-emerald-500/50 ring-1 ring-emerald-500/30 shadow-[0_0_30px_rgba(16,185,129,0.15)]'
258
+ : 'glassmorphism-dark'
259
+ }`}
260
+ >
261
+ <h3 className="text-2xl font-bold mb-2 capitalize">{plan.name}</h3>
262
+ <p className="text-foreground/60 mb-4">
263
+ {isPro ? 'For scaling applications' : plan.price_usd === 0 ? 'Perfect for testing and development' : 'For growing businesses'}
264
+ </p>
265
+ <div className="mb-6">
266
+ <span className="text-4xl font-bold">${plan.price_usd}</span>
267
+ <span className="text-foreground/60 ml-2">/month</span>
268
+ </div>
269
+ <Link href="/login" className="w-full block">
270
+ <Button className={`w-full mb-8 ${isPro ? 'bg-emerald-600 hover:bg-emerald-700' : 'bg-emerald-600/20 hover:bg-emerald-600/30'}`}>
271
+ Get Started
272
+ </Button>
273
+ </Link>
274
+ <ul className="space-y-3">
275
+ <li className="flex items-center gap-2">
276
+ <CheckCircle className="w-5 h-5 text-emerald-500 shrink-0" />
277
+ <span className="text-foreground/70">
278
+ {plan.monthly_ops === null ? 'Unlimited Operations' : `Up to ${plan.monthly_ops.toLocaleString()} Operations/mo`}
279
+ </span>
280
+ </li>
281
+ <li className="flex items-center gap-2">
282
+ <CheckCircle className="w-5 h-5 text-emerald-500 shrink-0" />
283
+ <span className="text-foreground/70">{plan.gas_markup_pct}% Gas Sponsorship Markup</span>
284
+ </li>
285
+ <li className="flex items-center gap-2">
286
+ <CheckCircle className="w-5 h-5 text-emerald-500 shrink-0" />
287
+ <span className="text-foreground/70">Multi-chain Paymaster Access</span>
288
+ </li>
289
+ {isPro && (
290
+ <li className="flex items-center gap-2">
291
+ <CheckCircle className="w-5 h-5 text-emerald-500 shrink-0" />
292
+ <span className="text-foreground/70">Priority Support</span>
293
+ </li>
294
+ )}
295
+ </ul>
296
+ </div>
297
+ )
298
+ })}
299
+ </div>
300
+ )}
301
+ </div>
302
+ </section>
303
+
304
+ {/* CTA Section */}
305
+ <section className="py-24 px-4 sm:px-6 lg:px-8 border-t border-border/30">
306
+ <div className="max-w-4xl mx-auto text-center">
307
+ <h2 className="text-4xl md:text-5xl font-bold mb-6">Ready to Build?</h2>
308
+ <p className="text-xl text-foreground/60 mb-8 max-w-2xl mx-auto text-balance">
309
+ Join hundreds of Web3 developers using Lumina to power their applications.
310
+ </p>
311
+ <div className="flex flex-col sm:flex-row gap-4 justify-center">
312
+ <Link href="/login">
313
+ <Button size="lg" className="bg-emerald-600 hover:bg-emerald-700 text-lg">
314
+ Start Free Trial
315
+ </Button>
316
+ </Link>
317
+ </div>
318
+ </div>
319
+ </section>
320
+
321
+ {/* Footer */}
322
+ <footer className="border-t border-border/30 py-12 px-4 sm:px-6 lg:px-8">
323
+ <div className="max-w-6xl mx-auto flex flex-col md:flex-row justify-between items-center">
324
+ <div className="flex items-center gap-2 mb-4 md:mb-0">
325
+ <div className="w-8 h-8 rounded-lg bg-gradient-to-br from-emerald-500 to-emerald-600 flex items-center justify-center">
326
+ <span className="text-white font-bold text-sm">L</span>
327
+ </div>
328
+ <span className="font-bold">Lumina</span>
329
+ </div>
330
+ <p className="text-foreground/60 text-sm">© 2024 Lumina. All rights reserved.</p>
331
+ </div>
332
+ </footer>
333
+
334
+ </div>
335
+ )
336
+ }
@@ -0,0 +1,239 @@
1
+ 'use client'
2
+
3
+ import { useState } from 'react'
4
+ import { ArrowLeft } from 'lucide-react'
5
+ import Link from 'next/link'
6
+ import { Button } from '@/components/ui/button'
7
+ import { Card } from '@/components/ui/card'
8
+ import { LuminaProvider } from '@/components/sdk/lumina-provider'
9
+ import WalletLogin from '@/components/sdk/wallet-login'
10
+ import { WalletDisplay } from '@/components/sdk/wallet-display'
11
+ import { TransactionConfirm } from '@/components/sdk/transaction-confirm'
12
+
13
+ export default function SDKDemoPage() {
14
+ const [currentStep, setCurrentStep] = useState<'login' | 'wallet' | 'transaction'>('login')
15
+ const [walletAddress, setWalletAddress] = useState('')
16
+
17
+ const handleLoginSuccess = (address: string) => {
18
+ setWalletAddress(address)
19
+ setCurrentStep('wallet')
20
+ }
21
+
22
+ return (
23
+ <LuminaProvider apiKey="demo_key_123456" environment="development">
24
+ <div className="min-h-screen bg-background">
25
+ {/* Header */}
26
+ <nav className="border-b border-border/30 backdrop-blur-md bg-background/80">
27
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
28
+ <Link href="/" className="flex items-center gap-2 hover:opacity-80 transition">
29
+ <ArrowLeft size={20} />
30
+ <span className="font-semibold">Back to Home</span>
31
+ </Link>
32
+ <h1 className="text-xl font-bold">SDK Components Demo</h1>
33
+ <div className="w-24"></div>
34
+ </div>
35
+ </nav>
36
+
37
+ {/* Main Content */}
38
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
39
+ <div className="mb-8">
40
+ <h2 className="text-3xl font-bold mb-2">Lumina SDK Components</h2>
41
+ <p className="text-foreground/60">Interactive demonstration of wallet, authentication, and transaction components</p>
42
+ </div>
43
+
44
+ {/* Component Showcase */}
45
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
46
+ {/* Step Indicators */}
47
+ <Card className="glassmorphism-dark p-6 border-border lg:col-span-1">
48
+ <h3 className="text-lg font-semibold mb-4">Demo Steps</h3>
49
+ <div className="space-y-3">
50
+ {[
51
+ { id: 'login', label: 'Login Component', desc: 'User authentication' },
52
+ { id: 'wallet', label: 'Wallet Display', desc: 'Balance & address' },
53
+ { id: 'transaction', label: 'Transaction', desc: 'Confirm & send' },
54
+ ].map((step) => (
55
+ <button
56
+ key={step.id}
57
+ onClick={() => setCurrentStep(step.id as any)}
58
+ className={`w-full text-left p-4 rounded-lg transition-all ${
59
+ currentStep === step.id
60
+ ? 'glassmorphism-dark border-emerald-600/50'
61
+ : 'bg-white/5 border border-border/50 hover:bg-white/10'
62
+ }`}
63
+ >
64
+ <p className="font-medium">{step.label}</p>
65
+ <p className="text-xs text-foreground/60 mt-1">{step.desc}</p>
66
+ </button>
67
+ ))}
68
+ </div>
69
+ </Card>
70
+
71
+ {/* Component Display */}
72
+ <div className="lg:col-span-2">
73
+ {currentStep === 'login' && (
74
+ <div className="space-y-4">
75
+ <h3 className="text-lg font-semibold">Wallet Login Component</h3>
76
+ <p className="text-foreground/60 text-sm mb-4">Email and biometric authentication for wallet creation</p>
77
+ <WalletLogin
78
+ authMethods={['email', 'passkey', 'social']}
79
+ onSuccess={handleLoginSuccess}
80
+ onError={(err: Error) => console.error(err)}
81
+ />
82
+ </div>
83
+ )}
84
+
85
+ {/* Note: I added WalletDisplay back in since it was missing from your snippet! */}
86
+ {currentStep === 'wallet' && walletAddress && (
87
+ <div className="space-y-4">
88
+ <h3 className="text-lg font-semibold">Wallet Display Component</h3>
89
+ <p className="text-foreground/60 text-sm mb-4">Shows balance, address, and transaction actions</p>
90
+ <WalletDisplay
91
+ signerAddress={walletAddress} // Passed the new required prop
92
+ smartAccountAddress={walletAddress} // Passed the new required prop
93
+ balance="2.5"
94
+ token="ETH"
95
+ network="Ethereum"
96
+ chainId="1"
97
+ onSend={() => setCurrentStep('transaction')}
98
+ onReceive={() => alert('Receive functionality')}
99
+ />
100
+ </div>
101
+ )}
102
+
103
+ {/* ONLY ONE TransactionConfirm block now */}
104
+ {currentStep === 'transaction' && walletAddress && (
105
+ <div className="space-y-4">
106
+ <h3 className="text-lg font-semibold">Transaction Confirmation Component</h3>
107
+ <p className="text-foreground/60 text-sm mb-4">Secure transaction review and confirmation</p>
108
+ <TransactionConfirm
109
+ transaction={{
110
+ to: '0x742d35Cc6634C0532925a3b844Bc7e7595f1a2b8',
111
+ from: walletAddress,
112
+ signerAddress: walletAddress,
113
+ amount: '1.5',
114
+ token: 'ETH',
115
+ network: 'Ethereum',
116
+ gasFee: '0.012 ETH',
117
+ estimatedTime: '2-4 minutes',
118
+ }}
119
+ onConfirm={async () => {
120
+ await new Promise(r => setTimeout(r, 2000))
121
+ }}
122
+ onCancel={() => setCurrentStep('wallet')}
123
+ />
124
+ </div>
125
+ )}
126
+ </div>
127
+
128
+ </div>
129
+
130
+ {/* Code Examples */}
131
+ <div className="space-y-6">
132
+ <h2 className="text-2xl font-bold">Usage Examples</h2>
133
+
134
+ <Card className="glassmorphism-dark p-6 border-border">
135
+ <h3 className="text-lg font-semibold mb-4">1. Wrap your app with LuminaProvider</h3>
136
+ <div className="bg-white/5 p-4 rounded-lg overflow-x-auto">
137
+ <pre className="font-mono text-sm text-emerald-400">{`import { LuminaProvider } from '@lumina/sdk'
138
+
139
+ export default function App() {
140
+ return (
141
+ <LuminaProvider apiKey="your_api_key">
142
+ <YourApp />
143
+ </LuminaProvider>
144
+ )
145
+ }`}</pre>
146
+ </div>
147
+ </Card>
148
+
149
+ <Card className="glassmorphism-dark p-6 border-border">
150
+ <h3 className="text-lg font-semibold mb-4">2. Use the WalletLogin component</h3>
151
+ <div className="bg-white/5 p-4 rounded-lg overflow-x-auto">
152
+ <pre className="font-mono text-sm text-emerald-400">{`import { WalletLogin } from '@lumina/sdk'
153
+
154
+ export function LoginPage() {
155
+ const handleSuccess = (walletAddress) => {
156
+ console.log('User created wallet:', walletAddress)
157
+ }
158
+
159
+ return (
160
+ <WalletLogin
161
+ authMethods={['email', 'passkey']}
162
+ onSuccess={handleSuccess}
163
+ />
164
+ )
165
+ }`}</pre>
166
+ </div>
167
+ </Card>
168
+
169
+ <Card className="glassmorphism-dark p-6 border-border">
170
+ <h3 className="text-lg font-semibold mb-4">3. Display wallet information</h3>
171
+ <div className="bg-white/5 p-4 rounded-lg overflow-x-auto">
172
+ <pre className="font-mono text-sm text-emerald-400">{`import { WalletDisplay } from '@lumina/sdk'
173
+
174
+ export function Dashboard() {
175
+ return (
176
+ <WalletDisplay
177
+ address="0x742d35Cc6634C0532925a3b844Bc7e7595f1a2b8"
178
+ balance="2.5"
179
+ token="ETH"
180
+ network="Ethereum"
181
+ onSend={handleSendClick}
182
+ />
183
+ )
184
+ }`}</pre>
185
+ </div>
186
+ </Card>
187
+
188
+ <Card className="glassmorphism-dark p-6 border-border">
189
+ <h3 className="text-lg font-semibold mb-4">4. Confirm transactions</h3>
190
+ <div className="bg-white/5 p-4 rounded-lg overflow-x-auto">
191
+ <pre className="font-mono text-sm text-emerald-400">{`import { TransactionConfirm } from '@lumina/sdk'
192
+
193
+ export function SendPage() {
194
+ return (
195
+ <TransactionConfirm
196
+ transaction={{
197
+ to: '0x...',
198
+ amount: '1.5',
199
+ token: 'ETH',
200
+ network: 'Ethereum',
201
+ gasFee: '0.012 ETH',
202
+ }}
203
+ onConfirm={submitTransaction}
204
+ />
205
+ )
206
+ }`}</pre>
207
+ </div>
208
+ </Card>
209
+ </div>
210
+
211
+ {/* Features List */}
212
+ <div className="mt-12">
213
+ <h2 className="text-2xl font-bold mb-6">SDK Features</h2>
214
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
215
+ {[
216
+ 'Email Authentication',
217
+ 'Biometric Login',
218
+ 'Social Auth',
219
+ 'Multi-Chain',
220
+ 'Gas Estimation',
221
+ 'Real-time Balance',
222
+ 'Transaction History',
223
+ 'Webhook Support',
224
+ 'Custom Styling',
225
+ 'Type-Safe APIs',
226
+ 'Error Handling',
227
+ 'Rate Limiting',
228
+ ].map((feature, index) => (
229
+ <div key={index} className="p-4 glassmorphism-dark rounded-lg border border-border">
230
+ <p className="font-medium">{feature}</p>
231
+ </div>
232
+ ))}
233
+ </div>
234
+ </div>
235
+ </div>
236
+ </div>
237
+ </LuminaProvider>
238
+ )
239
+ }