import React, { Suspense, useRef, useState, useEffect } from 'react'; import { Canvas, useFrame } from '@react-three/fiber'; import { Float, OrbitControls, Sphere, Box, Torus, Text3D, Center, Environment } from '@react-three/drei'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { useNavigate } from 'react-router-dom'; import { DollarSign, TrendingUp, Shield, Target, Zap, ArrowRight, CheckCircle, Star, Users, BarChart3, Brain, Clock } from 'lucide-react'; import * as THREE from 'three'; // Error Boundary Component class Scene3DErrorBoundary extends React.Component< { children: React.ReactNode; fallback: React.ReactNode }, { hasError: boolean } > { constructor(props: { children: React.ReactNode; fallback: React.ReactNode }) { super(props); this.state = { hasError: false }; } static getDerivedStateFromError(error: Error): { hasError: boolean } { return { hasError: true }; } componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { console.warn('3D Scene Error:', error, errorInfo); } render() { if (this.state.hasError) { return this.props.fallback; } return this.props.children; } } // 3D Scene Components const FloatingCoin = ({ position }: { position: [number, number, number] }) => { const meshRef = useRef(null); useFrame((state) => { try { if (meshRef.current) { meshRef.current.rotation.y = state.clock.elapsedTime * 0.5; meshRef.current.rotation.x = Math.sin(state.clock.elapsedTime * 0.3) * 0.1; } } catch (error) { console.warn('FloatingCoin animation error:', error); } }); return ( ); }; const AnimatedSphere = ({ position, color }: { position: [number, number, number], color: string }) => { const meshRef = useRef(null); useFrame((state) => { try { if (meshRef.current) { meshRef.current.position.y = position[1] + Math.sin(state.clock.elapsedTime) * 0.2; meshRef.current.rotation.x = state.clock.elapsedTime * 0.2; meshRef.current.rotation.y = state.clock.elapsedTime * 0.3; } } catch (error) { console.warn('AnimatedSphere animation error:', error); } }); return ( ); }; const Scene3D = () => { try { return ( <> {/* Floating Elements */} {/* Central rotating torus */} ); } catch (error) { console.warn('Scene3D render error:', error); return ( <> ); } }; const Landing: React.FC = () => { const navigate = useNavigate(); const features = [ { icon: , title: "Portfolio Manager", description: "Analyze and optimize your investment portfolio with AI-powered insights. Track stocks, mutual funds, and get rebalancing recommendations.", status: "available" }, { icon: , title: "Budget Manager", description: "Take control of your spending with intelligent budget tracking. Monitor expenses, set category limits, and get spending insights.", status: "available" }, { icon: , title: "Savings Booster", description: "Maximize your savings potential with AI-driven cost optimization. Find duplicate subscriptions and money-saving opportunities.", status: "available" }, { icon: , title: "Credit Manager", description: "Optimize your credit health with intelligent payment strategies. Monitor CIBIL score and get improvement recommendations.", status: "coming-soon" }, { icon: , title: "Insurance Advisor", description: "Find the perfect insurance coverage for your needs. Get personalized recommendations and policy comparisons.", status: "coming-soon" }, { icon: , title: "AI Jar (Goal Planning)", description: "Achieve your financial dreams with intelligent goal planning. Set targets, track progress, and get step-by-step guidance.", status: "coming-soon" }, { icon: , title: "Voice Bot Assistant", description: "Access your financial information hands-free with voice commands. Get spoken insights and natural language queries.", status: "coming-soon" }, { icon: , title: "Commitment Advisor", description: "Make informed decisions about major financial commitments. Get timing recommendations and affordability analysis.", status: "coming-soon" } ]; const stats = [ { value: "₹50L+", label: "Money Saved" }, { value: "10K+", label: "Happy Users" }, { value: "95%", label: "Success Rate" }, { value: "24/7", label: "AI Support" } ]; return (
{/* Hero Section */}
{/* 3D Background */}
} > }>
{/* Background decorations */}
{/* Content */}
India's #1 AI Financial Assistant

Your Money,
Powered by AI

Transform your financial future with intelligent insights, automated savings, and personalized investment strategies designed for Indian investors.

{/* Stats */}
{stats.map((stat, index) => (
{stat.value}
{stat.label}
))}
{/* Features Section */}

Complete Financial Management Suite

Discover how AI can revolutionize your relationship with money

{/* Available Features Highlight */}
Now Available

Portfolio Manager, Budget Tracker & Savings Booster are live and ready to transform your finances!

{features.map((feature, index) => (
{feature.icon}
{feature.status === 'available' ? ( <> Available ) : ( <> Coming Soon )}
{feature.title}
{feature.description} {feature.status === 'available' && ( )}
))}
{/* CTA Section */}

Start Managing Your Money Smarter Today

Get instant access to Portfolio Management, Budget Tracking, and Savings Optimization

{/* Feature Pills */}
Track Investments Monitor Budget Boost Savings

No credit card required • Full access to available features • More coming soon

); }; export default Landing;