import { ActionIcon, Avatar, Box, Button, Card, Container, Grid, Group, Image, Paper, rem, SimpleGrid, Stack, Text, ThemeIcon, Title, Transition, useMantineColorScheme, } from "@mantine/core"; import { IconApi, IconBolt, IconBrandGithub, IconBrandLinkedin, IconBrandTwitter, IconChevronRight, IconLock, IconMoon, IconRocket, IconShield, IconStack2, IconSun, } from "@tabler/icons-react"; import { createFileRoute, Link } from "@tanstack/react-router"; import { useEffect, useState } from "react"; export const Route = createFileRoute("/")({ component: HomePage, }); // Navigation items const NAV_ITEMS = [ { label: "Home", link: "/" }, { label: "Features", link: "#features" }, { label: "Testimonials", link: "#testimonials" }, { label: "Pricing", link: "/pricing" }, { label: "Contact", link: "/contact" }, ]; // Features data const FEATURES = [ { icon: IconBolt, title: "Lightning Fast", description: "Built on Bun runtime for exceptional performance and speed.", }, { icon: IconShield, title: "Secure by Design", description: "Enterprise-grade authentication with Better Auth integration.", }, { icon: IconApi, title: "RESTful API", description: "Full-featured API with Elysia.js for seamless backend operations.", }, { icon: IconStack2, title: "Modern Stack", description: "React 19, TanStack Router, and Mantine UI for the best DX.", }, { icon: IconLock, title: "API Key Auth", description: "Secure API key management for external integrations.", }, { icon: IconRocket, title: "Production Ready", description: "Type-safe, tested, and optimized for production deployment.", }, ]; // Testimonials data const TESTIMONIALS = [ { id: "testimonial-1", name: "Alex Johnson", role: "Lead Developer", content: "This template saved us weeks of setup time. The architecture is clean and well-thought-out.", avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=200&q=80", }, { id: "testimonial-2", name: "Sarah Williams", role: "CTO", content: "The performance improvements we saw after switching to this stack were remarkable. Highly recommended!", avatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=200&q=80", }, { id: "testimonial-3", name: "Michael Chen", role: "Product Manager", content: "The developer experience is top-notch. Everything is well-documented and easy to extend.", avatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=200&q=80", }, ]; function NavigationBar() { const { colorScheme, toggleColorScheme } = useMantineColorScheme(); const [scrolled, setScrolled] = useState(false); useEffect(() => { const handleScroll = () => { setScrolled(window.scrollY > 20); }; window.addEventListener("scroll", handleScroll); return () => window.removeEventListener("scroll", handleScroll); }, []); return ( BunStack {NAV_ITEMS.map((item) => { const isActive = window.location.pathname === item.link; return ( {item.label} ); })} toggleColorScheme()} size="lg" > {colorScheme === "dark" ? ( ) : ( )} Sign In Get Started ); } function HeroSection() { const [loaded, setLoaded] = useState(false); const [imageLoaded, setImageLoaded] = useState(false); useEffect(() => { setLoaded(true); }, []); // Simulate delay for image transition useEffect(() => { const timer = setTimeout(() => { setImageLoaded(true); }, 200); return () => clearTimeout(timer); }, []); return ( {(styles) => ( Build Faster with{" "} Bun Stack A modern, full-stack React template powered by Bun, Elysia.js, and TanStack Router. Ship your ideas faster than ever. } > Get Started Learn More )} {(styles) => ( )} ); } function AnimatedFeatureCard({ feature, index, isVisible, }: { feature: (typeof FEATURES)[number]; index: number; isVisible: boolean; }) { const [isDelayedVisible, setIsDelayedVisible] = useState(isVisible); useEffect(() => { if (isVisible) { const timer = setTimeout(() => { setIsDelayedVisible(true); }, index * 100); return () => clearTimeout(timer); } }, [isVisible, index]); return ( {(styles) => ( {feature.title} {feature.description} )} ); } function FeaturesSection() { const [visibleFeatures, setVisibleFeatures] = useState( Array(FEATURES.length).fill(false), ); useEffect(() => { const observer = new IntersectionObserver( (entries) => { entries.forEach((entry, index) => { if (entry.isIntersecting) { setVisibleFeatures((prev) => { const newVisible = [...prev]; newVisible[index] = true; return newVisible; }); } }); }, { threshold: 0.1 }, ); const elements = document.querySelectorAll(".feature-card"); elements.forEach((el) => { observer.observe(el); }); return () => observer.disconnect(); }, []); return ( {(styles) => ( Everything You Need A complete toolkit for building modern web applications with best practices built-in. )} {FEATURES.map((feature, index) => ( ))} ); } function AnimatedTestimonialCard({ testimonial, index, isVisible, }: { testimonial: (typeof TESTIMONIALS)[number]; index: number; isVisible: boolean; }) { const [isDelayedVisible, setIsDelayedVisible] = useState(isVisible); useEffect(() => { if (isVisible) { const timer = setTimeout(() => { setIsDelayedVisible(true); }, index * 150); return () => clearTimeout(timer); } }, [isVisible, index]); return ( {(styles) => ( "{testimonial.content}" {testimonial.name} {testimonial.role} )} ); } function TestimonialsSection() { const [visibleTestimonials, setVisibleTestimonials] = useState( Array(TESTIMONIALS.length).fill(false), ); useEffect(() => { const observer = new IntersectionObserver( (entries) => { entries.forEach((entry, index) => { if (entry.isIntersecting) { setVisibleTestimonials((prev) => { const newVisible = [...prev]; newVisible[index] = true; return newVisible; }); } }); }, { threshold: 0.1 }, ); const elements = document.querySelectorAll(".testimonial-card"); elements.forEach((el) => { observer.observe(el); }); return () => observer.disconnect(); }, []); return ( {(styles) => ( Loved by Developers Join thousands of satisfied developers who have accelerated their projects with Bun Stack. )} {TESTIMONIALS.map((testimonial, index) => ( ))} ); } function CtaSection() { const [loaded, setLoaded] = useState(false); useEffect(() => { setLoaded(true); }, []); return ( {(styles) => ( Ready to get started? Join thousands of developers who are building faster and more reliable applications with Bun Stack. } > Create Account View Documentation )} ); } function Footer() { const [loaded, setLoaded] = useState(false); useEffect(() => { const timer = setTimeout(() => { setLoaded(true); }, 300); return () => clearTimeout(timer); }, []); return ( {(styles) => ( BunStack The ultimate full-stack solution for modern web applications. Product Features Pricing Documentation Company About Blog Careers Subscribe to our newsletter Get the latest news and updates Subscribe © 2024 Bun Stack. Built with Bun, Elysia, and React. Privacy Policy Terms of Service )} ); } function HomePage() { return ( ); }