Skip to content

Commit 1ad6c09

Browse files
committed
feat: enhance SEO and metadata structure
- Updated JSON-LD schemas for improved SEO with multiple structured data types (WebApplication, Organization, Website). - Added robots.txt and sitemap generation for better search engine indexing. - Enhanced page metadata for Sign In, Sign Up, and About pages to include Open Graph and Twitter card data. - Refactored metadata utility to support new schema structure and improved descriptions.
1 parent 9c9c590 commit 1ad6c09

8 files changed

Lines changed: 292 additions & 22 deletions

File tree

apps/collabydraw/app/(auth-layout)/auth/signin/page.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@ import ScreenLoading from "@/components/ScreenLoading";
33
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
44
import Link from "next/link";
55
import { Suspense } from "react";
6+
import type { Metadata } from "next";
7+
8+
export const metadata: Metadata = {
9+
title: "Sign In | Collabydraw",
10+
description: "Sign in to your Collabydraw account to access your collaborative whiteboard rooms.",
11+
robots: {
12+
index: false,
13+
follow: false,
14+
googleBot: {
15+
index: false,
16+
follow: false,
17+
},
18+
},
19+
openGraph: {
20+
title: "Sign In | Collabydraw",
21+
description: "Sign in to your Collabydraw account",
22+
url: "https://collabydraw.xyz/auth/signin",
23+
},
24+
alternates: {
25+
canonical: "https://collabydraw.xyz/auth/signin",
26+
},
27+
};
628

