From 3b567e2a117ea9a4b0c1a946c28e618cabf7e40d Mon Sep 17 00:00:00 2001 From: A-Hazzard Date: Fri, 8 Nov 2024 14:23:00 -0400 Subject: [PATCH] SEO --- app/layout.tsx | 19 +++----- app/manifest.ts | 25 ++++++++++ app/metadata.ts | 23 +++++++++ app/providers.tsx | 6 +++ app/robots.ts | 16 +++++++ app/sitemap.ts | 87 +++++++++++++++++++++++++++++++++++ components/StructuredData.tsx | 27 +++++++++++ 7 files changed, 191 insertions(+), 12 deletions(-) create mode 100644 app/manifest.ts create mode 100644 app/metadata.ts create mode 100644 app/providers.tsx create mode 100644 app/robots.ts create mode 100644 app/sitemap.ts create mode 100644 components/StructuredData.tsx diff --git a/app/layout.tsx b/app/layout.tsx index bf1b3bc..449e7c1 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,6 @@ -import type { Metadata } from "next"; import "./globals.css"; -import { NextUIProvider } from "@nextui-org/react"; +import { Providers } from "./providers"; +import { Metadata } from "next"; export const metadata: Metadata = { title: "Digital Utopia - Empower Your Financial Journey", @@ -9,11 +9,11 @@ export const metadata: Metadata = { openGraph: { title: "Digital Utopia", description: "Empower your financial journey with Digital Utopia.", - url: "https://digital-utopia.vercel.app", + url: "https://digitalutopia.app", siteName: "Digital Utopia", images: [ { - url: "https://digital-utopia.vercel.app/logo.svg", + url: "https://digitalutopia.app/logo.png", width: 800, height: 600, alt: "Digital Utopia", @@ -22,13 +22,8 @@ export const metadata: Metadata = { locale: "en_US", type: "website", }, - twitter: { - card: "summary_large_image", - title: "Digital Utopia", - description: "Empower your financial journey with Digital Utopia.", - images: ["https://digital-utopia.vercel.app/logo.svg"], - }, }; + export default function RootLayout({ children, }: Readonly<{ @@ -37,9 +32,9 @@ export default function RootLayout({ return ( - + {children} - + ); diff --git a/app/manifest.ts b/app/manifest.ts new file mode 100644 index 0000000..d33efe6 --- /dev/null +++ b/app/manifest.ts @@ -0,0 +1,25 @@ +import { MetadataRoute } from 'next' + +export default function manifest(): MetadataRoute.Manifest { + return { + name: 'Digital Utopia', + short_name: 'Digital Utopia', + description: 'Secure crypto trading platform', + start_url: '/', + display: 'standalone', + background_color: '#000000', + theme_color: '#000000', + icons: [ + { + src: '/logo.png', + sizes: '192x192', + type: 'image/png', + }, + { + src: '/logo.png', + sizes: '512x512', + type: 'image/png', + }, + ], + } +} \ No newline at end of file diff --git a/app/metadata.ts b/app/metadata.ts new file mode 100644 index 0000000..8595b98 --- /dev/null +++ b/app/metadata.ts @@ -0,0 +1,23 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "Digital Utopia - Empower Your Financial Journey", + description: "Join Digital Utopia to start your crypto journey, become a profitable trader, and access exclusive financial services.", + keywords: "crypto, trading, financial independence, copy trading, digital opportunities, deposit, withdraw, invoices", + openGraph: { + title: "Digital Utopia", + description: "Empower your financial journey with Digital Utopia.", + url: "https://digitalutopia.app", + siteName: "Digital Utopia", + images: [ + { + url: "https://digitalutopia.app/logo.svg", + width: 800, + height: 600, + alt: "Digital Utopia", + }, + ], + locale: "en_US", + type: "website", + }, +}; \ No newline at end of file diff --git a/app/providers.tsx b/app/providers.tsx new file mode 100644 index 0000000..9c06184 --- /dev/null +++ b/app/providers.tsx @@ -0,0 +1,6 @@ + +import { NextUIProvider } from "@nextui-org/react"; + +export function Providers({ children }: { children: React.ReactNode }) { + return {children}; +} \ No newline at end of file diff --git a/app/robots.ts b/app/robots.ts new file mode 100644 index 0000000..65c489f --- /dev/null +++ b/app/robots.ts @@ -0,0 +1,16 @@ +import { MetadataRoute } from 'next' + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: '*', + allow: '/', + disallow: [ + '/admin/*', + '/api/*', + '/private/*', + ], + }, + sitemap: 'https://digitalutopia.app/sitemap.xml', + } +} \ No newline at end of file diff --git a/app/sitemap.ts b/app/sitemap.ts new file mode 100644 index 0000000..6b8a38a --- /dev/null +++ b/app/sitemap.ts @@ -0,0 +1,87 @@ +import { MetadataRoute } from 'next' + +export default function sitemap(): MetadataRoute.Sitemap { + const baseUrl = 'https://digitalutopia.app' // Replace with your actual domain + + return [ + { + url: `${baseUrl}`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 1, + }, + { + url: `${baseUrl}/login`, + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: `${baseUrl}/register`, + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: `${baseUrl}/forgot-password`, + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.5, + }, + { + url: `${baseUrl}/resources`, + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 0.9, + }, + { + url: `${baseUrl}/invoices`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.8, + }, + { + url: `${baseUrl}/withdrawals`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.8, + }, + // Admin routes + { + url: `${baseUrl}/admin/user-management`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.7, + }, + { + url: `${baseUrl}/admin/invoices`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.7, + }, + { + url: `${baseUrl}/admin/deposits`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.7, + }, + { + url: `${baseUrl}/admin/withdrawals`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.7, + }, + { + url: `${baseUrl}/admin/trades`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.7, + }, + { + url: `${baseUrl}/admin/manage-resources`, + lastModified: new Date(), + changeFrequency: 'daily', + priority: 0.7, + }, + ] +} \ No newline at end of file diff --git a/components/StructuredData.tsx b/components/StructuredData.tsx new file mode 100644 index 0000000..f412a8e --- /dev/null +++ b/components/StructuredData.tsx @@ -0,0 +1,27 @@ +export default function StructuredData() { + const jsonLd = { + '@context': 'https://schema.org', + '@type': 'WebApplication', + name: 'Digital Utopia', + applicationCategory: 'FinanceApplication', + operatingSystem: 'Web', + description: 'Digital Utopia is a secure crypto trading platform offering seamless trading experiences with real-time market data and advanced trading tools.', + offers: { + '@type': 'Offer', + price: '0', + priceCurrency: 'USD', + }, + author: { + '@type': 'Organization', + name: 'Digital Utopia', + url: 'https://digitalutopia.app', + }, + } + + return ( +