diff --git a/apps/frontend/component/homepage/KeyFeatures.tsx b/apps/frontend/component/homepage/KeyFeatures.tsx new file mode 100644 index 0000000..3d52237 --- /dev/null +++ b/apps/frontend/component/homepage/KeyFeatures.tsx @@ -0,0 +1,297 @@ +import { useState, useEffect, useRef } from "react"; +import { + Lock, + RefreshCw, + CreditCard, + Users, + Shield, + Clock, + Zap, +} from "lucide-react"; + +type Feature = { + title: string; + description: string; + icon: React.ElementType; + gradient: string; + detailedPoints: string[]; + bgAccent: string; + stats: { label: string; value: string }[]; +}; + +export default function KeyFeatures() { + const [isVisible, setIsVisible] = useState(false); + const [hoveredFeature, setHoveredFeature] = useState(null); + const featuresRef = useRef(null); + + useEffect(() => { + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setIsVisible(true); + } + }, + { threshold: 0.1 } + ); + + if (featuresRef.current) { + observer.observe(featuresRef.current); + } + + return () => { + if (featuresRef.current) { + observer.unobserve(featuresRef.current); + } + }; + }, []); + + const features: Feature[] = [ + { + title: "Multi-Signature Escrow", + description: + "Enhanced security requiring approval from all parties before fund release.", + icon: Lock, + gradient: "from-blue-600 to-cyan-400", + detailedPoints: [ + "Military-grade security with multiple verification layers", + "Eliminates single points of failure in the contract", + "StarkNet ZK-proofs ensure authenticity of signatures", + ], + bgAccent: "bg-blue-500/10", + stats: [ + { label: "Security Rating", value: "99.9%" }, + { label: "Crypto Protected", value: "$12M+" }, + ], + }, + { + title: "Auto-Refund System", + description: + "Automatic return of funds if deadlines are missed or work isn't delivered.", + icon: RefreshCw, + gradient: "from-purple-600 to-indigo-400", + detailedPoints: [ + "Smart time-based execution with no manual intervention", + "Customizable grace periods to accommodate real-world scenarios", + "Full transaction history recorded on StarkNet's blockchain", + ], + bgAccent: "bg-purple-500/10", + stats: [ + { label: "Average Return Time", value: "2 mins" }, + { label: "Success Rate", value: "100%" }, + ], + }, + { + title: "Multi-Crypto Support", + description: + "Compatible with major cryptocurrencies and stablecoins for flexible payments.", + icon: CreditCard, + gradient: "from-emerald-600 to-teal-400", + detailedPoints: [ + "Support for ETH, USDC, DAI and StarkNet ecosystem tokens", + "Real-time conversion rates through oracle integration", + "Zero-slippage guarantees for stablecoin transactions", + ], + bgAccent: "bg-emerald-500/10", + stats: [ + { label: "Currencies Supported", value: "15+" }, + { label: "Exchange Rates", value: "Real-time" }, + ], + }, + { + title: "DAO Governance", + description: + "Decentralized dispute resolution through community voting and arbitration.", + icon: Users, + gradient: "from-amber-600 to-orange-400", + detailedPoints: [ + "Decentralized jury system with reputation-based selection", + "Transparent voting process with all decisions on-chain", + "Financial incentives for fair and timely arbitration", + ], + bgAccent: "bg-amber-500/10", + stats: [ + { label: "Resolution Time", value: "48 hrs" }, + { label: "Disputes Resolved", value: "950+" }, + ], + }, + { + title: "Low Transaction Fees", + description: + "StarkNet's Layer 2 scalability delivers minimal gas costs compared to alternatives.", + icon: Zap, + gradient: "from-red-600 to-pink-400", + detailedPoints: [ + "Up to 100x lower gas fees than Ethereum mainnet", + "Batch processing for efficient transaction handling", + "Predictable fee structure with no price spikes", + ], + bgAccent: "bg-red-500/10", + stats: [ + { label: "Average Fee", value: "$0.01" }, + { label: "vs Competitors", value: "95% less" }, + ], + }, + { + title: "Real-time Updates", + description: + "Instant notifications and status tracking for all contract activities.", + icon: Clock, + gradient: "from-sky-600 to-blue-400", + detailedPoints: [ + "WebSocket integration for real-time status changes", + "Mobile and email notifications for critical events", + "Timeline visualization of contract progress", + ], + bgAccent: "bg-sky-500/10", + stats: [ + { label: "Update Latency", value: "<1 sec" }, + { label: "Uptime", value: "99.99%" }, + ], + }, + ]; + + const getAnimationDelay = (index: number): string => `${index * 100}ms`; + + return ( +
+ {/* Background and blur elements */} +
+
+
+
+
+
+ + {/* Content container */} +
+
+
+
+ + + Powered by StarkNet + +
+
+

+ Revolutionary + + Features + +

+

+ Vaultix leverages StarkNet's cutting-edge technology to deliver a + suite of powerful features that revolutionize freelance payments. +

+
+ + {/* Features Grid */} +
+ {features.map((feature, index) => { + const Icon = feature.icon; + return ( +
setHoveredFeature(index)} + onMouseLeave={() => setHoveredFeature(null)} + > +
+ {/* Background Layers */} +
+
+ + {/* Card Content */} +
+
+ +
+ +

{feature.title}

+

{feature.description}

+ + {/* Expanded Points */} +
+ {feature.detailedPoints.map((point, i) => ( +
+
+
+
+

{point}

+
+ ))} +
+ + {/* Stats */} +
+
+ {feature.stats.map((stat, i) => ( +
+

+ {stat.label} +

+

+ {stat.value} +

+
+ ))} +
+
+
+
+
+ ); + })} +
+
+ + {/* CTA Button */} +
+ +
+
+ ); +} diff --git a/apps/frontend/package-lock.json b/apps/frontend/package-lock.json index 02fc5af..4c2e3ba 100644 --- a/apps/frontend/package-lock.json +++ b/apps/frontend/package-lock.json @@ -1294,7 +1294,6 @@ "integrity": "sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1354,7 +1353,6 @@ "integrity": "sha512-nm3cvFN9SqZGXjmw5bZ6cGmvJSyJPn0wU9gHAZZHDnZl2wF9PhHv78Xf06E0MaNk4zLVHL8hb2/c32XvyJOLQg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.53.1", "@typescript-eslint/types": "8.53.1", @@ -1861,7 +1859,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2856,7 +2853,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -3026,7 +3022,6 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -5388,7 +5383,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -5398,7 +5392,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.26.0" }, @@ -5411,7 +5404,6 @@ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.71.1.tgz", "integrity": "sha512-9SUJKCGKo8HUSsCO+y0CtqkqI5nNuaDqTxyqPsZPqIwudpj4rCrAz/jZV+jn57bx5gtZKOh3neQu94DXMc+w5w==", "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, @@ -6223,7 +6215,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -6424,7 +6415,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver"