From 1aa1525dc0c71e4a07a7f90db7105dc09fc92c16 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Tue, 22 Jul 2025 10:18:31 +0530 Subject: [PATCH] fix(web): improve builder responsiveness and add npm icon --- apps/web/public/icon/npm.svg | 2 +- .../(home)/_components/sponsors-section.tsx | 28 +- .../app/(home)/_components/stack-builder.tsx | 299 +++++++++--------- .../app/(home)/_components/testimonials.tsx | 16 - apps/web/src/app/(home)/analytics/page.tsx | 2 +- apps/web/src/app/(home)/page.tsx | 2 +- .../showcase/_components/ShowcaseItem.tsx | 2 +- apps/web/src/app/(home)/showcase/page.tsx | 40 ++- apps/web/src/app/layout.config.tsx | 21 +- 9 files changed, 200 insertions(+), 212 deletions(-) diff --git a/apps/web/public/icon/npm.svg b/apps/web/public/icon/npm.svg index cb38d9f..81376e3 100644 --- a/apps/web/public/icon/npm.svg +++ b/apps/web/public/icon/npm.svg @@ -1 +1 @@ - + diff --git a/apps/web/src/app/(home)/_components/sponsors-section.tsx b/apps/web/src/app/(home)/_components/sponsors-section.tsx index bd0acf1..5173bbc 100644 --- a/apps/web/src/app/(home)/_components/sponsors-section.tsx +++ b/apps/web/src/app/(home)/_components/sponsors-section.tsx @@ -87,27 +87,11 @@ export default function SponsorsSection() { [{loadingSponsors ? "LOADING..." : sponsors.length} RECORDS] - -
-
- $ - - Amazing organizations and individuals supporting this project - -
-
- $ - - Your support helps maintain and improve Better-T-Stack - -
-
- {loadingSponsors ? (
- LOADING_SPONSORS.EXE + LOADING_SPONSORS.SH
@@ -143,7 +127,7 @@ export default function SponsorsSection() { className="flex items-center justify-center gap-2 text-primary transition-colors hover:text-accent" > - BECOME_SPONSOR.EXE + BECOME_SPONSOR.SH
@@ -151,15 +135,15 @@ export default function SponsorsSection() {
{currentSponsors.length > 0 && (
-
+ {/*
- ACTIVE_SPONSORS.EXE + ACTIVE_SPONSORS.SH ({currentSponsors.length}) -
+
*/}
{currentSponsors.map((entry, index) => { const since = new Date(entry.createdAt).toLocaleDateString( @@ -378,7 +362,7 @@ export default function SponsorsSection() { className="flex items-center justify-center gap-2 text-primary transition-colors hover:text-accent" > - SUPPORT_PROJECT.EXE + SUPPORT_PROJECT.SH
diff --git a/apps/web/src/app/(home)/_components/stack-builder.tsx b/apps/web/src/app/(home)/_components/stack-builder.tsx index a787045..1eb4f27 100644 --- a/apps/web/src/app/(home)/_components/stack-builder.tsx +++ b/apps/web/src/app/(home)/_components/stack-builder.tsx @@ -1449,157 +1449,162 @@ const StackBuilder = () => { return ( -
-
-
-
- -
- - - {lastSavedStack && ( - - )} - - -
-
-
- $ - - {command} - -
-
- -
-
-
-

- Selected Stack -

-
{selectedBadges}
-
-
-
-

- Quick Presets -

-
- {PRESET_TEMPLATES.map((preset) => ( + placeholder="my-better-t-app" + /> + {projectNameError && ( +

+ {projectNameError} +

+ )} + + +
- ))} + + {lastSavedStack && ( + + )} + + +
+ +
+
+ $ + + {command} + +
+
+ +
+
+ +
+

+ Selected Stack +

+
{selectedBadges}
+
+
+ +
+

+ Quick Presets +

+
+ {PRESET_TEMPLATES.map((preset) => ( + + ))} +
-
+ +
+ +
-
+
{CATEGORY_ORDER.map((categoryKey) => { const categoryOptions = TECH_OPTIONS[categoryKey as keyof typeof TECH_OPTIONS] || []; @@ -1618,11 +1623,11 @@ const StackBuilder = () => { }} key={categoryKey} id={`section-${categoryKey}`} - className="mb-8 scroll-mt-4" + className="mb-6 scroll-mt-4 sm:mb-8" >
- -

+ +

{categoryDisplayName}

{compatibilityAnalysis.notes[categoryKey]?.hasIssue && ( @@ -1643,7 +1648,7 @@ const StackBuilder = () => { )}

-
+
{filteredOptions.map((tech) => { let isSelected = false; const category = categoryKey as keyof StackState; @@ -1673,7 +1678,7 @@ const StackBuilder = () => { { )}
- -
-
- $ - - Community feedback from X (Twitter) - -
-
- $ - - Real developers sharing their experience - -
-
-
- ANALYTICS_DASHBOARD.EXE + ANALYTICS_DASHBOARD.SH
diff --git a/apps/web/src/app/(home)/page.tsx b/apps/web/src/app/(home)/page.tsx index 5def9eb..182fde1 100644 --- a/apps/web/src/app/(home)/page.tsx +++ b/apps/web/src/app/(home)/page.tsx @@ -167,7 +167,7 @@ export default function HomePage() {
- STACK_BUILDER.EXE + STACK_BUILDER.SH

[EXEC] Interactive configuration wizard diff --git a/apps/web/src/app/(home)/showcase/_components/ShowcaseItem.tsx b/apps/web/src/app/(home)/showcase/_components/ShowcaseItem.tsx index 0abb442..4ea37c6 100644 --- a/apps/web/src/app/(home)/showcase/_components/ShowcaseItem.tsx +++ b/apps/web/src/app/(home)/showcase/_components/ShowcaseItem.tsx @@ -86,7 +86,7 @@ export default function ShowcaseItem({ className="flex items-center gap-2 rounded border border-border bg-primary/10 px-3 py-2 text-primary text-sm transition-all hover:bg-primary/20 hover:text-primary" > - LAUNCH_DEMO.EXE + LAUNCH_DEMO.SH )} diff --git a/apps/web/src/app/(home)/showcase/page.tsx b/apps/web/src/app/(home)/showcase/page.tsx index 8fd626a..364423d 100644 --- a/apps/web/src/app/(home)/showcase/page.tsx +++ b/apps/web/src/app/(home)/showcase/page.tsx @@ -66,6 +66,23 @@ const showcaseProjects = [ liveUrl: "https://gl1.chat/?ref=better-t-stack", tags: ["tRPC", "Drizzle", "Elysia", "Vite", "TanStack Router"], }, + { + title: "Transmogged", + description: + "Turn your video game characters into different styles worth showing off. Create profile pictures that impress you and your friends.", + imageUrl: "https://images.transmogged.com/transmogged-home.png", + liveUrl: "https://transmogged.com", + tags: [ + "TanStack Router", + "Better Auth", + "Biome", + "bun", + "PostgreSQL", + "Drizzle", + "tRPC", + "Hono", + ], + }, ]; export default function ShowcasePage() { @@ -77,7 +94,7 @@ export default function ShowcasePage() {

- PROJECT_SHOWCASE.EXE + PROJECT_SHOWCASE.SH
@@ -85,27 +102,6 @@ export default function ShowcasePage() { [{showcaseProjects.length} PROJECTS FOUND]
- -
-
- $ - - user@dev-machine:~/showcase$ ls -la - -
-
- $ - - Discover amazing projects built with Better-T-Stack - -
-
- $ - - Real-world implementations showcasing stack capabilities - -
-
diff --git a/apps/web/src/app/layout.config.tsx b/apps/web/src/app/layout.config.tsx index c6e77cf..5fa86f4 100644 --- a/apps/web/src/app/layout.config.tsx +++ b/apps/web/src/app/layout.config.tsx @@ -1,6 +1,7 @@ import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared"; import Image from "next/image"; import discordLogo from "@/public/icon/discord.svg"; +import npmLogo from "@/public/icon/npm.svg"; import mainLogo from "@/public/logo.svg"; export const logo = ( @@ -45,13 +46,31 @@ export const baseOptions: BaseLayoutProps = { url: "/showcase", }, { - text: ( + text: "NPM", + icon: ( + npm + ), + label: "NPM", + type: "icon", + url: "https://www.npmjs.com/package/create-better-t-stack", + external: true, + secondary: true, + }, + { + text: "Discord", + icon: ( discord ), + label: "Discord", + type: "icon", url: "https://discord.gg/ZYsbjpDaM5", external: true, secondary: true,