diff --git a/apps/cli/src/helpers/core/add-addons.ts b/apps/cli/src/helpers/core/add-addons.ts index b5062c1..82de246 100644 --- a/apps/cli/src/helpers/core/add-addons.ts +++ b/apps/cli/src/helpers/core/add-addons.ts @@ -22,14 +22,14 @@ export async function addAddonsToProject( const isBetterTStack = await isBetterTStackProject(projectDir); if (!isBetterTStack) { exitWithError( - "This doesn't appear to be a Better-T Stack project. Please run this command from the root of a Better-T Stack project.", + "This doesn't appear to be a Better-T-Stack project. Please run this command from the root of a Better-T-Stack project.", ); } const detectedConfig = await detectProjectConfig(projectDir); if (!detectedConfig) { exitWithError( - "Could not detect the project configuration. Please ensure this is a valid Better-T Stack project.", + "Could not detect the project configuration. Please ensure this is a valid Better-T-Stack project.", ); } diff --git a/apps/cli/src/helpers/core/add-deployment.ts b/apps/cli/src/helpers/core/add-deployment.ts index 0158642..7dbc04d 100644 --- a/apps/cli/src/helpers/core/add-deployment.ts +++ b/apps/cli/src/helpers/core/add-deployment.ts @@ -31,14 +31,14 @@ export async function addDeploymentToProject( const isBetterTStack = await isBetterTStackProject(projectDir); if (!isBetterTStack) { exitWithError( - "This doesn't appear to be a Better-T Stack project. Please run this command from the root of a Better-T Stack project.", + "This doesn't appear to be a Better-T-Stack project. Please run this command from the root of a Better-T-Stack project.", ); } const detectedConfig = await detectProjectConfig(projectDir); if (!detectedConfig) { exitWithError( - "Could not detect the project configuration. Please ensure this is a valid Better-T Stack project.", + "Could not detect the project configuration. Please ensure this is a valid Better-T-Stack project.", ); } diff --git a/apps/cli/src/helpers/core/command-handlers.ts b/apps/cli/src/helpers/core/command-handlers.ts index c557e5f..e783352 100644 --- a/apps/cli/src/helpers/core/command-handlers.ts +++ b/apps/cli/src/helpers/core/command-handlers.ts @@ -47,7 +47,7 @@ export async function createProjectHandler( if (input.renderTitle !== false) { renderTitle(); } - intro(pc.magenta("Creating a new Better-T Stack project")); + intro(pc.magenta("Creating a new Better-T-Stack project")); if (input.yolo) { consola.fatal("YOLO mode enabled - skipping checks. Things may break!"); @@ -265,7 +265,7 @@ export async function addAddonsHandler(input: AddInput) { if (!detectedConfig) { exitWithError( - "Could not detect project configuration. Please ensure this is a valid Better-T Stack project.", + "Could not detect project configuration. Please ensure this is a valid Better-T-Stack project.", ); } diff --git a/apps/cli/src/helpers/core/post-installation.ts b/apps/cli/src/helpers/core/post-installation.ts index bfaa565..720f75c 100644 --- a/apps/cli/src/helpers/core/post-installation.ts +++ b/apps/cli/src/helpers/core/post-installation.ts @@ -187,7 +187,7 @@ export async function displayPostInstallInstructions( tazeCommand, )}\n\n`; output += `${pc.bold( - "Like Better-T Stack?", + "Like Better-T-Stack?", )} Please consider giving us a star\n on GitHub:\n`; output += pc.cyan("https://github.com/AmanVarshney01/create-better-t-stack"); diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts index 2fde6e4..f3bd140 100644 --- a/apps/cli/src/index.ts +++ b/apps/cli/src/index.ts @@ -52,7 +52,7 @@ const t = trpcServer.initTRPC.create(); export const router = t.router({ init: t.procedure .meta({ - description: "Create a new Better-T Stack project", + description: "Create a new Better-T-Stack project", default: true, negateBooleans: true, }) @@ -117,7 +117,7 @@ export const router = t.router({ add: t.procedure .meta({ description: - "Add addons or deployment configurations to an existing Better-T Stack project", + "Add addons or deployment configurations to an existing Better-T-Stack project", }) .input( z.tuple([ @@ -140,11 +140,11 @@ export const router = t.router({ await addAddonsHandler(options); }), sponsors: t.procedure - .meta({ description: "Show Better-T Stack sponsors" }) + .meta({ description: "Show Better-T-Stack sponsors" }) .mutation(async () => { try { renderTitle(); - intro(pc.magenta("Better-T Stack Sponsors")); + intro(pc.magenta("Better-T-Stack Sponsors")); const sponsors = await fetchSponsors(); displaySponsors(sponsors); } catch (error) { @@ -152,7 +152,7 @@ export const router = t.router({ } }), docs: t.procedure - .meta({ description: "Open Better-T Stack documentation" }) + .meta({ description: "Open Better-T-Stack documentation" }) .mutation(async () => { const DOCS_URL = "https://better-t-stack.dev/docs"; try { @@ -186,7 +186,7 @@ export function createBtsCli() { } /** - * Initialize a new Better-T Stack project + * Initialize a new Better-T-Stack project * * @example CLI usage: * ```bash diff --git a/apps/web/content/docs/cli/index.mdx b/apps/web/content/docs/cli/index.mdx index 2363859..192b8b9 100644 --- a/apps/web/content/docs/cli/index.mdx +++ b/apps/web/content/docs/cli/index.mdx @@ -5,11 +5,11 @@ description: Complete reference for all CLI commands ## Overview -The Better-T Stack CLI provides several commands to manage your TypeScript projects. +The Better-T-Stack CLI provides several commands to manage your TypeScript projects. ## `init` (Default Command) -Creates a new Better-T Stack project. +Creates a new Better-T-Stack project. ```bash create-better-t-stack [project-directory] [options] @@ -59,7 +59,7 @@ create-better-t-stack --database postgres --backend hono --frontend tanstack-rou ## `add` -Adds addons or deployment configurations to an existing Better-T Stack project. +Adds addons or deployment configurations to an existing Better-T-Stack project. ```bash create-better-t-stack add [options] @@ -89,7 +89,7 @@ create-better-t-stack add --web-deploy wrangler ## `sponsors` -Displays Better-T Stack sponsors. +Displays Better-T-Stack sponsors. ```bash create-better-t-stack sponsors @@ -99,7 +99,7 @@ Shows a list of project sponsors and supporters. ## `docs` -Opens the Better-T Stack documentation in your default browser. +Opens the Better-T-Stack documentation in your default browser. ```bash create-better-t-stack docs diff --git a/apps/web/content/docs/cli/options.mdx b/apps/web/content/docs/cli/options.mdx index f366c64..a32c598 100644 --- a/apps/web/content/docs/cli/options.mdx +++ b/apps/web/content/docs/cli/options.mdx @@ -91,7 +91,7 @@ create-better-t-stack --disable-analytics create-better-t-stack --no-disable-analytics ``` -Analytics help improve Better-T Stack by providing insights into usage patterns. When disabled, no data is collected or transmitted. +Analytics help improve Better-T-Stack by providing insights into usage patterns. When disabled, no data is collected or transmitted. ## Database Options diff --git a/apps/web/content/docs/cli/programmatic-api.mdx b/apps/web/content/docs/cli/programmatic-api.mdx index 034f67d..62d771a 100644 --- a/apps/web/content/docs/cli/programmatic-api.mdx +++ b/apps/web/content/docs/cli/programmatic-api.mdx @@ -1,11 +1,11 @@ --- title: Programmatic API -description: Use Better-T Stack programmatically in your Node.js applications +description: Use Better-T-Stack programmatically in your Node.js applications --- ## Overview -The Better-T Stack CLI can be used programmatically in your Node.js applications, allowing you to create projects, add features, and manage configurations through JavaScript/TypeScript code instead of shell commands. +The Better-T-Stack CLI can be used programmatically in your Node.js applications, allowing you to create projects, add features, and manage configurations through JavaScript/TypeScript code instead of shell commands. ## Installation @@ -78,13 +78,13 @@ const result = await init("my-private-project", { }); ``` -> **Note:** Analytics help improve Better-T Stack by providing insights into usage patterns. When disabled, no data is collected or transmitted. +> **Note:** Analytics help improve Better-T-Stack by providing insights into usage patterns. When disabled, no data is collected or transmitted. ## API Reference ### `init(projectName?, options?)` -Creates a new Better-T Stack project. +Creates a new Better-T-Stack project. **Parameters:** - `projectName` (string, optional): Project name or directory path @@ -104,7 +104,7 @@ const result = await init("my-project", { ### `sponsors()` -Display Better-T Stack sponsors (same as CLI). +Display Better-T-Stack sponsors (same as CLI). **Returns:** `Promise` diff --git a/apps/web/content/docs/project-structure.mdx b/apps/web/content/docs/project-structure.mdx index 81a5def..7db05de 100644 --- a/apps/web/content/docs/project-structure.mdx +++ b/apps/web/content/docs/project-structure.mdx @@ -1,11 +1,11 @@ --- title: Project Structure -description: Understanding the structure of projects created by Better-T Stack CLI +description: Understanding the structure of projects created by Better-T-Stack CLI --- ## Overview -Better-T Stack CLI scaffolds a monorepo with `apps/*` and, when needed, `packages/*`. The exact structure depends on your choices (frontend, backend, API, database/ORM, auth, addons, runtime, deploy). This page mirrors what the CLI actually writes. +Better-T-Stack CLI scaffolds a monorepo with `apps/*` and, when needed, `packages/*`. The exact structure depends on your choices (frontend, backend, API, database/ORM, auth, addons, runtime, deploy). This page mirrors what the CLI actually writes. ## Root layout @@ -242,7 +242,7 @@ apps/docs/ ## Configuration Files -### Better-T Stack Config (bts.jsonc) +### Better-T-Stack Config (bts.jsonc) ```json { diff --git a/apps/web/src/app/(home)/_components/footer.tsx b/apps/web/src/app/(home)/_components/footer.tsx index fa6ee50..f884380 100644 --- a/apps/web/src/app/(home)/_components/footer.tsx +++ b/apps/web/src/app/(home)/_components/footer.tsx @@ -10,7 +10,7 @@ const Footer = () => {

- Better-T Stack + Better-T-Stack

Type-safe, modern TypeScript scaffolding for full-stack web @@ -94,7 +94,7 @@ const Footer = () => {

- © {new Date().getFullYear()} Better-T Stack. All rights reserved. + © {new Date().getFullYear()} Better-T-Stack. All rights reserved.

Built with diff --git a/apps/web/src/app/(home)/_components/stats-section.tsx b/apps/web/src/app/(home)/_components/stats-section.tsx index 09e48fa..6073787 100644 --- a/apps/web/src/app/(home)/_components/stats-section.tsx +++ b/apps/web/src/app/(home)/_components/stats-section.tsx @@ -73,11 +73,11 @@ export default function StatsSection({

-
+
Last Updated - + {analyticsData?.lastUpdated || new Date().toLocaleDateString("en-US", { month: "short", @@ -134,11 +134,11 @@ export default function StatsSection({
-
+
Repository - + AmanVarshney01/create-better-t-stack
@@ -196,9 +196,9 @@ export default function StatsSection({
-
+
Package - + create-better-t-stack
diff --git a/apps/web/src/app/(home)/analytics/page.tsx b/apps/web/src/app/(home)/analytics/page.tsx index 66c1525..c1087e0 100644 --- a/apps/web/src/app/(home)/analytics/page.tsx +++ b/apps/web/src/app/(home)/analytics/page.tsx @@ -1,5 +1,30 @@ +import type { Metadata } from "next"; import AnalyticsPage from "./_components/analytics-page"; +export const metadata: Metadata = { + title: "Analytics - Better-T-Stack", + description: "Project creation analytics for Better-T-Stack.", + openGraph: { + title: "Analytics - Better-T-Stack", + description: "Project creation analytics for Better-T-Stack.", + url: "https://better-t-stack.dev/analytics", + images: [ + { + url: "https://r2.better-t-stack.dev/og.png", + width: 1200, + height: 630, + alt: "Better-T-Stack Analytics", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: "Analytics - Better-T-Stack", + description: "Project creation analytics for Better-T-Stack.", + images: ["https://r2.better-t-stack.dev/og.png"], + }, +}; + export default async function Analytics() { const response = await fetch( "https://r2.better-t-stack.dev/analytics-data.json", diff --git a/apps/web/src/app/(home)/new/layout.tsx b/apps/web/src/app/(home)/new/layout.tsx new file mode 100644 index 0000000..81b680b --- /dev/null +++ b/apps/web/src/app/(home)/new/layout.tsx @@ -0,0 +1,30 @@ +import type { Metadata } from "next"; +import type { ReactNode } from "react"; + +export const metadata: Metadata = { + title: "Stack Builder - Better-T-Stack", + description: "Interactive Ui to roll your own stack", + openGraph: { + title: "Stack Builder - Better-T-Stack", + description: "Interactive Ui to roll your own stack", + url: "https://better-t-stack.dev/new", + images: [ + { + url: "https://r2.better-t-stack.dev/og.png", + width: 1200, + height: 630, + alt: "Better-T-Stack Stack Builder", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: "Stack Builder - Better-T-Stack", + description: "Interactive Ui to roll your own stack", + images: ["https://r2.better-t-stack.dev/og.png"], + }, +}; + +export default function NewLayout({ children }: { children: ReactNode }) { + return children; +} diff --git a/apps/web/src/app/(home)/showcase/page.tsx b/apps/web/src/app/(home)/showcase/page.tsx index 7fe0edb..c9b0f12 100644 --- a/apps/web/src/app/(home)/showcase/page.tsx +++ b/apps/web/src/app/(home)/showcase/page.tsx @@ -2,8 +2,33 @@ export const dynamic = "force-static"; import { api } from "@better-t-stack/backend/convex/_generated/api"; import { fetchQuery } from "convex/nextjs"; +import type { Metadata } from "next"; import ShowcasePage from "./_components/showcase-page"; +export const metadata: Metadata = { + title: "Showcase - Better-T-Stack", + description: "Projects created with Better-T-Stack", + openGraph: { + title: "Showcase - Better-T-Stack", + description: "Projects created with Better-T-Stack", + url: "https://better-t-stack.dev/showcase", + images: [ + { + url: "https://r2.better-t-stack.dev/og.png", + width: 1200, + height: 630, + alt: "Better-T-Stack Showcase", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: "Showcase - Better-T-Stack", + description: "Projects created with Better-T-Stack", + images: ["https://r2.better-t-stack.dev/og.png"], + }, +}; + export default async function Showcase() { const showcaseProjects = await fetchQuery(api.showcase.getShowcaseProjects); return ; diff --git a/apps/web/src/app/docs-og/[...slug]/route.tsx b/apps/web/src/app/docs-og/[...slug]/route.tsx new file mode 100644 index 0000000..30b22e4 --- /dev/null +++ b/apps/web/src/app/docs-og/[...slug]/route.tsx @@ -0,0 +1,25 @@ +import { generateOGImage } from "fumadocs-ui/og"; +import { notFound } from "next/navigation"; +import { source } from "@/lib/source"; + +export async function GET( + _req: Request, + { params }: { params: Promise<{ slug: string[] }> }, +) { + const { slug } = await params; + const page = source.getPage(slug.slice(0, -1)); + if (!page) notFound(); + + return generateOGImage({ + title: page.data.title, + description: page.data.description, + site: "Better-T-Stack", + }); +} + +export function generateStaticParams() { + return source.generateParams().map((page) => ({ + ...page, + slug: [...page.slug, "image.png"], + })); +} diff --git a/apps/web/src/app/docs/[[...slug]]/page.tsx b/apps/web/src/app/docs/[[...slug]]/page.tsx index 9949ad1..6251ccc 100644 --- a/apps/web/src/app/docs/[[...slug]]/page.tsx +++ b/apps/web/src/app/docs/[[...slug]]/page.tsx @@ -49,8 +49,17 @@ export async function generateMetadata({ const { slug = [] } = await params; const page = source.getPage(slug); if (!page) notFound(); + + const image = `/docs-og/${slug.join("/")}/image.png`; return { title: page.data.title, description: page.data.description, + openGraph: { + images: image, + }, + twitter: { + card: "summary_large_image", + images: image, + }, }; } diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 9431a0c..925a538 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -19,11 +19,10 @@ const geistMono = Geist_Mono({ variable: "--font-geist-mono", }); -const ogImage = - "https://api.screenshothis.com/v1/screenshots/take?api_key=ss_live_NQJgRXqHcKPwnoMTuQmgiwLIGbVfihjpMyQhgsaMyNBHTyesvrxpYNXmdgcnxipc&url=https%3A%2F%2Fbetter-t-stack.dev%2F&width=1200&height=630&block_ads=true&block_cookie_banners=true&block_trackers=true&device_scale_factor=0.65&prefers_color_scheme=dark&is_cached=true&cache_key=cbts2"; +const ogImage = "https://r2.better-t-stack.dev/og.png"; export const metadata: Metadata = { - title: "Better-T Stack", + title: "Better-T-Stack", description: "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations", keywords: [ @@ -43,12 +42,12 @@ export const metadata: Metadata = { "Better-Auth", "convex", "monorepo", - "Better-T Stack", + "Better-T-Stack", "create-better-t-stack", ], - authors: [{ name: "Better-T Stack Team" }], - creator: "Better-T Stack", - publisher: "Better-T Stack", + authors: [{ name: "Better-T-Stack Team" }], + creator: "Better-T-Stack", + publisher: "Better-T-Stack", formatDetection: { email: false, telephone: false, @@ -58,17 +57,17 @@ export const metadata: Metadata = { canonical: "/", }, openGraph: { - title: "Better-T Stack", + title: "Better-T-Stack", description: "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations", url: "https://better-t-stack.dev", - siteName: "Better-T Stack", + siteName: "Better-T-Stack", images: [ { url: ogImage, width: 1200, height: 630, - alt: "Better-T Stack", + alt: "Better-T-Stack", }, ], locale: "en_US", @@ -76,7 +75,7 @@ export const metadata: Metadata = { }, twitter: { card: "summary_large_image", - title: "Better-T Stack", + title: "Better-T-Stack", description: "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations", images: [ogImage],