Spaces:
Configuration error
Configuration error
| import type { Metadata } from "next" | |
| import "./globals.css" | |
| import { Suspense } from "react" | |
| import { Inter, Playfair_Display, JetBrains_Mono } from "next/font/google" | |
| import { ThemeProvider } from "@/components/providers/theme-provider" | |
| import { AuthProvider } from "@/components/providers/auth-provider" | |
| import { ServiceWorkerRegistration } from "@/components/providers/service-worker" | |
| import { OllamaProvider } from "@/contexts/ollama-context" | |
| import { Header } from "@/components/layout/header" | |
| import { Footer } from "@/components/layout/footer" | |
| import { KeyboardShortcuts } from "@/components/layout/keyboard-shortcuts" | |
| import { OnboardingTour } from "@/components/onboarding/onboarding-tour" | |
| import { generateWebsiteSchema, generateOrganizationSchema, generateSoftwareApplicationSchema } from "@/lib/seo" | |
| // Validate environment on import (dev only) | |
| import "@/lib/env" | |
| const inter = Inter({ | |
| subsets: ["latin"], | |
| variable: "--font-inter", | |
| display: "swap", | |
| }) | |
| const playfair = Playfair_Display({ | |
| subsets: ["latin"], | |
| variable: "--font-playfair", | |
| display: "swap", | |
| }) | |
| const jetbrainsMono = JetBrains_Mono({ | |
| subsets: ["latin"], | |
| variable: "--font-jetbrains", | |
| display: "swap", | |
| }) | |
| const BASE_URL = process.env.NEXT_PUBLIC_APP_URL || 'https://open-prompt.netlify.app' | |
| export const metadata: Metadata = { | |
| metadataBase: new URL(BASE_URL), | |
| title: { | |
| default: "OpenPrompt | The GitHub for AI Prompts", | |
| template: "%s | OpenPrompt", | |
| }, | |
| description: "Transform AI prompts into shareable micro-apps. Create, remix, and run prompts with zero friction. 177+ AI tools, multi-model support, and browser extension.", | |
| keywords: [ | |
| "AI prompts", | |
| "prompt engineering", | |
| "ChatGPT prompts", | |
| "Claude prompts", | |
| "Gemini prompts", | |
| "AI tools", | |
| "prompt marketplace", | |
| "micro-apps", | |
| "GPT-4", | |
| "prompt optimizer", | |
| "AI writing tools", | |
| "prompt templates", | |
| "Midjourney prompts", | |
| "DALL-E prompts", | |
| "Stable Diffusion prompts", | |
| ], | |
| authors: [{ name: "Anky9972", url: "https://github.com/Anky9972" }], | |
| creator: "OpenPrompt", | |
| publisher: "OpenPrompt", | |
| robots: { | |
| index: true, | |
| follow: true, | |
| googleBot: { | |
| index: true, | |
| follow: true, | |
| "max-video-preview": -1, | |
| "max-image-preview": "large", | |
| "max-snippet": -1, | |
| }, | |
| }, | |
| openGraph: { | |
| title: "OpenPrompt | The GitHub for AI Prompts", | |
| description: "Transform AI prompts into shareable micro-apps. 177+ AI tools, multi-model support, and browser extension.", | |
| url: BASE_URL, | |
| siteName: "OpenPrompt", | |
| images: [ | |
| { | |
| url: `${BASE_URL}/api/og?title=OpenPrompt&description=The+GitHub+for+AI+Prompts`, | |
| width: 1200, | |
| height: 630, | |
| alt: "OpenPrompt - The GitHub for AI Prompts", | |
| }, | |
| ], | |
| locale: "en_US", | |
| type: "website", | |
| }, | |
| twitter: { | |
| card: "summary_large_image", | |
| title: "OpenPrompt | The GitHub for AI Prompts", | |
| description: "Transform AI prompts into shareable micro-apps. 177+ AI tools, multi-model support.", | |
| creator: "@anky_vivek", | |
| site: "@openprompt", | |
| images: [`${BASE_URL}/api/og?title=OpenPrompt&description=The+GitHub+for+AI+Prompts`], | |
| }, | |
| icons: { | |
| icon: [ | |
| { url: "/logos/logo.svg", type: "image/svg+xml" }, | |
| { url: "/favicon.ico", sizes: "32x32" }, | |
| ], | |
| shortcut: "/logos/logo.svg", | |
| apple: [ | |
| { url: "/logos/icon.png", sizes: "180x180" }, | |
| ], | |
| other: [ | |
| { | |
| rel: "apple-touch-icon-precomposed", | |
| url: "/logos/icon.png", | |
| }, | |
| { | |
| rel: "mask-icon", | |
| url: "/logos/logo.svg", | |
| color: "#6366f1", | |
| }, | |
| ], | |
| }, | |
| manifest: "/manifest.json", | |
| alternates: { | |
| canonical: BASE_URL, | |
| }, | |
| verification: { | |
| google: "google60f35921954050fd", | |
| }, | |
| category: "technology", | |
| classification: "AI Tools, Productivity, Developer Tools", | |
| } | |
| export default function RootLayout({ | |
| children, | |
| }: Readonly<{ | |
| children: React.ReactNode | |
| }>) { | |
| const websiteSchema = generateWebsiteSchema() | |
| const organizationSchema = generateOrganizationSchema() | |
| const softwareSchema = generateSoftwareApplicationSchema() | |
| return ( | |
| <html lang="en" className={`${inter.variable} ${playfair.variable} ${jetbrainsMono.variable}`} suppressHydrationWarning> | |
| <head> | |
| {/* JSON-LD Structured Data */} | |
| <script | |
| type="application/ld+json" | |
| dangerouslySetInnerHTML={{ __html: JSON.stringify(websiteSchema) }} | |
| /> | |
| ) | |
| } | |