2026-02-06 19:43:14 +05:30
|
|
|
|
import type { Metadata, Viewport } from "next";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
import "./globals.css";
|
2025-12-20 04:24:40 -08:00
|
|
|
|
import { RootProvider } from "fumadocs-ui/provider/next";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
import { Roboto } from "next/font/google";
|
2026-02-12 16:12:45 -08:00
|
|
|
|
import { AnnouncementToastProvider } from "@/components/announcements/AnnouncementToastProvider";
|
2026-01-25 16:15:25 +05:30
|
|
|
|
import { GlobalLoadingProvider } from "@/components/providers/GlobalLoadingProvider";
|
2025-10-27 20:30:10 -07:00
|
|
|
|
import { I18nProvider } from "@/components/providers/I18nProvider";
|
2025-12-25 13:53:41 -08:00
|
|
|
|
import { PostHogProvider } from "@/components/providers/PostHogProvider";
|
2026-03-24 16:07:28 +02:00
|
|
|
|
import { ZeroProvider } from "@/components/providers/ZeroProvider";
|
2026-04-14 21:26:00 -07:00
|
|
|
|
import {
|
|
|
|
|
|
OrganizationJsonLd,
|
|
|
|
|
|
SoftwareApplicationJsonLd,
|
|
|
|
|
|
WebSiteJsonLd,
|
|
|
|
|
|
} from "@/components/seo/json-ld";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
import { ThemeProvider } from "@/components/theme/theme-provider";
|
2025-07-27 10:05:37 -07:00
|
|
|
|
import { Toaster } from "@/components/ui/sonner";
|
feat(i18n): Add next-intl framework with full bilingual support (EN/ZH)
- Implement next-intl framework for scalable i18n
- Add complete Chinese (Simplified) localization
- Support 400+ translated strings across all pages
- Add language switcher with persistent preference
- Zero breaking changes to existing functionality
Framework additions:
- i18n routing and middleware
- LocaleContext for client-side state
- LanguageSwitcher component
- Translation files (en.json, zh.json)
Translated components:
- Homepage: Hero, features, CTA, navbar
- Auth: Login, register
- Dashboard: Main page, layout
- Connectors: Management, add page (all categories)
- Documents: Upload, manage, filters
- Settings: LLM configs, role assignments
- Onboarding: Add provider, assign roles
- Logs: Task logs viewer
Adding a new language now requires only:
1. Create messages/<locale>.json
2. Add locale to i18n/routing.ts
2025-10-26 14:05:46 +08:00
|
|
|
|
import { LocaleProvider } from "@/contexts/LocaleContext";
|
2026-04-07 00:43:40 -07:00
|
|
|
|
import { PlatformProvider } from "@/contexts/platform-context";
|
2025-11-11 04:02:04 +02:00
|
|
|
|
import { ReactQueryClientProvider } from "@/lib/query-client/query-client.provider";
|
2025-10-27 20:30:10 -07:00
|
|
|
|
import { cn } from "@/lib/utils";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
|
2025-07-27 10:05:37 -07:00
|
|
|
|
const roboto = Roboto({
|
|
|
|
|
|
subsets: ["latin"],
|
|
|
|
|
|
weight: ["400", "500", "700"],
|
|
|
|
|
|
display: "swap",
|
|
|
|
|
|
variable: "--font-roboto",
|
2025-04-07 23:47:06 -07:00
|
|
|
|
});
|
|
|
|
|
|
|
2026-02-06 19:43:14 +05:30
|
|
|
|
/**
|
|
|
|
|
|
* Viewport configuration for mobile keyboard handling.
|
|
|
|
|
|
* - interactiveWidget: 'resizes-content' tells mobile browsers (especially Chrome Android)
|
|
|
|
|
|
* to resize the CSS layout viewport when the virtual keyboard opens, so sticky elements
|
|
|
|
|
|
* (like the chat input bar) stay visible above the keyboard.
|
|
|
|
|
|
* - viewportFit: 'cover' enables env(safe-area-inset-*) for notched/home-indicator devices.
|
|
|
|
|
|
*/
|
|
|
|
|
|
export const viewport: Viewport = {
|
|
|
|
|
|
width: "device-width",
|
|
|
|
|
|
initialScale: 1,
|
|
|
|
|
|
viewportFit: "cover",
|
|
|
|
|
|
interactiveWidget: "resizes-content",
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-04-07 23:47:06 -07:00
|
|
|
|
export const metadata: Metadata = {
|
2026-04-11 23:38:12 -07:00
|
|
|
|
metadataBase: new URL("https://surfsense.com"),
|
|
|
|
|
|
alternates: {
|
|
|
|
|
|
canonical: "https://surfsense.com",
|
|
|
|
|
|
},
|
2026-04-21 01:33:58 -07:00
|
|
|
|
title: "SurfSense – Open Source, Privacy-Focused NotebookLM Alternative for Teams",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
description:
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"Open source NotebookLM alternative for teams with no data limits. Use ChatGPT, Claude AI, and any AI model for free.",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
keywords: [
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"chatgpt online",
|
|
|
|
|
|
"online chatgpt",
|
|
|
|
|
|
"chat gpt free",
|
|
|
|
|
|
"chatgpt free",
|
|
|
|
|
|
"free chatgpt",
|
|
|
|
|
|
"free chat gpt",
|
|
|
|
|
|
"chatgpt no login",
|
|
|
|
|
|
"chatgpt online free",
|
|
|
|
|
|
"chatgpt free online",
|
|
|
|
|
|
"chatgpt without login",
|
|
|
|
|
|
"free chatgpt without login",
|
|
|
|
|
|
"free chatgpt no login",
|
|
|
|
|
|
"chatgpt for free",
|
|
|
|
|
|
"claude ai free",
|
|
|
|
|
|
"claude free",
|
|
|
|
|
|
"free claude ai",
|
|
|
|
|
|
"free claude",
|
2026-03-09 22:08:28 -07:00
|
|
|
|
"chatgpt alternative free",
|
|
|
|
|
|
"free chatgpt alternative",
|
|
|
|
|
|
"free alternative to chatgpt",
|
|
|
|
|
|
"alternative to chatgpt free",
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"chatgpt alternative online free",
|
|
|
|
|
|
"ai like chatgpt",
|
|
|
|
|
|
"sites like chatgpt",
|
2026-03-09 22:08:28 -07:00
|
|
|
|
"free ai chatbot like chatgpt",
|
|
|
|
|
|
"apps like chatgpt for free",
|
|
|
|
|
|
"free ai chatbots like chatgpt",
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"best free alternative to chatgpt",
|
2026-03-09 22:08:28 -07:00
|
|
|
|
"free chatgpt alternative app",
|
|
|
|
|
|
"free chatgpt alternative with image upload",
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"free ai apps",
|
|
|
|
|
|
"ai with no restrictions",
|
|
|
|
|
|
"notebooklm alternative",
|
2026-03-09 22:08:28 -07:00
|
|
|
|
"notebooklm alternative for teams",
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"open source notebooklm alternative",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
"SurfSense",
|
|
|
|
|
|
],
|
|
|
|
|
|
openGraph: {
|
2026-04-21 01:33:58 -07:00
|
|
|
|
title: "SurfSense – Open Source, Privacy-Focused NotebookLM Alternative for Teams",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
description:
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"Open source NotebookLM alternative for teams with no data limits. Use ChatGPT, Claude, and any AI model for free.",
|
2025-12-09 01:27:13 -08:00
|
|
|
|
url: "https://surfsense.com",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
siteName: "SurfSense",
|
|
|
|
|
|
type: "website",
|
|
|
|
|
|
images: [
|
|
|
|
|
|
{
|
2026-04-11 23:38:12 -07:00
|
|
|
|
url: "/og-image.png",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
width: 1200,
|
|
|
|
|
|
height: 630,
|
2026-04-11 23:38:12 -07:00
|
|
|
|
alt: "SurfSense - Open Source NotebookLM Alternative with Free ChatGPT and Claude AI",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
locale: "en_US",
|
|
|
|
|
|
},
|
|
|
|
|
|
twitter: {
|
|
|
|
|
|
card: "summary_large_image",
|
2026-04-21 01:33:58 -07:00
|
|
|
|
title: "SurfSense – Open Source, Privacy-Focused NotebookLM Alternative for Teams",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
description:
|
2026-04-11 23:38:12 -07:00
|
|
|
|
"Open source NotebookLM alternative for teams with no data limits. Use ChatGPT, Claude AI, and any AI model for free.",
|
|
|
|
|
|
creator: "@SurfSenseAI",
|
|
|
|
|
|
site: "@SurfSenseAI",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
images: [
|
|
|
|
|
|
{
|
2026-04-11 23:38:12 -07:00
|
|
|
|
url: "/og-image-twitter.png",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
width: 1200,
|
|
|
|
|
|
height: 630,
|
2026-04-11 23:38:12 -07:00
|
|
|
|
alt: "SurfSense - Open Source NotebookLM Alternative with Free ChatGPT and Claude AI",
|
2025-07-27 10:05:37 -07:00
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
2025-04-07 23:47:06 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
feat(i18n): Add next-intl framework with full bilingual support (EN/ZH)
- Implement next-intl framework for scalable i18n
- Add complete Chinese (Simplified) localization
- Support 400+ translated strings across all pages
- Add language switcher with persistent preference
- Zero breaking changes to existing functionality
Framework additions:
- i18n routing and middleware
- LocaleContext for client-side state
- LanguageSwitcher component
- Translation files (en.json, zh.json)
Translated components:
- Homepage: Hero, features, CTA, navbar
- Auth: Login, register
- Dashboard: Main page, layout
- Connectors: Management, add page (all categories)
- Documents: Upload, manage, filters
- Settings: LLM configs, role assignments
- Onboarding: Add provider, assign roles
- Logs: Task logs viewer
Adding a new language now requires only:
1. Create messages/<locale>.json
2. Add locale to i18n/routing.ts
2025-10-26 14:05:46 +08:00
|
|
|
|
export default function RootLayout({
|
2025-07-27 10:05:37 -07:00
|
|
|
|
children,
|
2025-04-07 23:47:06 -07:00
|
|
|
|
}: Readonly<{
|
2025-07-27 10:05:37 -07:00
|
|
|
|
children: React.ReactNode;
|
2025-04-07 23:47:06 -07:00
|
|
|
|
}>) {
|
feat(i18n): Add next-intl framework with full bilingual support (EN/ZH)
- Implement next-intl framework for scalable i18n
- Add complete Chinese (Simplified) localization
- Support 400+ translated strings across all pages
- Add language switcher with persistent preference
- Zero breaking changes to existing functionality
Framework additions:
- i18n routing and middleware
- LocaleContext for client-side state
- LanguageSwitcher component
- Translation files (en.json, zh.json)
Translated components:
- Homepage: Hero, features, CTA, navbar
- Auth: Login, register
- Dashboard: Main page, layout
- Connectors: Management, add page (all categories)
- Documents: Upload, manage, filters
- Settings: LLM configs, role assignments
- Onboarding: Add provider, assign roles
- Logs: Task logs viewer
Adding a new language now requires only:
1. Create messages/<locale>.json
2. Add locale to i18n/routing.ts
2025-10-26 14:05:46 +08:00
|
|
|
|
// Using client-side i18n
|
|
|
|
|
|
// Language can be switched dynamically through LanguageSwitcher component
|
|
|
|
|
|
// Locale state is managed by LocaleContext and persisted in localStorage
|
2025-07-27 10:05:37 -07:00
|
|
|
|
return (
|
|
|
|
|
|
<html lang="en" suppressHydrationWarning>
|
2026-03-08 17:48:09 -07:00
|
|
|
|
<head>
|
|
|
|
|
|
<link rel="preconnect" href="https://api.github.com" />
|
2026-04-11 23:38:12 -07:00
|
|
|
|
<OrganizationJsonLd />
|
|
|
|
|
|
<WebSiteJsonLd />
|
|
|
|
|
|
<SoftwareApplicationJsonLd />
|
2026-03-08 17:48:09 -07:00
|
|
|
|
</head>
|
2025-11-11 04:02:04 +02:00
|
|
|
|
<body className={cn(roboto.className, "bg-white dark:bg-black antialiased h-full w-full ")}>
|
2025-12-25 13:53:41 -08:00
|
|
|
|
<PostHogProvider>
|
|
|
|
|
|
<LocaleProvider>
|
|
|
|
|
|
<I18nProvider>
|
|
|
|
|
|
<ThemeProvider
|
|
|
|
|
|
attribute="class"
|
|
|
|
|
|
enableSystem
|
|
|
|
|
|
disableTransitionOnChange
|
2026-02-03 17:02:26 -05:00
|
|
|
|
defaultTheme="system"
|
2025-12-25 13:53:41 -08:00
|
|
|
|
>
|
2026-04-07 00:43:40 -07:00
|
|
|
|
<PlatformProvider>
|
|
|
|
|
|
<RootProvider>
|
|
|
|
|
|
<ReactQueryClientProvider>
|
|
|
|
|
|
<ZeroProvider>
|
|
|
|
|
|
<GlobalLoadingProvider>{children}</GlobalLoadingProvider>
|
|
|
|
|
|
</ZeroProvider>
|
|
|
|
|
|
</ReactQueryClientProvider>
|
|
|
|
|
|
<Toaster />
|
|
|
|
|
|
<AnnouncementToastProvider />
|
|
|
|
|
|
</RootProvider>
|
|
|
|
|
|
</PlatformProvider>
|
2025-12-25 13:53:41 -08:00
|
|
|
|
</ThemeProvider>
|
|
|
|
|
|
</I18nProvider>
|
|
|
|
|
|
</LocaleProvider>
|
|
|
|
|
|
</PostHogProvider>
|
2025-07-27 10:05:37 -07:00
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
|
|
);
|
2025-04-07 23:47:06 -07:00
|
|
|
|
}
|