729
export default function SignInPage() {
830
return (

apps/collabydraw/app/(auth-layout)/auth/signup/page.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
import { SignUpForm } from "@/components/auth/signup-form";
22
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
33
import Link from "next/link";
4+
import type { Metadata } from "next";
5+
6+
export const metadata: Metadata = {
7+
title: "Sign Up | Collabydraw",
8+
description: "Create a new Collabydraw account to start collaborating on secure, end-to-end encrypted whiteboards.",
9+
robots: {
10+
index: false,
11+
follow: false,
12+
googleBot: {
13+
index: false,
14+
follow: false,
15+
},
16+
},
17+
openGraph: {
18+
title: "Sign Up | Collabydraw",
19+
description: "Create a new Collabydraw account",
20+
url: "https://collabydraw.xyz/auth/signup",
21+
},
22+
alternates: {
23+
canonical: "https://collabydraw.xyz/auth/signup",
24+
},
25+
};
426

527
export default function SignUpPage() {
628
return (

apps/collabydraw/app/(main)/page.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
import CanvasBoard from "@/components/canvas/CanvasBoard";
2+
import type { Metadata } from "next";
3+
import { baseMetadata } from "@/utils/metadata";
4+
5+
export const metadata: Metadata = {
6+
...baseMetadata,
7+
title: "Collabydraw | Hand-drawn look & feel • Collaborative • Secure",
8+
description:
9+
"Create beautiful hand-drawn sketches and diagrams with real-time collaboration. End-to-end encrypted, privacy-focused collaborative whiteboard. No account required to start drawing.",
10+
openGraph: {
11+
...baseMetadata.openGraph,
12+
title: "Collabydraw | Hand-drawn look & feel • Collaborative • Secure",
13+
description:
14+
"Create beautiful hand-drawn sketches and diagrams with real-time collaboration. End-to-end encrypted, privacy-focused collaborative whiteboard.",
15+
url: "https://collabydraw.xyz",
16+
},
17+
twitter: {
18+
...baseMetadata.twitter,
19+
title: "Collabydraw | Hand-drawn look & feel • Collaborative • Secure",
20+
description:
21+
"Create beautiful hand-drawn sketches and diagrams with real-time collaboration. End-to-end encrypted, privacy-focused collaborative whiteboard.",
22+
},
23+
alternates: {
24+
canonical: "https://collabydraw.xyz",
25+
},
26+
};
227

328
export default async function Home() {
429
return (

apps/collabydraw/app/(site)/about/page.tsx

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,62 @@
11
import React from "react";
2+
import type { Metadata } from "next";
3+
import { baseMetadata } from "@/utils/metadata";
4+
import Script from "next/script";
5+
6+
export const metadata: Metadata = {
7+
...baseMetadata,
8+
title: "About Collabydraw",
9+
description:
10+
"Learn about Collabydraw - a secure, end-to-end encrypted collaborative whiteboard tool. Discover features, privacy, encryption, and how it works.",
11+
openGraph: {
12+
...baseMetadata.openGraph,
13+
title: "About Collabydraw",
14+
description:
15+
"Learn about Collabydraw - a secure, end-to-end encrypted collaborative whiteboard tool. Discover features, privacy, encryption, and how it works.",
16+
url: "https://collabydraw.xyz/about",
17+
},
18+
twitter: {
19+
...baseMetadata.twitter,
20+
title: "About Collabydraw",
21+
description:
22+
"Learn about Collabydraw - a secure, end-to-end encrypted collaborative whiteboard tool. Discover features, privacy, encryption, and how it works.",
23+
},
24+
alternates: {
25+
canonical: "https://collabydraw.xyz/about",
26+
},
27+
};
28+
29+
const aboutPageSchema = {
30+
"@context": "https://schema.org",
31+
"@type": "AboutPage",
32+
name: "About Collabydraw",
33+
url: "https://collabydraw.xyz/about",
34+
description:
35+
"Collabydraw is a web-based collaborative whiteboard where multiple users can draw, edit, and brainstorm together in real time.",
36+
mainEntity: {
37+
"@type": "SoftwareApplication",
38+
name: "Collabydraw",
39+
applicationCategory: "ProductivityApplication",
40+
operatingSystem: "Web Browser",
41+
offers: {
42+
"@type": "Offer",
43+
price: "0",
44+
priceCurrency: "USD",
45+
},
46+
},
47+
};
248

349
export default function AboutPage() {
450
return (
5-
<div className="space-y-xl bg-page-gradient-purple py-40">
51+
<>
52+
<Script
53+
id="about-page-schema"
54+
type="application/ld+json"
55+
dangerouslySetInnerHTML={{
56+
__html: JSON.stringify(aboutPageSchema),
57+
}}
58+
/>
59+
<div className="space-y-xl bg-page-gradient-purple py-40">
660
<section className="container max-w-screen-md space-y-sm text-color-primary-text">
761
<h1 className="text-4xl sm:text-4xl lg:text-6xl font-semibold mb-6 text-center font-assistant">
862
About CollabyDraw
@@ -127,5 +181,6 @@ export default function AboutPage() {
127181
</div>
128182
</section>
129183
</div>
184+
</>
130185
);
131186
}

apps/collabydraw/app/layout.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "./globals.css";
44
import Provider from "./provider";
55
import { Toaster } from "sonner";
66
import { ThemeProvider } from "@/components/theme-provider";
7-
import { baseMetadata, jsonLdSchema } from "@/utils/metadata";
7+
import { baseMetadata, jsonLdSchemas } from "@/utils/metadata";
88
import Script from "next/script";
99
import { Analytics } from "@vercel/analytics/react"
1010

@@ -55,10 +55,23 @@ export default function RootLayout({
5555
`,
5656
}}
5757
/>
58+
{/* Multiple JSON-LD Schemas for better SEO */}
5859
<script
5960
type="application/ld+json"
6061
dangerouslySetInnerHTML={{
61-
__html: JSON.stringify(jsonLdSchema)
62+
__html: JSON.stringify(jsonLdSchemas.webApplication)
63+
}}
64+
/>
65+
<script
66+
type="application/ld+json"
67+
dangerouslySetInnerHTML={{
68+
__html: JSON.stringify(jsonLdSchemas.organization)
69+
}}
70+
/>
71+
<script
72+
type="application/ld+json"
73+
dangerouslySetInnerHTML={{
74+
__html: JSON.stringify(jsonLdSchemas.website)
6275
}}
6376
/>
6477
</head>

apps/collabydraw/app/robots.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { MetadataRoute } from "next";
2+
3+
export default function robots(): MetadataRoute.Robots {
4+
const baseUrl = "https://collabydraw.xyz";
5+
6+
return {
7+
rules: [
8+
{
9+
userAgent: "*",
10+
allow: "/",
11+
disallow: [
12+
"/api/",
13+
"/auth/",
14+
],
15+
},
16+
{
17+
userAgent: "Googlebot",
18+
allow: "/",
19+
disallow: ["/api/"],
20+
},
21+
],
22+
sitemap: `${baseUrl}/sitemap.xml`,
23+
};
24+
}

apps/collabydraw/app/sitemap.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { MetadataRoute } from "next";
2+
3+
export default function sitemap(): MetadataRoute.Sitemap {
4+
const baseUrl = "https://collabydraw.xyz";
5+
const currentDate = new Date();
6+
7+
return [
8+
{
9+
url: baseUrl,
10+
lastModified: currentDate,
11+
changeFrequency: "weekly",
12+
priority: 1.0,
13+
},
14+
{
15+
url: `${baseUrl}/about`,
16+
lastModified: currentDate,
17+
changeFrequency: "monthly",
18+
priority: 0.8,
19+
},
20+
{
21+
url: `${baseUrl}/auth/signin`,
22+
lastModified: currentDate,
23+
changeFrequency: "monthly",
24+
priority: 0.5,
25+
},
26+
{
27+
url: `${baseUrl}/auth/signup`,
28+
lastModified: currentDate,
29+
changeFrequency: "monthly",
30+
priority: 0.5,
31+
},
32+
];
33+
}

0 commit comments

Comments
 (0)