"use client"; import { Button } from "@/components/ui/button"; import { TECH_OPTIONS } from "@/lib/constant"; import { Github, Star } from "lucide-react"; import { motion } from "motion/react"; import Link from "next/link"; import { useEffect, useState } from "react"; import FeatureCard from "./_components/FeatureCard"; import CodeContainer from "./_components/code-container"; import Footer from "./_components/footer"; import Navbar from "./_components/navbar"; import SponsorsSection from "./_components/sponsors-section"; import Testimonials from "./_components/testimonials"; export default function HomePage() { const [stars, setStars] = useState(null); const [isLoadingStars, setIsLoadingStars] = useState(true); useEffect(() => { async function fetchStars() { try { const response = await fetch( "https://api.github.com/repos/amanvarshney01/create-better-t-stack", ); if (response.ok) { const data = await response.json(); setStars(data.stargazers_count); } else { console.error("Failed to fetch GitHub stars"); } } catch (error) { console.error("Error fetching GitHub stars:", error); } finally { setIsLoadingStars(false); } } fetchStars(); }, []); const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.15, }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: "easeOut", }, }, }; const sectionVariants = { hidden: { opacity: 0, y: 30 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6, ease: "easeOut", }, }, }; const webFrontendOptions = TECH_OPTIONS.webFrontend.filter( (option) => option.id !== "none", ); const nativeFrontendOptions = TECH_OPTIONS.nativeFrontend.filter( (option) => option.id !== "none", ); const combinedFrontendOptions = [ ...webFrontendOptions, ...nativeFrontendOptions, ]; const backendOptions = TECH_OPTIONS.backend.filter( (option) => option.id !== "none", ); const runtimeOptions = TECH_OPTIONS.runtime.filter( (option) => option.id !== "none", ); const apiLayerOptions = TECH_OPTIONS.api.filter( (option) => option.id !== "none", ); const databaseOptions = TECH_OPTIONS.database.filter( (option) => option.id !== "none", ); const ormOptions = TECH_OPTIONS.orm.filter((option) => option.id !== "none"); const dbSetupOptions = TECH_OPTIONS.dbSetup.filter( (option) => option.id !== "none", ); const addonsOptions = TECH_OPTIONS.addons.filter( (option) => option.id !== "none", ); const examplesOptions = TECH_OPTIONS.examples.filter( (option) => option.id !== "none", ); return ( <>
Roll Your Own Stack A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations. {/* */}