"use client"; import { Button } from "@/components/ui/button"; import { TECH_OPTIONS } from "@/lib/constant"; import discordLogo from "@/public/icon/discord.svg"; import { Github, Star, Terminal } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; import { useEffect, useState } from "react"; import CodeContainer from "./_components/code-container"; import Footer from "./_components/footer"; import Navbar from "./_components/navbar"; import NpmPackage from "./_components/npm-package"; 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 frontendOptions = [ ...TECH_OPTIONS.webFrontend.filter((option) => option.id !== "none"), ...TECH_OPTIONS.nativeFrontend.filter((option) => option.id !== "none"), ]; const backendOptions = TECH_OPTIONS.backend.filter( (option) => option.id !== "none", ); const databaseOptions = TECH_OPTIONS.database.filter( (option) => option.id !== "none", ); const runtimeOptions = TECH_OPTIONS.runtime; const packageManagerOptions = TECH_OPTIONS.packageManager; const apiOptions = TECH_OPTIONS.api.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 authOptions = TECH_OPTIONS.auth.filter( (option) => option.id !== "false", ); const addonsOptions = TECH_OPTIONS.addons; const examplesOptions = TECH_OPTIONS.examples; const techStackCategories = [ { category: "Frontend", options: frontendOptions, }, { category: "Backend", options: backendOptions, }, { category: "Database", options: databaseOptions, }, { category: "Runtime", options: runtimeOptions, }, { category: "API", options: apiOptions, }, { category: "ORM", options: ormOptions, }, { category: "Database Setup", options: dbSetupOptions, }, { category: "Authentication", options: authOptions, }, { category: "Package Managers", options: packageManagerOptions, }, { category: "Addons", options: addonsOptions, }, { category: "Examples", options: examplesOptions, }, ]; return ( <>
CLI Tool for Developers

Roll Your Own
Stack

A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations.

Tech Stack Options

Choose from modern, production-ready technologies

{techStackCategories.map((category) => ( ))}
Category Options
{category.category}
{category.options.map((option) => (
{option.icon !== "" && ( {option.name} )} {option.name}
))}