The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
www: product pages (#47271)
Francesco Sansalvadorecd62b0b9d41d
diff --git a/apps/www/app/(products)/_shared/QuoteSection.tsx b/apps/www/app/(products)/_shared/QuoteSection.tsxnew file mode 100644index 00000000000..9db9e4db4ca--- /dev/null+++ b/apps/www/app/(products)/_shared/QuoteSection.tsx@@ -0,0 +1,56 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Image from 'next/image'+import Link from 'next/link'++interface QuoteSectionProps {+ quote: string+ highlight?: string+ author: {+ name: string+ role: string+ image: string+ link: string+ }+}++export function QuoteSection({ quote, highlight, author }: QuoteSectionProps) {+ return (+ <figure>+ <SectionContainerWithCn height="none" className="border-x border-border bg-surface-200">+ <div className="flex flex-col items-center text-center gap-8 md:gap-12 py-16 md:py-24">+ <blockquote className="text-2xl xl:text-4xl tracking-tight max-w-screen-lg text-foreground-lighter text-balance">+ <p>+ {quote}+ {highlight && (+ <>+ {' '}+ <span className="text-brand-link">{highlight}</span>+ </>+ )}+ </p>+ </blockquote>++ <figcaption>+ <Link href={author.link} className="hover:opacity-90 transition-opacity">+ <div className="flex flex-row items-center gap-3">+ <Image+ draggable={false}+ src={author.image}+ alt=""+ aria-hidden+ className="w-12 h-12 rounded-full overflow-hidden object-cover"+ width={48}+ height={48}+ />+ <div className="flex flex-col items-start gap-0.5">+ <span className="text-foreground text-sm">{author.name}</span>+ <span className="text-foreground-lighter text-xs">{author.role}</span>+ </div>+ </div>+ </Link>+ </figcaption>+ </div>+ </SectionContainerWithCn>+ </figure>+ )+}diff --git a/apps/www/app/(products)/auth/_components/ApiSection.tsx b/apps/www/app/(products)/auth/_components/ApiSection.tsxnew file mode 100644index 00000000000..f90bae39377--- /dev/null+++ b/apps/www/app/(products)/auth/_components/ApiSection.tsx@@ -0,0 +1,324 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'+import { ApiSectionClient } from './ApiSectionClient'++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#ffffff' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#15593b' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#525252' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ ],+}++const LANG_MAP: Record<string, string> = {+ JavaScript: 'javascript',+ Flutter: 'dart',+ Python: 'python',+ 'C#': 'csharp',+ Kotlin: 'kotlin',+ Swift: 'swift',+}++const API_EXAMPLES = [+ {+ icon: 'UserPlus' as const,+ title: 'Sign up',+ description: 'Create new accounts with email/password, phone, or third-party providers.',+ code: {+ JavaScript: `// Sign up with email and password+const { data, error } = await supabase.auth.signUp({+ email: '[email protected]',+ password: 'secure-password',+})`,+ Flutter: `// Sign up with email and password+final response = await supabase.auth.signUp(+ email: '[email protected]',+ password: 'secure-password',+);`,+ Python: `# Sign up with email and password+response = supabase.auth.sign_up({+ "email": "[email protected]",+ "password": "secure-password",+})`,+ 'C#': `// Sign up with email and password+var session = await supabase.Auth.SignUp(+ "[email protected]",+ "secure-password"+);`,+ Kotlin: `// Sign up with email and password+supabase.auth.signUpWith(Email) {+ email = "[email protected]"+ password = "secure-password"+}`,+ Swift: `// Sign up with email and password+try await supabase.auth.signUp(+ email: "[email protected]",+ password: "secure-password"+)`,+ },+ },+ {+ icon: 'LogIn' as const,+ title: 'Sign in',+ description: 'Authenticate users with multiple strategies in a single call.',+ code: {+ JavaScript: `// Sign in with email+const { data, error } = await supabase.auth.signInWithPassword({+ email: '[email protected]',+ password: 'secure-password',+})++// Sign in with magic link+const { data, error } = await supabase.auth.signInWithOtp({+ email: '[email protected]',+})`,+ Flutter: `// Sign in with email+final response = await supabase.auth.signInWithPassword(+ email: '[email protected]',+ password: 'secure-password',+);++// Sign in with magic link+await supabase.auth.signInWithOtp(+ email: '[email protected]',+);`,+ Python: `# Sign in with email+response = supabase.auth.sign_in_with_password({+ "email": "[email protected]",+ "password": "secure-password",+})++# Sign in with magic link+response = supabase.auth.sign_in_with_otp({+ "email": "[email protected]",+})`,+ 'C#': `// Sign in with email+var session = await supabase.Auth.SignIn(+ "[email protected]",+ "secure-password"+);++// Sign in with magic link+await supabase.Auth.SignIn(+ Constants.SignInType.MagicLink,+);`,+ Kotlin: `// Sign in with email+supabase.auth.signInWith(Email) {+ email = "[email protected]"+ password = "secure-password"+}++// Sign in with magic link+supabase.auth.signInWith(OTP) {+ email = "[email protected]"+}`,+ Swift: `// Sign in with email+try await supabase.auth.signIn(+ email: "[email protected]",+ password: "secure-password"+)++// Sign in with magic link+try await supabase.auth.signInWithOTP(+ email: "[email protected]"+)`,+ },+ },+ {+ icon: 'Globe' as const,+ title: 'OAuth logins',+ description: 'Social login with 20+ providers and custom scopes for extended permissions.',+ code: {+ JavaScript: `// Sign in with GitHub+const { data, error } = await supabase.auth.signInWithOAuth({+ provider: 'github',+ options: {+ scopes: 'repo gist notifications',+ },+})`,+ Flutter: `// Sign in with GitHub+await supabase.auth.signInWithOAuth(+ OAuthProvider.github,+ scopes: 'repo gist notifications',+);`,+ Python: `# Sign in with GitHub+response = supabase.auth.sign_in_with_oauth({+ "provider": "github",+ "options": {+ "scopes": "repo gist notifications",+ },+})`,+ 'C#': `// Sign in with GitHub+var session = await supabase.Auth.SignIn(+ Constants.Provider.Github,+ new SignInOptions {+ Scopes = "repo gist notifications"+ }+);`,+ Kotlin: `// Sign in with GitHub+supabase.auth.signInWith(Github) {+ scopes = "repo gist notifications"+}`,+ Swift: `// Sign in with GitHub+try await supabase.auth.signInWithOAuth(+ provider: .github,+ scopes: "repo gist notifications"+)`,+ },+ },+ {+ icon: 'KeyRound' as const,+ title: 'Session management',+ description: 'Retrieve, refresh, and manage user sessions with built-in token handling.',+ code: {+ JavaScript: `// Get the current user+const { data: { user } } = await supabase.auth.getUser()++// Listen for auth state changes+supabase.auth.onAuthStateChange((event, session) => {+ console.log(event, session)+})`,+ Flutter: `// Get the current user+final user = supabase.auth.currentUser;++// Listen for auth state changes+supabase.auth.onAuthStateChange.listen((data) {+ final event = data.event;+ final session = data.session;+});`,+ Python: `# Get the current user+user = supabase.auth.get_user()++# Get the current session+session = supabase.auth.get_session()`,+ 'C#': `// Get the current user+var user = supabase.Auth.CurrentUser;++// Listen for auth state changes+supabase.Auth.AddStateChangedListener(+ (sender, changed) => {+ // Handle state change+ }+);`,+ Kotlin: `// Get the current user+val user = supabase.auth.currentUserOrNull()++// Listen for auth state changes+supabase.auth.sessionStatus.collect { status ->+ when (status) {+ is SessionStatus.Authenticated -> { }+ SessionStatus.NotAuthenticated -> { }+ }+}`,+ Swift: `// Get the current user+let user = try await supabase.auth.user()++// Listen for auth state changes+for await (event, session) in supabase.auth.authStateChanges {+ print(event, session)+}`,+ },+ },+]++export async function ApiSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: Object.values(LANG_MAP),+ })++ const examples = API_EXAMPLES.map((example) => ({+ icon: example.icon,+ title: example.title,+ description: example.description,+ languages: Object.fromEntries(+ Object.entries(example.code).map(([lang, code]) => [+ lang,+ {+ darkHtml: hl.codeToHtml(code, { lang: LANG_MAP[lang], theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(code, { lang: LANG_MAP[lang], theme: 'supabase-light' }),+ },+ ])+ ),+ }))++ hl.dispose()++ return <ApiSectionClient examples={examples} />+}diff --git a/apps/www/app/(products)/auth/_components/ApiSectionClient.tsx b/apps/www/app/(products)/auth/_components/ApiSectionClient.tsxnew file mode 100644index 00000000000..07fd22cc442--- /dev/null+++ b/apps/www/app/(products)/auth/_components/ApiSectionClient.tsx@@ -0,0 +1,229 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { ChevronDown, Globe, KeyRound, LogIn, UserPlus } from 'lucide-react'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { UserPlus, LogIn, Globe, KeyRound } as const++type IconName = keyof typeof ICONS++type ApiExample = {+ icon: IconName+ title: string+ description: string+ languages: Record<string, { darkHtml: string; lightHtml: string }>+}++const LANGUAGES = ['JavaScript', 'Flutter', 'Python', 'C#', 'Kotlin', 'Swift']++const INTERVAL_DURATION = 8000++export function ApiSectionClient({ examples }: { examples: ApiExample[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [activeLang, setActiveLang] = useState('JavaScript')+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = examples[activeIdx]++ // Auto-size the code panel to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % examples.length)+ }+ }, [progress, examples.length])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Simple APIs+ <br />+ <span className="text-foreground">powerful libraries</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ APIs that you can understand. With powerful libraries that work on client and server-side+ applications.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tab cards */}+ <div+ role="tablist"+ aria-label="Authentication API examples"+ className="flex flex-col gap-1 items-start justify-end"+ >+ {examples.map((example, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[example.icon]+ return (+ <button+ key={example.title}+ role="tab"+ aria-selected={isActive}+ aria-controls={`auth-api-panel-${index}`}+ id={`auth-api-tab-${index}`}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl font-medium transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} aria-hidden />+ {example.title}+ </button>+ )+ })}+ </div>++ {/* Right: code block */}+ <motion.div+ role="tabpanel"+ id={`auth-api-panel-${activeIdx}`}+ aria-labelledby={`auth-api-tab-${activeIdx}`}+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative self-end overflow-hidden border border-border rounded-md"+ >+ {/* Invisible measuring copy: drives the animated container height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto pb-12 [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.languages[activeLang]?.darkHtml ?? '' }}+ />++ {/* Language switcher */}+ <div className="absolute top-3 right-4 z-10 flex items-center">+ <div className="relative flex items-center gap-1 text-foreground-muted text-xs">+ <select+ value={activeLang}+ onChange={(e) => setActiveLang(e.target.value)}+ className="appearance-none bg-transparent text-foreground-light text-xs pr-4 cursor-pointer border-none outline-none shadow-none focus:border-none focus:outline-none focus:shadow-none focus:ring-0"+ >+ {LANGUAGES.map((lang) => (+ <option key={lang} value={lang}>+ {lang}+ </option>+ ))}+ </select>+ <ChevronDown size={12} className="absolute right-0 pointer-events-none" />+ </div>+ </div>++ <AnimatePresence mode="wait">+ <motion.div+ key={`${active.title}-${activeLang}`}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto pb-12"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.languages[activeLang]?.darkHtml ?? '' }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{+ __html: active.languages[activeLang]?.lightHtml ?? '',+ }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/guides/auth"+ className="absolute bottom-4 right-4 flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ aria-hidden+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </motion.div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/auth/_components/AuthContent.tsx b/apps/www/app/(products)/auth/_components/AuthContent.tsxnew file mode 100644index 00000000000..fb4671499b7--- /dev/null+++ b/apps/www/app/(products)/auth/_components/AuthContent.tsx@@ -0,0 +1,55 @@+import { FeaturesSection } from './FeaturesSection'+import { Hero } from './Hero'+import { HighlightsSection } from './HighlightsSection'+import { QuoteSection } from './QuoteSection'+import { BuiltWithSupabaseSection } from '@/components/BuiltWithSupabaseSection'+import { CTASection } from '@/components/CTASection'++export function AuthContent({+ apiSlot,+ rlsSlot,+}: {+ apiSlot: React.ReactNode+ rlsSlot: React.ReactNode+}) {+ return (+ <div className="overflow-x-clip">+ <section aria-label="Hero">+ <Hero />+ </section>+ <section+ id="features"+ className="border-t border-border"+ aria-label="Authentication features"+ >+ <FeaturesSection />+ </section>+ <section id="quote" className="border-t border-border" aria-label="Customer quote">+ <QuoteSection />+ </section>+ <section+ id="highlights"+ className="border-t border-border"+ aria-label="Enterprise security highlights"+ >+ <HighlightsSection />+ </section>+ <section id="api" className="border-t border-border" aria-label="API examples">+ {apiSlot}+ </section>+ <section id="rls" className="border-t border-border" aria-label="Row Level Security">+ {rlsSlot}+ </section>+ <section+ id="built-with-supabase"+ className="border-t border-border"+ aria-label="Built with Supabase"+ >+ <BuiltWithSupabaseSection />+ </section>+ <section id="get-started" className="border-t border-border" aria-label="Get started">+ <CTASection />+ </section>+ </div>+ )+}diff --git a/apps/www/app/(products)/auth/_components/FeaturesSection.tsx b/apps/www/app/(products)/auth/_components/FeaturesSection.tsxnew file mode 100644index 00000000000..409c40963f8--- /dev/null+++ b/apps/www/app/(products)/auth/_components/FeaturesSection.tsx@@ -0,0 +1,601 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion } from 'framer-motion'+import { Link as LinkIcon } from 'lucide-react'+import Image from 'next/image'+import { useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++import { ShieldGlow } from './Shaders/ShieldGlow'++const PROVIDERS = [+ 'github',+ 'google',+ 'apple',+ 'discord',+ 'facebook',+ 'gitlab',+ 'microsoft',+ 'twitter',+ 'twitch',+ 'spotify',+ 'slack',+ 'bitbucket',+ 'twilio',+ 'solana',+ 'ethereum',+]++const FEATURES = [+ {+ title: 'All the social providers',+ description:+ 'Add social logins with one click. Google, Facebook, GitHub, Azure (Microsoft), GitLab, Twitter, Discord, and many more.',+ visual: ProvidersSkeleton,+ },+ {+ title: 'Fully integrated',+ description:+ 'Auth without any external services. Built-in authentication, authorization, and user management.',+ visual: IntegratedSkeleton,+ },+ {+ title: 'Own your data',+ description:+ 'User data stored in your Supabase database. No third-party privacy concerns. Host in 17+ locations.',+ visual: DataOwnershipSkeleton,+ },+]++const COLS = 13+const ROWS = 13+const CELL_SIZE = 48+const GAP = 10++function ProvidersSkeleton() {+ const [activeCell, setActiveCell] = useState(Math.floor((COLS * ROWS) / 2))+ const prevCell = useRef(activeCell)+ const containerRef = useRef<HTMLDivElement>(null)+ const [isInView, setIsInView] = useState(false)++ const totalCells = COLS * ROWS+ const grid = Array.from({ length: totalCells }, (_, i) => PROVIDERS[i % PROVIDERS.length])++ // Keep highlight away from edges so grid always overflows the card+ const MARGIN = 3+ const pickNext = () => {+ const prev = prevCell.current+ const prevCol = prev % COLS+ const prevRow = Math.floor(prev / COLS)+ let next = prev+ const prevProvider = PROVIDERS[prev % PROVIDERS.length]+ // Try until we get a cell 5+ tiles away and a different provider+ for (let attempt = 0; attempt < 50; attempt++) {+ const col = MARGIN + Math.floor(Math.random() * (COLS - MARGIN * 2))+ const row = MARGIN + Math.floor(Math.random() * (ROWS - MARGIN * 2))+ const candidate = row * COLS + col+ const dist = Math.abs(col - prevCol) + Math.abs(row - prevRow)+ if (dist >= 5 && PROVIDERS[candidate % PROVIDERS.length] !== prevProvider) {+ next = candidate+ break+ }+ }+ prevCell.current = next+ return next+ }++ // Compute offset to center the active cell in the viewport+ const activeCol = activeCell % COLS+ const activeRow = Math.floor(activeCell / COLS)+ const centerCol = Math.floor(COLS / 2)+ const centerRow = Math.floor(ROWS / 2)+ const offsetX = (centerCol - activeCol) * (CELL_SIZE + GAP)+ const offsetY = (centerRow - activeRow) * (CELL_SIZE + GAP)++ useEffect(() => {+ const el = containerRef.current+ if (!el) return+ const observer = new IntersectionObserver(([entry]) => setIsInView(entry.isIntersecting), {+ threshold: 0.3,+ })+ observer.observe(el)+ return () => observer.disconnect()+ }, [])++ useEffect(() => {+ if (!isInView) return+ const timer = setInterval(() => setActiveCell(pickNext()), 5000)+ return () => clearInterval(timer)+ }, [isInView])++ return (+ <div+ ref={containerRef}+ role="img"+ aria-label="A grid of social login provider icons — Google, GitHub, Apple, Discord, and more — with one highlighted at a time"+ className="flex items-center justify-center w-full h-full relative overflow-hidden pointer-events-none select-none"+ style={{+ maskImage: 'radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 75%)',+ WebkitMaskImage: 'radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 75%)',+ }}+ >+ <div+ className="grid transition-transform duration-1000 ease-in-out"+ style={{+ gridTemplateColumns: `repeat(${COLS}, ${CELL_SIZE}px)`,+ gridTemplateRows: `repeat(${ROWS}, ${CELL_SIZE}px)`,+ gap: `${GAP}px`,+ transform: `translate(${offsetX}px, ${offsetY}px)`,+ }}+ >+ {grid.map((provider, i) => {+ const isActive = i === activeCell+ return (+ <div+ key={i}+ className={cn(+ 'flex items-center justify-center w-12 h-12 rounded-lg border transition-all duration-1000',+ isActive ? 'bg-surface-200 border-border scale-110' : 'bg-surface-75 border-border'+ )}+ >+ <Image+ src={`/images/product/auth/${provider}-icon.svg`}+ alt={provider}+ width={20}+ height={20}+ className={cn(+ 'transition-all duration-1000',+ isActive ? 'opacity-100 grayscale-0' : 'opacity-40 grayscale'+ )}+ />+ </div>+ )+ })}+ </div>+ </div>+ )+}++function IntegratedSkeleton() {+ return (+ <div+ role="img"+ aria-label="Preview of Supabase Auth UI components — magic link sign-in, profile, organization setup, email verification, sign-up, password reset, account chooser, session tokens, and two-factor authentication"+ className="relative flex h-full w-full items-center justify-center overflow-hidden pointer-events-none select-none"+ style={{+ maskImage:+ 'linear-gradient(to bottom, transparent, black 15%, black 65%, transparent), linear-gradient(to right, transparent, black 20%, black 80%, transparent)',+ WebkitMaskImage:+ 'linear-gradient(to bottom, transparent, black 15%, black 65%, transparent), linear-gradient(to right, transparent, black 20%, black 80%, transparent)',+ maskComposite: 'intersect',+ WebkitMaskComposite: 'destination-in',+ }}+ >+ <div className="flex items-start gap-3">+ {/* Left column */}+ <div className="flex w-[180px] shrink-0 flex-col gap-3 pt-4">+ {/* Magic link card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col items-center gap-2">+ <span className="text-[11px] font-medium text-foreground">+ Sign in with magic link+ </span>+ <div className="flex h-6 w-full items-center rounded border border-border bg-surface-200 px-2">+ <span className="text-[10px] text-foreground-muted">[email protected]</span>+ </div>+ <div className="flex h-6 w-full items-center justify-center rounded bg-foreground">+ <span className="text-[9px] font-medium text-background">Send magic link</span>+ </div>+ </div>+ </div>+ {/* Profile card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col gap-3">+ <div className="flex items-center gap-2.5">+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-brand/15 text-[10px] font-medium text-brand">+ CW+ </div>+ <div className="flex flex-col">+ <span className="text-[11px] font-medium text-foreground">Cameron Walker</span>+ <span className="text-[10px] text-foreground-muted">[email protected]</span>+ </div>+ </div>+ <div className="flex flex-col gap-1.5">+ <span className="text-[10px] text-foreground-muted">Name</span>+ <div className="flex h-6 items-center rounded border border-border bg-surface-200 px-2">+ <span className="text-[10px] text-foreground-muted">Cameron Walker</span>+ </div>+ </div>+ <div className="flex flex-col gap-1.5">+ <span className="text-[10px] text-foreground-muted">Phone number</span>+ <div className="flex h-6 items-center rounded border border-border bg-surface-200 px-2">+ <span className="text-[10px] text-foreground-muted">+1 (555) 000-0000</span>+ </div>+ </div>+ <div className="flex items-center justify-between">+ <span className="text-[10px] text-foreground-muted">Connected account</span>+ <span className="text-[9px] text-brand">Google</span>+ </div>+ </div>+ </div>+ {/* Organization card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col gap-3">+ <span className="text-[11px] font-medium text-foreground">Create organization</span>+ <div className="flex flex-col gap-1.5">+ <span className="text-[10px] text-foreground-muted">Name</span>+ <div className="flex h-6 items-center rounded border border-border bg-surface-200 px-2">+ <span className="text-[10px] text-foreground-muted">Acme Inc</span>+ </div>+ </div>+ <div className="flex flex-col gap-1.5">+ <span className="text-[10px] text-foreground-muted">Logo</span>+ <div className="flex h-10 items-center justify-center rounded border border-dashed border-border bg-surface-200">+ <span className="text-[9px] text-foreground-muted">Upload image</span>+ </div>+ </div>+ </div>+ </div>+ </div>++ {/* Center column */}+ <div className="flex w-[220px] shrink-0 flex-col gap-3">+ {/* Verify email card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col items-center gap-2.5">+ <div className="flex h-8 w-8 items-center justify-center rounded-full bg-brand/10">+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="#3ECF8E"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <rect x="2" y="4" width="20" height="16" rx="2" />+ <path d="M22 7l-10 6L2 7" />+ </svg>+ </div>+ <span className="text-[11px] font-medium text-foreground">Verify your email</span>+ <div className="flex gap-1">+ {Array.from({ length: 6 }).map((_, i) => (+ <div+ key={i}+ className="flex h-6 w-5 items-center justify-center rounded border border-border bg-surface-200 text-[10px] text-foreground-muted"+ >+ {i < 3 ? '•' : ''}+ </div>+ ))}+ </div>+ </div>+ </div>+ {/* Sign up card */}+ <div className="rounded-xl border border-border bg-surface-100 p-5 shadow-sm">+ <div className="flex flex-col items-center gap-3">+ <div className="flex h-9 w-9 items-center justify-center rounded-lg bg-foreground">+ <svg width="16" height="17" viewBox="0 0 109 113" fill="none" aria-hidden>+ <path+ d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z"+ fill="#249361"+ />+ <path+ d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z"+ fill="#3ECF8E"+ />+ </svg>+ </div>+ <div className="text-center">+ <div className="text-xs font-medium text-foreground">Create your account</div>+ <div className="mt-0.5 text-[10px] text-foreground-muted">+ Welcome! Please fill in the details.+ </div>+ </div>+ <div className="flex w-full flex-col gap-1.5">+ <div className="flex h-7 items-center justify-center gap-1.5 rounded border border-border bg-surface-200">+ <span className="text-[10px] text-foreground-muted">Continue with Google</span>+ </div>+ <div className="flex h-7 items-center justify-center gap-1.5 rounded border border-border bg-surface-200">+ <span className="text-[10px] text-foreground-muted">Continue with GitHub</span>+ </div>+ </div>+ </div>+ </div>+ {/* Password reset card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col items-center gap-2">+ <span className="text-[11px] font-medium text-foreground">Reset your password</span>+ <div className="flex flex-col gap-1 w-full">+ <span className="text-[10px] font-medium text-foreground">New password</span>+ <div className="flex h-6 items-center rounded border border-border bg-surface-200 px-2">+ <span className="text-[10px] tracking-widest text-foreground-muted">+ ••••••••+ </span>+ </div>+ </div>+ <div className="flex h-6 w-full items-center justify-center rounded bg-foreground">+ <span className="text-[9px] font-medium text-background">Update password</span>+ </div>+ </div>+ </div>+ </div>++ {/* Right column */}+ <div className="flex w-[180px] shrink-0 flex-col gap-3 pt-10">+ {/* Account chooser card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col gap-3">+ <div className="flex flex-col items-center gap-1">+ <div className="flex h-7 w-7 items-center justify-center rounded-lg bg-foreground">+ <svg width="12" height="13" viewBox="0 0 109 113" fill="none" aria-hidden>+ <path+ d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z"+ fill="#249361"+ />+ <path+ d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z"+ fill="#3ECF8E"+ />+ </svg>+ </div>+ <span className="text-[11px] font-medium text-foreground">Choose an account</span>+ </div>+ <div className="flex flex-col gap-1.5">+ {[+ { name: 'Personal', role: '' },+ { name: 'Acme Inc', role: 'Admin' },+ { name: 'My Project', role: 'Member' },+ ].map((account) => (+ <div+ key={account.name}+ className="flex items-center gap-2 rounded-lg border border-border bg-surface-200 px-2.5 py-1.5"+ >+ <div className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-foreground-muted/15 text-[8px] text-foreground-muted">+ {account.name[0]}+ </div>+ <div className="flex flex-col">+ <span className="text-[10px] text-foreground">{account.name}</span>+ {account.role && (+ <span className="text-[8px] text-foreground-muted">{account.role}</span>+ )}+ </div>+ </div>+ ))}+ </div>+ </div>+ </div>+ {/* Session card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col gap-2">+ <span className="font-mono text-[10px] text-foreground-muted">Session</span>+ {[+ { key: 'access_token', val: 'eyJhbG...kpXVc' },+ { key: 'token_type', val: 'bearer' },+ { key: 'user.email', val: '[email protected]' },+ { key: 'user.role', val: 'authenticated' },+ ].map((row) => (+ <div key={row.key} className="flex items-center justify-between">+ <span className="font-mono text-[9px] text-brand">{row.key}</span>+ <span className="ml-2 truncate font-mono text-[9px] text-foreground-muted">+ {row.val}+ </span>+ </div>+ ))}+ </div>+ </div>+ {/* MFA card */}+ <div className="rounded-xl border border-border bg-surface-100 p-4">+ <div className="flex flex-col gap-2.5">+ <span className="text-[11px] font-medium text-foreground">Two-factor auth</span>+ <div className="flex items-center justify-between rounded-lg border border-border bg-surface-200 px-2.5 py-2">+ <div className="flex flex-col">+ <span className="text-[10px] text-foreground">Authenticator app</span>+ <span className="text-[9px] text-foreground-muted">TOTP via auth app</span>+ </div>+ <div className="rounded bg-brand/15 px-1.5 py-0.5 text-[8px] font-medium text-brand">+ On+ </div>+ </div>+ <div className="flex items-center justify-between rounded-lg border border-border bg-surface-200 px-2.5 py-2">+ <div className="flex flex-col">+ <span className="text-[10px] text-foreground">SMS verification</span>+ <span className="text-[9px] text-foreground-muted">Code via text message</span>+ </div>+ <div className="rounded bg-foreground-muted/10 px-1.5 py-0.5 text-[8px] text-foreground-muted">+ Off+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ )+}++function DataOwnershipSkeleton() {+ const [hovered, setHovered] = useState(false)++ return (+ <div+ role="img"+ aria-label="A shield icon with a glowing green effect, representing user data ownership and security"+ className="relative flex h-full w-full items-center justify-center select-none"+ style={{+ maskImage: 'radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 75%)',+ WebkitMaskImage: 'radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 75%)',+ }}+ onMouseEnter={() => setHovered(true)}+ onMouseLeave={() => setHovered(false)}+ >+ {/* Construction lines */}+ <svg+ className="absolute -inset-16 h-[calc(100%+128px)] w-[calc(100%+128px)] text-foreground-muted/20"+ viewBox="0 0 480 480"+ fill="none"+ >+ <rect+ x="60"+ y="40"+ width="360"+ height="400"+ rx="48"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <rect+ x="30"+ y="10"+ width="420"+ height="460"+ rx="60"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <rect+ x="0"+ y="-16"+ width="480"+ height="512"+ rx="72"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <rect+ x="90"+ y="70"+ width="300"+ height="340"+ rx="36"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <line x1="30" y1="10" x2="450" y2="470" stroke="currentColor" strokeWidth="0.5" />+ <line x1="450" y1="10" x2="30" y2="470" stroke="currentColor" strokeWidth="0.5" />+ <line x1="240" y1="0" x2="240" y2="480" stroke="currentColor" strokeWidth="0.5" />+ <line x1="0" y1="240" x2="480" y2="240" stroke="currentColor" strokeWidth="0.5" />+ <circle cx="240" cy="240" r="180" stroke="currentColor" strokeWidth="0.5" />+ <circle cx="240" cy="240" r="140" stroke="currentColor" strokeWidth="0.5" />+ <circle cx="240" cy="240" r="100" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="40" x2="60" y2="10" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="40" x2="30" y2="40" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="40" x2="450" y2="40" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="40" x2="420" y2="10" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="440" x2="30" y2="440" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="440" x2="60" y2="470" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="440" x2="450" y2="440" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="440" x2="420" y2="470" stroke="currentColor" strokeWidth="0.5" />+ </svg>++ {/* Highlighted lines on hover */}+ <svg+ className="absolute -inset-16 h-[calc(100%+128px)] w-[calc(100%+128px)] transition-opacity duration-500"+ style={{ opacity: hovered ? 0.35 : 0 }}+ viewBox="0 0 480 480"+ fill="none"+ >+ <rect+ x="60"+ y="40"+ width="360"+ height="400"+ rx="48"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.4"+ />+ <circle+ cx="240"+ cy="240"+ r="140"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.3"+ />+ <line+ x1="240"+ y1="0"+ x2="240"+ y2="480"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.25"+ />+ <line+ x1="0"+ y1="240"+ x2="480"+ y2="240"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.25"+ />+ </svg>++ {/* Shield-user icon + glow */}+ <div className="relative h-44 w-44">+ <ShieldGlow hovered={hovered} />+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 24 24"+ className="relative z-[5] h-44 w-44"+ strokeLinecap="round"+ strokeLinejoin="round"+ style={{+ color: 'hsl(var(--brand-default))',+ }}+ >+ <path+ d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"+ fill="none"+ stroke="currentColor"+ strokeWidth={0.25}+ />+ </svg>+ </div>+ </div>+ )+}++export function FeaturesSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Everything you need+ <br />+ <span className="text-foreground">for user authentication</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Social logins, email/password, magic links, phone auth, and more — with enterprise-grade+ security built on Postgres' Row Level Security.+ </p>+ </div>++ {/* 3-col grid */}+ <div className="grid grid-cols-1 md:grid-cols-3 gap-3">+ {FEATURES.map((feature) => {+ const Visual = feature.visual+ return (+ <div+ key={feature.title}+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden"+ >+ <div className="relative flex items-center justify-center h-[320px]">+ <Visual />+ </div>+ <div className="px-6 py-5 flex flex-col gap-1">+ <h4 className="text-foreground text-sm font-medium">{feature.title}</h4>+ <p className="text-foreground-lighter text-sm">{feature.description}</p>+ </div>+ </div>+ )+ })}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/auth/_components/Hero.tsx b/apps/www/app/(products)/auth/_components/Hero.tsxnew file mode 100644index 00000000000..4b6e59b9eda--- /dev/null+++ b/apps/www/app/(products)/auth/_components/Hero.tsx@@ -0,0 +1,30 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Link from 'next/link'+import { Button } from 'ui'++export function Hero() {+ return (+ <SectionContainerWithCn>+ <div className="flex flex-col gap-6 lg:gap-8">+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h1 className="text-foreground text-3xl sm:text-5xl sm:leading-none">+ <span className="block">Authentication</span>+ <span className="text-foreground-lighter block">built in, not bolted on</span>+ </h1>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Every Supabase project comes with a complete user management system. Including+ Postgres' Row Level Security for fine-grained access control.+ </p>+ </div>+ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link href="https://supabase.com/dashboard">Start your project</Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link href="/docs/guides/auth">Documentation</Link>+ </Button>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/auth/_components/HighlightsSection.tsx b/apps/www/app/(products)/auth/_components/HighlightsSection.tsxnew file mode 100644index 00000000000..78e062e23f0--- /dev/null+++ b/apps/www/app/(products)/auth/_components/HighlightsSection.tsx@@ -0,0 +1,77 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { Check } from 'lucide-react'+import Link from 'next/link'+import { Button } from 'ui'++const HIGHLIGHTS = [+ {+ title: 'Multi-Factor Authentication',+ features: [+ 'Time-based one-time passwords (TOTP)',+ 'Works with any authenticator app',+ 'Enforce MFA for specific user roles',+ 'Built-in enrollment and challenge flows',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/auth/auth-mfa' },+ },+ {+ title: 'Enterprise SSO',+ features: [+ 'SAML 2.0 support for identity providers',+ 'Connect to Azure AD, Okta, and more',+ 'Automatic user provisioning on sign-in',+ 'Manage SSO from the Dashboard or API',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/auth/enterprise-sso/auth-sso-saml' },+ },+ {+ title: 'Custom OIDC Providers',+ features: [+ 'OpenID Connect support for any identity provider',+ 'Connect to Auth0, Keycloak, Amazon Cognito, and more',+ 'PKCE security by default',+ 'Configure providers from the Dashboard or API',+ ],+ cta: { label: 'Learn more', href: '/features/custom-oidc-providers' },+ },+]++export function HighlightsSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Enterprise ready+ <br />+ <span className="text-foreground">security at every level</span>+ </h3>+ <div className="grid grid-cols-1 md:grid-cols-3 gap-3">+ {HIGHLIGHTS.map((highlight) => (+ <div+ key={highlight.title}+ className="relative flex flex-col overflow-hidden md:min-h-[400px] bg-surface-75 border border-border rounded-lg"+ >+ <div className="relative z-10 flex flex-col justify-between h-full p-6 md:p-8">+ <div className="flex flex-col gap-4">+ <h4 className="text-foreground text-lg font-medium">{highlight.title}</h4>+ <ul className="flex flex-col text-foreground-lighter text-sm gap-1.5">+ {highlight.features.map((feature) => (+ <li key={feature} className="flex items-start gap-2">+ <Check className="w-3.5 h-3.5 mt-0.5 shrink-0 stroke-2 text-brand" />+ <span>{feature}</span>+ </li>+ ))}+ </ul>+ </div>+ <div className="mt-6">+ <Button variant="default" size="small" asChild>+ <Link href={highlight.cta.href}>{highlight.cta.label}</Link>+ </Button>+ </div>+ </div>+ </div>+ ))}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/auth/_components/QuoteSection.tsx b/apps/www/app/(products)/auth/_components/QuoteSection.tsxnew file mode 100644index 00000000000..4da3b4c0094--- /dev/null+++ b/apps/www/app/(products)/auth/_components/QuoteSection.tsx@@ -0,0 +1,16 @@+import { QuoteSection as SharedQuoteSection } from '../../_shared/QuoteSection'++export function QuoteSection() {+ return (+ <SharedQuoteSection+ quote="Supabase is not only super easy to get started, but also provides all the backend solutions we require as we continue to grow."+ highlight="The auth system just works out of the box."+ author={{+ name: 'Alfred Lua',+ role: 'Cofounder of Pebblely',+ image: '/images/blog/avatars/alfred-lua-pebblely.jpeg',+ link: '/customers/pebblely',+ }}+ />+ )+}diff --git a/apps/www/app/(products)/auth/_components/RLSSection.tsx b/apps/www/app/(products)/auth/_components/RLSSection.tsxnew file mode 100644index 00000000000..b562524af87--- /dev/null+++ b/apps/www/app/(products)/auth/_components/RLSSection.tsx@@ -0,0 +1,129 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'+import { RLSSectionClient } from './RLSSectionClient'++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ { scope: ['entity.name.function', 'support.function'], settings: { foreground: '#3ecf8e' } },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ { scope: ['entity.name.function', 'support.function'], settings: { foreground: '#15593b' } },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ ],+}++const RLS_EXAMPLES = [+ {+ title: 'Allow read access',+ description: 'Public profiles are viewable by everyone.',+ code: `-- 1. Create table+create table profiles (+ id serial primary key,+ name text+);++-- 2. Enable RLS+alter table profiles enable row level security;++-- 3. Create Policy+create policy "Public profiles are viewable by everyone."+on profiles for select+using ( true );`,+ },+ {+ title: 'Restrict updates',+ description: 'Users can only update their own rows.',+ code: `-- 1. Create table+create table profiles (+ id serial primary key,+ name text+);++-- 2. Enable RLS+alter table profiles enable row level security;++-- 3. Create Policy+create policy "Users can update their own profiles."+on profiles for update+using ( (select auth.uid()) = id );`,+ },+ {+ title: 'Advanced rules',+ description: 'Team members can update team details using joins.',+ code: `create table teams (+ id bigint primary key generated always as identity,+ name text+);++create table members (+ team_id bigint references teams,+ user_id uuid references auth.users+);++alter table teams enable row level security;++create policy "Team members can update team details if they belong to the team"+ on teams+ for update using (+ (select auth.uid()) in (+ select user_id from members+ where team_id = id+ )+ );`,+ },+]++export async function RLSSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: ['sql'],+ })++ const examples = RLS_EXAMPLES.map((example) => ({+ title: example.title,+ description: example.description,+ darkHtml: hl.codeToHtml(example.code, { lang: 'sql', theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(example.code, { lang: 'sql', theme: 'supabase-light' }),+ }))++ hl.dispose()++ return <RLSSectionClient examples={examples} />+}diff --git a/apps/www/app/(products)/auth/_components/RLSSectionClient.tsx b/apps/www/app/(products)/auth/_components/RLSSectionClient.tsxnew file mode 100644index 00000000000..42878fcdccf--- /dev/null+++ b/apps/www/app/(products)/auth/_components/RLSSectionClient.tsx@@ -0,0 +1,207 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++type RLSExample = {+ title: string+ description: string+ darkHtml: string+ lightHtml: string+}++const INTERVAL_DURATION = 10000++export function RLSSectionClient({ examples }: { examples: RLSExample[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = examples[activeIdx]++ // Auto-size the code panel to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % examples.length)+ }+ }, [progress, examples.length])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ User permissions+ <br />+ <span className="text-foreground">without the middleware</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Build authorization rules with Postgres Row Level Security — control who can create, edit,+ and delete specific rows in your database. No additional servers required.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tabs */}+ <div+ role="tablist"+ aria-label="RLS policy examples"+ className="flex flex-col gap-3 items-start justify-end"+ >+ {examples.map((example, index) => {+ const isActive = index === activeIdx+ return (+ <button+ key={example.title}+ role="tab"+ aria-selected={isActive}+ aria-controls={`rls-panel-${index}`}+ id={`rls-tab-${index}`}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex flex-col gap-0.5 py-2 transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <span className="text-2xl font-medium">{example.title}</span>+ <span+ className={cn(+ 'text-sm transition-colors',+ isActive ? 'text-foreground-lighter' : 'text-foreground-muted'+ )}+ >+ {example.description}+ </span>+ </button>+ )+ })}+ </div>++ {/* Right: code block */}+ <motion.div+ role="tabpanel"+ id={`rls-panel-${activeIdx}`}+ aria-labelledby={`rls-tab-${activeIdx}`}+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative self-end overflow-hidden border border-border rounded-md"+ >+ {/* Invisible measuring copy: drives the animated container height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto pb-12 [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ />++ <AnimatePresence mode="wait">+ <motion.div+ key={active.title}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto pb-12"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{ __html: active.lightHtml }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/guides/database/postgres/row-level-security"+ className="absolute bottom-4 right-4 flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ aria-hidden+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </motion.div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/auth/_components/Shaders/ShieldGlow.tsx b/apps/www/app/(products)/auth/_components/Shaders/ShieldGlow.tsxnew file mode 100644index 00000000000..977e6ce463f--- /dev/null+++ b/apps/www/app/(products)/auth/_components/Shaders/ShieldGlow.tsx@@ -0,0 +1,226 @@+'use client'++import { useEffect, useRef } from 'react'++// ─── SVG paths (shield-user) ────────────────────────────────────────────────++const SHIELD_PATH =+ 'M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'++// ─── Shaders ─────────────────────────────────────────────────────────────────++const vert = /* glsl */ `+ attribute vec2 position;+ attribute vec2 uv;+ varying vec2 vUv;+ void main() {+ vUv = uv;+ gl_Position = vec4(position, 0.0, 1.0);+ }+`++const frag = /* glsl */ `+ precision highp float;++ uniform sampler2D tMap;+ uniform float uHover;+ uniform float uTime;+ uniform vec2 uResolution;++ varying vec2 vUv;++ #define GREEN vec3(0.243, 0.812, 0.557)++ // ── Noise ──+ float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+ }++ float noise(vec2 p) {+ vec2 i = floor(p);+ vec2 f = fract(p);+ f = f * f * (3.0 - 2.0 * f);+ return mix(+ mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),+ mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x),+ f.y+ );+ }++ float fbm(vec2 p) {+ float v = 0.0, a = 0.5;+ for (int i = 0; i < 4; i++) {+ v += a * noise(p);+ p *= 2.0;+ a *= 0.5;+ }+ return v;+ }++ // ── Bayer dithering (recursive 8×8) ──+ float bayer2(vec2 a) {+ a = floor(a);+ return fract(a.x / 2.0 + a.y * a.y * 0.75);+ }+ float bayer4(vec2 a) { return bayer2(0.5 * a) * 0.25 + bayer2(a); }+ float bayer8(vec2 a) { return bayer4(0.5 * a) * 0.25 + bayer2(a); }++ void main() {+ float shape = texture2D(tMap, vUv).r;++ if (shape < 0.5) { gl_FragColor = vec4(0.0); return; }++ // Animated FBM noise — continuous drift+ vec2 noiseUv = vUv * 3.0 + vec2(uTime * 0.8, uTime * 0.5);+ float n = fbm(noiseUv);++ float value = n * 0.7 + 0.3;++ // Bayer dithering — divide resolution for bigger dots+ vec2 screenPos = vUv * uResolution / 3.0;+ float dither = bayer8(screenPos);+ float dithered = smoothstep(dither - 0.04, dither + 0.04, value);++ vec3 col = GREEN * dithered;+ float alpha = dithered * uHover;++ gl_FragColor = vec4(col * alpha, alpha);+ }+`++// ─── Helpers ─────────────────────────────────────────────────────────────────++function buildSVGCanvas(size: number): Promise<HTMLCanvasElement> {+ return new Promise((resolve) => {+ const canvas = document.createElement('canvas')+ canvas.width = size+ canvas.height = size+ const ctx = canvas.getContext('2d')!+ const svgSrc = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="${size}" height="${size}">+ <path d="${SHIELD_PATH}" fill="white"/>+ </svg>`+ const blob = new Blob([svgSrc], { type: 'image/svg+xml;charset=utf-8' })+ const url = URL.createObjectURL(blob)+ const img = new Image()+ img.onload = () => {+ ctx.drawImage(img, 0, 0)+ URL.revokeObjectURL(url)+ resolve(canvas)+ }+ img.src = url+ })+}++// ─── Component ───────────────────────────────────────────────────────────────++interface Props {+ hovered: boolean+}++export function ShieldGlow({ hovered }: Props) {+ const canvasRef = useRef<HTMLCanvasElement>(null)+ const liveRef = useRef({ hovered: false, hover: 0 })++ useEffect(() => {+ liveRef.current.hovered = hovered+ }, [hovered])++ useEffect(() => {+ const canvasMaybe = canvasRef.current+ if (!canvasMaybe) return+ const canvas: HTMLCanvasElement = canvasMaybe++ let running = true+ let raf: number++ async function init() {+ const { Renderer, Program, Mesh, Triangle, Texture } = await import('ogl')+ if (!running) return++ const svgCanvas = await buildSVGCanvas(512)+ if (!running) return++ const renderer = new Renderer({+ canvas,+ alpha: true,+ premultipliedAlpha: true,+ dpr: window.devicePixelRatio,+ })+ const gl = renderer.gl+ gl.clearColor(0, 0, 0, 0)++ const texture = new Texture(gl, {+ image: svgCanvas,+ generateMipmaps: false,+ minFilter: gl.LINEAR,+ magFilter: gl.LINEAR,+ })++ const geometry = new Triangle(gl)+ const program = new Program(gl, {+ vertex: vert,+ fragment: frag,+ uniforms: {+ tMap: { value: texture },+ uHover: { value: 0 },+ uTime: { value: 0 },+ uResolution: { value: [canvas.width, canvas.height] },+ },+ transparent: true,+ depthTest: false,+ depthWrite: false,+ })++ const mesh = new Mesh(gl, { geometry, program })++ const container = canvas.parentElement!+ function resize(entries?: ResizeObserverEntry[]) {+ const w = entries?.[0]?.contentRect.width ?? container.offsetWidth+ const h = entries?.[0]?.contentRect.height ?? container.offsetHeight+ renderer.setSize(w, h)+ program.uniforms.uResolution.value = [canvas.width, canvas.height]+ }+ resize()+ const ro = new ResizeObserver(resize)+ ro.observe(container)++ function loop() {+ if (!running) return+ raf = requestAnimationFrame(loop)++ const live = liveRef.current+ const target = live.hovered ? 1 : 0+ live.hover += (target - live.hover) * 0.06++ program.uniforms.uHover.value = live.hover+ program.uniforms.uTime.value = performance.now() / 1000++ renderer.render({ scene: mesh })+ }+ loop()++ return () => ro.disconnect()+ }++ let cleanupResize: (() => void) | undefined+ init().then((c) => {+ cleanupResize = c+ })++ return () => {+ running = false+ cancelAnimationFrame(raf)+ cleanupResize?.()+ }+ }, [])++ return (+ <canvas+ ref={canvasRef}+ width={320}+ height={320}+ className="pointer-events-none absolute inset-0 h-full w-full"+ style={{ mixBlendMode: 'screen' }}+ />+ )+}diff --git a/apps/www/app/(products)/auth/page.tsx b/apps/www/app/(products)/auth/page.tsxnew file mode 100644index 00000000000..92a1d7535d6--- /dev/null+++ b/apps/www/app/(products)/auth/page.tsx@@ -0,0 +1,15 @@+import type { Metadata } from 'next'++import { ApiSection } from './_components/ApiSection'+import { AuthContent } from './_components/AuthContent'+import { RLSSection } from './_components/RLSSection'++export const metadata: Metadata = {+ title: 'Auth | Supabase',+ description:+ 'Add user sign ups and logins to your app. Secure your data with Row Level Security. Works with all major OAuth providers.',+}++export default function AuthPage() {+ return <AuthContent apiSlot={<ApiSection />} rlsSlot={<RLSSection />} />+}diff --git a/apps/www/app/(products)/database/_components/ApiSection.tsx b/apps/www/app/(products)/database/_components/ApiSection.tsxnew file mode 100644index 00000000000..9fae45ed92b--- /dev/null+++ b/apps/www/app/(products)/database/_components/ApiSection.tsx@@ -0,0 +1,412 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'+import { ApiSectionClient } from './ApiSectionClient'++// ── Shiki themes ────────────────────────────────────────────────────────────++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#ffffff' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ { scope: ['markup.underline.link'], settings: { foreground: '#ffffff' } },+ { scope: ['markup.inserted'], settings: { foreground: '#3ecf8e' } },+ { scope: ['markup.deleted'], settings: { foreground: '#F06A50' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#15593b' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#525252' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ { scope: ['markup.underline.link'], settings: { foreground: '#525252' } },+ ],+}++// ── Language → Shiki lang mapping ───────────────────────────────────────────++const LANG_MAP: Record<string, string> = {+ JavaScript: 'javascript',+ Flutter: 'dart',+ Python: 'python',+ 'C#': 'csharp',+ Kotlin: 'kotlin',+ Swift: 'swift',+}++// ── API examples per language ───────────────────────────────────────────────++const API_EXAMPLES = [+ {+ icon: 'Search' as const,+ title: 'Fetch records',+ description: 'Query tables with joins, filters, and ordering in a single request.',+ code: {+ JavaScript: `// Fetch all public rooms with their messages+const { data: rooms } = await supabase+ .from('rooms')+ .select(\`+ id, name, created_at,+ messages ( id, text, user_id )+ \`)+ .eq('public', true)+ .order('created_at', { ascending: false })+ .limit(20)`,+ Flutter: `// Fetch all public rooms with their messages+final rooms = await supabase+ .from('rooms')+ .select('id, name, created_at, messages ( id, text, user_id )')+ .eq('public', true)+ .order('created_at', ascending: false)+ .limit(20);`,+ Python: `# Fetch all public rooms with their messages+rooms = supabase.table("rooms") \\+ .select("id, name, created_at, messages ( id, text, user_id )") \\+ .eq("public", True) \\+ .order("created_at", desc=True) \\+ .limit(20) \\+ .execute()`,+ 'C#': `// Fetch all public rooms with their messages+var rooms = await supabase+ .From<Room>()+ .Select("id, name, created_at, messages ( id, text, user_id )")+ .Filter("public", Operator.Equals, "true")+ .Order("created_at", Ordering.Descending)+ .Limit(20)+ .Get();`,+ Kotlin: `// Fetch all public rooms with their messages+val rooms = supabase.from("rooms")+ .select(Columns.raw("""+ id, name, created_at,+ messages ( id, text, user_id )+ """)) {+ filter { eq("public", true) }+ order("created_at", Order.DESCENDING)+ limit(20)+ }`,+ Swift: `// Fetch all public rooms with their messages+let rooms: [Room] = try await supabase+ .from("rooms")+ .select("id, name, created_at, messages ( id, text, user_id )")+ .eq("public", value: true)+ .order("created_at", ascending: false)+ .limit(20)+ .execute()+ .value`,+ },+ },+ {+ icon: 'Plus' as const,+ title: 'Insert with relations',+ description: 'Create rows across related tables with automatic foreign key resolution.',+ code: {+ JavaScript: `// Create a room and its first message+const { data: room } = await supabase+ .from('rooms')+ .insert({ name: 'Design Team', public: false })+ .select()+ .single()++await supabase+ .from('messages')+ .insert({+ room_id: room.id,+ text: 'Welcome to the team channel!',+ user_id: session.user.id,+ })`,+ Flutter: `// Create a room and its first message+final room = await supabase+ .from('rooms')+ .insert({'name': 'Design Team', 'public': false})+ .select()+ .single();++await supabase+ .from('messages')+ .insert({+ 'room_id': room['id'],+ 'text': 'Welcome to the team channel!',+ 'user_id': session.user.id,+ });`,+ Python: `# Create a room and its first message+room = supabase.table("rooms") \\+ .insert({"name": "Design Team", "public": False}) \\+ .execute()++supabase.table("messages") \\+ .insert({+ "room_id": room.data[0]["id"],+ "text": "Welcome to the team channel!",+ "user_id": session.user.id,+ }) \\+ .execute()`,+ 'C#': `// Create a room and its first message+var room = await supabase+ .From<Room>()+ .Insert(new Room { Name = "Design Team", Public = false })+ .Single();++await supabase+ .From<Message>()+ .Insert(new Message {+ RoomId = room.Id,+ Text = "Welcome to the team channel!",+ UserId = session.User.Id,+ });`,+ Kotlin: `// Create a room and its first message+val room = supabase.from("rooms")+ .insert(Room(name = "Design Team", public = false)) {+ select()+ }.decodeSingle<Room>()++supabase.from("messages")+ .insert(Message(+ roomId = room.id,+ text = "Welcome to the team channel!",+ userId = session.user.id,+ ))`,+ Swift: `// Create a room and its first message+let room: Room = try await supabase+ .from("rooms")+ .insert(["name": "Design Team", "public": false])+ .select()+ .single()+ .execute()+ .value++try await supabase+ .from("messages")+ .insert([+ "room_id": room.id,+ "text": "Welcome to the team channel!",+ "user_id": session.user.id,+ ])+ .execute()`,+ },+ },+ {+ icon: 'ArrowDownUp' as const,+ title: 'Update records',+ description: 'Modify rows with conditions and return the updated data in one call.',+ code: {+ JavaScript: `// Update a room and return the updated row+const { data: updated } = await supabase+ .from('rooms')+ .update({+ name: 'Engineering Team',+ public: false,+ updated_at: new Date().toISOString(),+ })+ .eq('id', roomId)+ .select()+ .single()`,+ Flutter: `// Update a room and return the updated row+final updated = await supabase+ .from('rooms')+ .update({+ 'name': 'Engineering Team',+ 'public': false,+ 'updated_at': DateTime.now().toIso8601String(),+ })+ .eq('id', roomId)+ .select()+ .single();`,+ Python: `# Update a room and return the updated row+updated = supabase.table("rooms") \\+ .update({+ "name": "Engineering Team",+ "public": False,+ "updated_at": datetime.now().isoformat(),+ }) \\+ .eq("id", room_id) \\+ .execute()`,+ 'C#': `// Update a room and return the updated row+var updated = await supabase+ .From<Room>()+ .Filter("id", Operator.Equals, roomId)+ .Set(x => x.Name, "Engineering Team")+ .Set(x => x.Public, false)+ .Set(x => x.UpdatedAt, DateTime.UtcNow)+ .Update()+ .Single();`,+ Kotlin: `// Update a room and return the updated row+val updated = supabase.from("rooms")+ .update({+ Room::name setTo "Engineering Team"+ Room::public setTo false+ Room::updatedAt setTo Clock.System.now()+ }) {+ filter { eq("id", roomId) }+ select()+ }.decodeSingle<Room>()`,+ Swift: `// Update a room and return the updated row+let updated: Room = try await supabase+ .from("rooms")+ .update([+ "name": "Engineering Team",+ "public": false,+ "updated_at": ISO8601DateFormatter().string(from: Date()),+ ])+ .eq("id", value: roomId)+ .select()+ .single()+ .execute()+ .value`,+ },+ },+ {+ icon: 'Filter' as const,+ title: 'Filter & paginate',+ description: 'Full-text search, range queries, and cursor-based pagination built in.',+ code: {+ JavaScript: `// Full-text search with pagination+const { data, count } = await supabase+ .from('rooms')+ .select('id, name, member_count', { count: 'exact' })+ .textSearch('name', 'design')+ .gte('member_count', 5)+ .range(0, 9)+ .order('member_count', { ascending: false })`,+ Flutter: `// Full-text search with pagination+final response = await supabase+ .from('rooms')+ .select('id, name, member_count', const FetchOptions(count: CountOption.exact))+ .textSearch('name', 'design')+ .gte('member_count', 5)+ .range(0, 9)+ .order('member_count', ascending: false);`,+ Python: `# Full-text search with pagination+response = supabase.table("rooms") \\+ .select("id, name, member_count", count="exact") \\+ .text_search("name", "design") \\+ .gte("member_count", 5) \\+ .range(0, 9) \\+ .order("member_count", desc=True) \\+ .execute()`,+ 'C#': `// Full-text search with pagination+var response = await supabase+ .From<Room>()+ .Select("id, name, member_count")+ .Filter("name", Operator.FTS, "design")+ .Filter("member_count", Operator.GreaterThanOrEqual, "5")+ .Range(0, 9)+ .Order("member_count", Ordering.Descending)+ .Get();`,+ Kotlin: `// Full-text search with pagination+val response = supabase.from("rooms")+ .select(Columns.list("id", "name", "member_count")) {+ filter {+ textSearch("name", "design")+ gte("member_count", 5)+ }+ range(0L..9L)+ order("member_count", Order.DESCENDING)+ }`,+ Swift: `// Full-text search with pagination+let response = try await supabase+ .from("rooms")+ .select("id, name, member_count", head: false, count: .exact)+ .textSearch("name", query: "design")+ .gte("member_count", value: 5)+ .range(from: 0, to: 9)+ .order("member_count", ascending: false)+ .execute()`,+ },+ },+]++// ── Server component: pre-highlights all code ───────────────────────────────++export async function ApiSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: Object.values(LANG_MAP),+ })++ const examples = API_EXAMPLES.map((example) => ({+ icon: example.icon,+ title: example.title,+ description: example.description,+ languages: Object.fromEntries(+ Object.entries(example.code).map(([lang, code]) => [+ lang,+ {+ darkHtml: hl.codeToHtml(code, { lang: LANG_MAP[lang], theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(code, { lang: LANG_MAP[lang], theme: 'supabase-light' }),+ },+ ])+ ),+ }))++ hl.dispose()++ return <ApiSectionClient examples={examples} />+}diff --git a/apps/www/app/(products)/database/_components/ApiSectionClient.tsx b/apps/www/app/(products)/database/_components/ApiSectionClient.tsxnew file mode 100644index 00000000000..0740925263e--- /dev/null+++ b/apps/www/app/(products)/database/_components/ApiSectionClient.tsx@@ -0,0 +1,216 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { ArrowDownUp, ChevronDown, Filter, Plus, Search } from 'lucide-react'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { Search, Plus, ArrowDownUp, Filter } as const++type IconName = keyof typeof ICONS++type ApiExample = {+ icon: IconName+ title: string+ description: string+ languages: Record<string, { darkHtml: string; lightHtml: string }>+}++const LANGUAGES = ['JavaScript', 'Flutter', 'Python', 'C#', 'Kotlin', 'Swift']++const INTERVAL_DURATION = 8000++export function ApiSectionClient({ examples }: { examples: ApiExample[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [activeLang, setActiveLang] = useState('JavaScript')+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = examples[activeIdx]++ // Auto-size the code panel to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % examples.length)+ }+ }, [progress, examples.length])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} className="space-y-8 md:space-y-24">+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Never write+ <br />+ <span className="text-foreground">an API again</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ We introspect your database and provide instant APIs. Focus on building your product,+ while Supabase handles the CRUD.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tab cards */}+ <div className="flex flex-col gap-1 items-start justify-end">+ {examples.map((example, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[example.icon]+ return (+ <button+ key={example.title}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl font-medium transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} />+ {example.title}+ </button>+ )+ })}+ </div>++ {/* Right: code block */}+ <motion.div+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative self-end overflow-hidden border border-border rounded-md"+ >+ {/* Invisible measuring copy: drives the animated container height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto pb-12 [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.languages[activeLang]?.darkHtml ?? '' }}+ />++ {/* Language switcher */}+ <div className="absolute top-3 right-4 z-10 flex items-center">+ <div className="relative flex items-center gap-1 text-foreground-muted text-xs">+ <select+ value={activeLang}+ onChange={(e) => setActiveLang(e.target.value)}+ className="appearance-none bg-transparent text-foreground-light text-xs pr-4 cursor-pointer border-none outline-none shadow-none focus:border-none focus:outline-none focus:shadow-none focus:ring-0"+ >+ {LANGUAGES.map((lang) => (+ <option key={lang} value={lang}>+ {lang}+ </option>+ ))}+ </select>+ <ChevronDown size={12} className="absolute right-0 pointer-events-none" />+ </div>+ </div>++ <AnimatePresence mode="wait">+ <motion.div+ key={`${active.title}-${activeLang}`}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto pb-12"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.languages[activeLang]?.darkHtml ?? '' }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{+ __html: active.languages[activeLang]?.lightHtml ?? '',+ }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/guides/database"+ className="absolute bottom-4 right-4 flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </motion.div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/database/_components/DatabaseContent.tsx b/apps/www/app/(products)/database/_components/DatabaseContent.tsxnew file mode 100644index 00000000000..ec3c7ce58cd--- /dev/null+++ b/apps/www/app/(products)/database/_components/DatabaseContent.tsx@@ -0,0 +1,48 @@+import { FeaturesSection } from './FeaturesSection'+import { Hero } from './Hero'+import { HighlightsSection } from './HighlightsSection'+import { QuoteSection } from './QuoteSection'+import { SqlEditorSection } from './SqlEditorSection'+import { TableEditorSection } from './TableEditorSection'+import { VisualDemo } from './VisualDemo'+import { BuiltWithSupabaseSection } from '@/components/BuiltWithSupabaseSection'+import { CTASection } from '@/components/CTASection'++export function DatabaseContent({ apiSlot }: { apiSlot: React.ReactNode }) {+ return (+ <div className="overflow-x-clip">+ <section aria-label="Hero">+ <Hero />+ <VisualDemo />+ </section>+ <section id="features" className="border-t border-border" aria-label="Database features">+ <FeaturesSection />+ </section>+ <section id="quote" className="border-t border-border" aria-label="Customer quote">+ <QuoteSection />+ </section>+ <section id="highlights" className="border-t border-border" aria-label="Database highlights">+ <HighlightsSection />+ </section>+ <section id="table-editor" className="border-t border-border" aria-label="Table editor">+ <TableEditorSection />+ </section>+ <section id="sql-editor" className="border-t border-border" aria-label="SQL editor">+ <SqlEditorSection />+ </section>+ <section id="api" className="border-t border-border" aria-label="API examples">+ {apiSlot}+ </section>+ <section+ id="built-with-supabase"+ className="border-t border-border"+ aria-label="Built with Supabase"+ >+ <BuiltWithSupabaseSection />+ </section>+ <section id="get-started" className="border-t border-border" aria-label="Get started">+ <CTASection />+ </section>+ </div>+ )+}diff --git a/apps/www/app/(products)/database/_components/FeaturesSection.tsx b/apps/www/app/(products)/database/_components/FeaturesSection.tsxnew file mode 100644index 00000000000..2edd765bfdd--- /dev/null+++ b/apps/www/app/(products)/database/_components/FeaturesSection.tsx@@ -0,0 +1,606 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion } from 'framer-motion'+import { Key } from 'lucide-react'+import { useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++import { PostgresGlow } from './Shaders/PostgresGlow'++function SkeletonBar({ className }: { className?: string }) {+ return <div className={cn('rounded bg-foreground-muted/10', className)} />+}++const FEATURES = [+ {+ title: 'Just Postgres',+ description: 'A dedicated Postgres database.',+ detail: '100% portable. Bring your existing Postgres database, or migrate away at any time.',+ visual: PostgresSkeleton,+ },+ {+ title: 'Secure by default',+ description: "Built on Postgres' proven Row Level Security.",+ detail: 'Integrated with JWT authentication which controls exactly what your users can access.',+ visual: RLSSkeleton,+ },+ {+ title: 'Realtime enabled',+ description: 'Data-change listeners over websockets.',+ detail: 'Subscribe and react to database changes, milliseconds after they happen.',+ visual: RealtimeSkeleton,+ },+]++function PostgresSkeleton() {+ const [hovered, setHovered] = useState(false)++ return (+ <div+ role="img"+ aria-label="Postgres elephant logo illustration"+ className="flex items-center justify-center w-full h-full relative"+ style={{+ maskImage: 'radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 75%)',+ WebkitMaskImage: 'radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 75%)',+ }}+ onMouseEnter={() => setHovered(true)}+ onMouseLeave={() => setHovered(false)}+ >+ {/* Abstract construction lines behind the elephant */}+ <svg+ aria-hidden+ className="absolute -inset-16 w-[calc(100%+128px)] h-[calc(100%+128px)] text-foreground-muted/20"+ viewBox="0 0 480 480"+ fill="none"+ >+ <rect+ x="60"+ y="40"+ width="360"+ height="400"+ rx="48"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <rect+ x="30"+ y="10"+ width="420"+ height="460"+ rx="60"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <rect+ x="0"+ y="-16"+ width="480"+ height="512"+ rx="72"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <rect+ x="90"+ y="70"+ width="300"+ height="340"+ rx="36"+ stroke="currentColor"+ strokeWidth="0.5"+ />+ <line x1="30" y1="10" x2="450" y2="470" stroke="currentColor" strokeWidth="0.5" />+ <line x1="450" y1="10" x2="30" y2="470" stroke="currentColor" strokeWidth="0.5" />+ <line x1="240" y1="0" x2="240" y2="480" stroke="currentColor" strokeWidth="0.5" />+ <line x1="0" y1="240" x2="480" y2="240" stroke="currentColor" strokeWidth="0.5" />+ <circle cx="240" cy="240" r="180" stroke="currentColor" strokeWidth="0.5" />+ <circle cx="240" cy="240" r="140" stroke="currentColor" strokeWidth="0.5" />+ <circle cx="240" cy="240" r="100" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="40" x2="60" y2="10" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="40" x2="30" y2="40" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="40" x2="450" y2="40" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="40" x2="420" y2="10" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="440" x2="30" y2="440" stroke="currentColor" strokeWidth="0.5" />+ <line x1="60" y1="440" x2="60" y2="470" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="440" x2="450" y2="440" stroke="currentColor" strokeWidth="0.5" />+ <line x1="420" y1="440" x2="420" y2="470" stroke="currentColor" strokeWidth="0.5" />+ </svg>++ {/* Highlighted lines on hover */}+ <svg+ aria-hidden+ className="absolute -inset-16 w-[calc(100%+128px)] h-[calc(100%+128px)] transition-opacity duration-500"+ style={{ opacity: hovered ? 0.35 : 0 }}+ viewBox="0 0 480 480"+ fill="none"+ >+ <rect+ x="60"+ y="40"+ width="360"+ height="400"+ rx="48"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.4"+ />+ <circle+ cx="240"+ cy="240"+ r="140"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.3"+ />+ <line+ x1="240"+ y1="0"+ x2="240"+ y2="480"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.25"+ />+ <line+ x1="0"+ y1="240"+ x2="480"+ y2="240"+ stroke="hsl(var(--brand-default))"+ strokeWidth="0.75"+ opacity="0.25"+ />+ </svg>++ <div className="relative w-80 h-80">+ <PostgresGlow hovered={hovered} />+ <svg+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 390 430"+ className="w-80 h-80 relative z-[5]"+ style={{+ color: hovered ? 'hsl(var(--brand-default))' : 'hsl(var(--foreground-muted))',+ opacity: hovered ? 1 : 0.8,+ transition: 'color 0.5s, opacity 0.5s',+ }}+ >+ <path+ stroke="currentColor"+ strokeWidth="1.5"+ d="M192.144 125.816h-53.465c-8.506 0-16.159 5.17-19.334 13.061L99.0045 189.43c-3.0613 7.608-1.3448 16.306 4.3775 22.181l10.232 10.506c4.792 4.919 7.474 11.516 7.474 18.384l-.001 14.473c0 20.197 16.373 36.569 36.569 36.569 6.16 0 11.154-4.993 11.154-11.153l.001-86.241c0-18.629 7.441-36.486 20.668-49.602 2.746-2.723 7.178-2.704 9.9.041 2.722 2.745 2.703 7.178-.042 9.9-10.577 10.488-16.526 24.766-16.526 39.661l-.001 86.241c0 13.892-11.262 25.153-25.154 25.153-27.928 0-50.569-22.64-50.569-50.569l.001-14.474c0-3.218-1.257-6.309-3.503-8.615L93.353 221.38c-9.5904-9.847-12.4673-24.424-7.3366-37.176l20.3406-50.553c5.308-13.192 18.101-21.835 32.322-21.835h55.729v.084h10.339c49.104 0 88.91 39.806 88.91 88.91v50.842c0 3.866-3.134 7-7 7s-7-3.134-7-7V200.81c0-41.372-33.538-74.91-74.91-74.91H193.23c-.37 0-.732-.029-1.086-.084Z"+ />+ <path+ stroke="currentColor"+ strokeWidth="1.5"+ d="M210.03 283.94c0-3.866-3.134-7-7-7s-7 3.134-7 7v3.113c0 26.959 21.854 48.814 48.813 48.814 26.351 0 47.825-20.879 48.781-46.996h24.614c3.866 0 7-3.134 7-7s-3.134-7-7-7h-26.841c-30.744 0-60.256-12.083-82.173-33.643-2.756-2.711-7.188-2.675-9.899.081-2.711 2.756-2.675 7.188.081 9.9 21.725 21.371 50.116 34.423 80.228 37.134-.679 18.629-15.995 33.524-34.791 33.524-19.227 0-34.813-15.587-34.813-34.814v-3.113Z"+ />+ <path+ stroke="currentColor"+ strokeWidth="1.5"+ d="M238.03 202.145c0 4.792 3.885 8.677 8.677 8.677s8.676-3.885 8.676-8.677-3.884-8.676-8.676-8.676-8.677 3.884-8.677 8.676Z"+ />+ </svg>+ </div>+ </div>+ )+}++const rlsPolicies = [+ { name: 'Users can read their own profile', op: 'SELECT', clause: 'auth.uid() = id' },+ { name: 'Users can update their own data', op: 'UPDATE', clause: 'auth.uid() = id' },+ { name: 'Users can delete their own posts', op: 'DELETE', clause: 'auth.uid() = id' },+]++const rlsColumns = [+ { name: 'id', format: 'int8', isPrimaryKey: true },+ { name: 'email', format: 'text' },+ { name: 'role', format: 'text' },+]++const rlsRows = [+ { id: '1', email: '[email protected]', role: 'admin' },+ { id: '2', email: '[email protected]', role: 'user' },+]++function RLSSkeleton() {+ const [policyIdx, setPolicyIdx] = useState(0)+ const containerRef = useRef<HTMLDivElement>(null)+ const [isInView, setIsInView] = useState(false)++ useEffect(() => {+ const el = containerRef.current+ if (!el) return+ const observer = new IntersectionObserver(([entry]) => setIsInView(entry.isIntersecting), {+ threshold: 0.3,+ })+ observer.observe(el)+ return () => observer.disconnect()+ }, [])++ useEffect(() => {+ if (!isInView) return+ const timer = setInterval(() => setPolicyIdx((i) => (i + 1) % rlsPolicies.length), 10000)+ return () => clearInterval(timer)+ }, [isInView])++ const policy = rlsPolicies[policyIdx]++ return (+ <div ref={containerRef} className="relative w-full h-full flex flex-col justify-end">+ <div+ className="absolute top-12 -right-24"+ style={{+ maskImage: 'linear-gradient(to right, black 35%, transparent 70%)',+ WebkitMaskImage: 'linear-gradient(to right, black 35%, transparent 70%)',+ }}+ >+ <div className="border border-border rounded-lg overflow-hidden" style={{ maxHeight: 180 }}>+ <table className="w-full border-collapse text-[13px] !mt-0" style={{ minWidth: 360 }}>+ <thead>+ <tr className="bg-surface-200">+ {rlsColumns.map((col) => (+ <th+ key={col.name}+ className="border-b border-r last:border-r-0 border-default px-3 py-1.5 text-left font-normal"+ >+ <div className="flex items-center gap-1.5 overflow-hidden">+ {col.isPrimaryKey && (+ <Key size={12} strokeWidth={2} className="text-brand rotate-45 shrink-0" />+ )}+ <span className="text-foreground text-xs truncate font-medium">+ {col.name}+ </span>+ <span className="text-foreground-light text-xs truncate">{col.format}</span>+ </div>+ </th>+ ))}+ </tr>+ </thead>+ <tbody>+ {rlsRows.map((row) => (+ <tr key={row.id} className="border-b border-default last:border-b-0 bg-surface-75">+ <td className="border-r border-default px-3 py-1.5 text-foreground-muted text-xs">+ {row.id}+ </td>+ <td className="border-r border-default px-3 py-1.5 text-foreground text-xs">+ {row.email}+ </td>+ <td className="px-3 py-1.5 text-foreground-muted text-xs">{row.role}</td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ </div>++ {/* SQL snippet — bottom left */}+ <div className="px-6 pb-4">+ <pre className="text-sm leading-relaxed font-mono text-[#525252] dark:text-white overflow-hidden">+ <span className="text-[#6b35dc] dark:text-[#bda4ff]">CREATE POLICY</span>+ {'\n'}+ <AnimatePresence mode="wait" initial={false}>+ <motion.span+ key={policy.name}+ initial={{ opacity: 0, y: 5 }}+ animate={{ opacity: 1, y: 0 }}+ exit={{ opacity: 0, y: -5 }}+ transition={{ duration: 0.2 }}+ className="inline-block text-[#f1a10d] dark:text-[#ffcda1]"+ >+ "{policy.name}"+ </motion.span>+ </AnimatePresence>+ {'\n'}+ <span className="text-[#6b35dc] dark:text-[#bda4ff]">ON</span>+ {' public.users\n'}+ <span className="text-[#6b35dc] dark:text-[#bda4ff]">FOR </span>+ <AnimatePresence mode="wait" initial={false}>+ <motion.span+ key={policy.op}+ initial={{ opacity: 0, y: 5 }}+ animate={{ opacity: 1, y: 0 }}+ exit={{ opacity: 0, y: -5 }}+ transition={{ duration: 0.2 }}+ className="inline-block text-[#6b35dc] dark:text-[#bda4ff]"+ >+ {policy.op}+ </motion.span>+ </AnimatePresence>{' '}+ <span className="text-[#6b35dc] dark:text-[#bda4ff]">USING</span>+ {'\n ('}+ <AnimatePresence mode="wait" initial={false}>+ <motion.span+ key={policy.clause}+ initial={{ opacity: 0, y: 5 }}+ animate={{ opacity: 1, y: 0 }}+ exit={{ opacity: 0, y: -5 }}+ transition={{ duration: 0.2 }}+ className="inline-block"+ >+ {policy.clause}+ </motion.span>+ </AnimatePresence>+ {');'}+ </pre>+ </div>+ </div>+ )+}++type ChatMsg = { id: number; user: string; text: string }++const initialMessages: ChatMsg[] = [+ { id: 1, user: 'Alice', text: 'Hey, is the deploy ready?' },+ { id: 2, user: 'Bob', text: 'Almost — running final tests now.' },+ { id: 3, user: 'Alice', text: 'Nice, let me know when it\u2019s live.' },+]++const incomingMessages: ChatMsg[] = [+ { id: 4, user: 'Bob', text: 'All green. Deploying now 🚀' },+ { id: 5, user: 'Alice', text: 'Awesome, checking it out.' },+ { id: 6, user: 'Bob', text: 'Latency dropped to 42ms!' },+ { id: 7, user: 'Alice', text: 'That\u2019s a big improvement.' },+ { id: 8, user: 'Bob', text: 'Yeah, the new index helped.' },+ { id: 9, user: 'Alice', text: 'Should we update the docs?' },+ { id: 10, user: 'Bob', text: 'Already on it.' },+]++const chatCols = ['id', 'user', 'text'] as const++function RealtimeSkeleton() {+ const [messages, setMessages] = useState<ChatMsg[]>(initialMessages)+ const [tableFlashId, setTableFlashId] = useState<number | null>(null)+ const [chatFlashId, setChatFlashId] = useState<number | null>(null)+ const containerRef = useRef<HTMLDivElement>(null)+ const tableScrollRef = useRef<HTMLDivElement>(null)+ const chatScrollRef = useRef<HTMLDivElement>(null)+ const [isInView, setIsInView] = useState(false)+ const nextMsgIdx = useRef(0)++ useEffect(() => {+ const el = containerRef.current+ if (!el) return+ const observer = new IntersectionObserver(([entry]) => setIsInView(entry.isIntersecting), {+ threshold: 0.3,+ })+ observer.observe(el)+ return () => observer.disconnect()+ }, [])++ useEffect(() => {+ if (!isInView) return++ const timer = setInterval(() => {+ const msg = incomingMessages[nextMsgIdx.current % incomingMessages.length]+ // Give each added message a unique id+ const newMsg = { ...msg, id: Date.now() + nextMsgIdx.current }+ nextMsgIdx.current++++ // Add to table + flash+ setMessages((prev) => [...prev, newMsg])+ setTableFlashId(newMsg.id)++ // Autoscroll table+ requestAnimationFrame(() => {+ tableScrollRef.current?.scrollTo({+ top: tableScrollRef.current.scrollHeight,+ behavior: 'smooth',+ })+ })++ // Chat updates after short delay (realtime propagation)+ setTimeout(() => {+ setChatFlashId(newMsg.id)+ requestAnimationFrame(() => {+ chatScrollRef.current?.scrollTo({+ top: chatScrollRef.current.scrollHeight,+ behavior: 'smooth',+ })+ })+ setTimeout(() => {+ setTableFlashId(null)+ setChatFlashId(null)+ }, 600)+ }, 200)+ }, 3000)++ return () => clearInterval(timer)+ }, [isInView])++ return (+ <div+ ref={containerRef}+ className="relative w-full h-full flex flex-col justify-end"+ style={{+ maskImage:+ 'linear-gradient(to bottom, black 50%, rgba(0,0,0,0.9) 65%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.1) 85%, transparent 90%)',+ WebkitMaskImage:+ 'linear-gradient(to bottom, black 50%, rgba(0,0,0,0.9) 65%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.1) 85%, transparent 90%)',+ }}+ >+ <div+ className="absolute top-12 -right-24 z-[2]"+ style={{+ maskImage: 'linear-gradient(to right, black 35%, transparent 70%)',+ WebkitMaskImage: 'linear-gradient(to right, black 35%, transparent 70%)',+ }}+ >+ <div+ className="border border-border rounded-lg overflow-hidden bg-surface-75"+ style={{ width: 420 }}+ >+ <table className="w-full border-collapse text-[13px] !mt-0 table-fixed">+ <colgroup>+ <col style={{ width: 72 }} />+ <col style={{ width: 100 }} />+ <col />+ </colgroup>+ <thead>+ <tr className="bg-surface-200">+ <th className="border-b border-r border-default px-3 py-1.5 text-left font-normal">+ <div className="flex items-center gap-1.5 overflow-hidden">+ <Key size={12} strokeWidth={2} className="text-brand rotate-45 shrink-0" />+ <span className="text-foreground text-xs font-medium">id</span>+ <span className="text-foreground-light text-xs">int8</span>+ </div>+ </th>+ <th className="border-b border-r border-default px-3 py-1.5 text-left font-normal">+ <div className="flex items-center gap-1.5 overflow-hidden">+ <span className="text-foreground text-xs font-medium">user</span>+ <span className="text-foreground-light text-xs">text</span>+ </div>+ </th>+ <th className="border-b border-default px-3 py-1.5 text-left font-normal">+ <div className="flex items-center gap-1.5 overflow-hidden">+ <span className="text-foreground text-xs font-medium">text</span>+ <span className="text-foreground-light text-xs">text</span>+ </div>+ </th>+ </tr>+ </thead>+ </table>+ <div+ ref={tableScrollRef}+ className="max-h-[58px] overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"+ >+ <table className="w-full border-collapse text-sm !mt-0 table-fixed">+ <colgroup>+ <col style={{ width: 72 }} />+ <col style={{ width: 100 }} />+ <col />+ </colgroup>+ <tbody className="[&>tr:last-child>td]:border-b-0">+ {messages.map((msg) => (+ <tr+ key={msg.id}+ className={cn(+ 'transition-colors duration-500',+ tableFlashId === msg.id ? 'bg-brand/15 dark:bg-brand/5' : 'bg-surface-75'+ )}+ >+ <td className="border-b border-r border-default px-3 py-1.5 text-foreground-muted text-xs truncate max-w-0">+ {msg.id}+ </td>+ <td className="border-b border-r border-default px-3 py-1.5 text-foreground text-xs truncate max-w-0">+ {msg.user}+ </td>+ <td className="border-b border-default px-3 py-1.5 text-foreground text-xs truncate max-w-0">+ {msg.text}+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ </div>+ </div>++ {/* Connecting dashed lines */}+ <div className="absolute left-1/2 -translate-x-1/2 top-[140px] flex gap-2 z-[1] text-background-surface-300">+ <svg width="2" height="52" fill="none" className="overflow-visible">+ <line+ x1="1"+ y1="0"+ x2="1"+ y2="52"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeDasharray="4 4"+ style={{ animation: 'rlDashFlow 1s linear infinite' }}+ />+ </svg>+ <svg width="2" height="52" fill="none" className="overflow-visible">+ <line+ x1="1"+ y1="0"+ x2="1"+ y2="52"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeDasharray="4 4"+ style={{ animation: 'rlDashFlow 1s linear infinite 0.5s' }}+ />+ </svg>+ <style>{`@keyframes rlDashFlow { to { stroke-dashoffset: -8; } }`}</style>+ </div>++ {/* Chat UI */}+ <div className="px-4 pb-4 relative z-[2]">+ <div className="border border-border rounded-lg overflow-hidden bg-surface-200 max-w-[90%]">+ <div+ ref={chatScrollRef}+ className="h-[120px] overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden flex flex-col gap-2 px-3 py-3"+ style={{+ maskImage: 'linear-gradient(to bottom, transparent 0%, black 20%)',+ WebkitMaskImage: 'linear-gradient(to bottom, transparent 0%, black 20%)',+ }}+ >+ {messages.map((msg) => {+ const isAlice = msg.user === 'Alice'+ return (+ <div key={msg.id} className={cn('flex', isAlice ? 'justify-end' : 'justify-start')}>+ <div+ className={cn(+ 'max-w-[75%] px-3 py-1.5 rounded-xl text-xs leading-snug transition-colors duration-500',+ isAlice+ ? 'bg-brand/15 text-foreground rounded-br-sm'+ : 'bg-surface-300 text-foreground rounded-bl-sm',+ chatFlashId === msg.id && 'ring-1 ring-brand/30'+ )}+ >+ {msg.text}+ </div>+ </div>+ )+ })}+ </div>+ </div>+ </div>+ </div>+ )+}++export function FeaturesSection() {+ return (+ <SectionContainerWithCn className="space-y-8 md:space-y-24">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Everything you need+ <br />+ <span className="text-foreground">from your database</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Every Supabase project is a full Postgres database with realtime functionality,+ fine-grained access controls, and instant APIs — no extra configuration required.+ </p>+ </div>++ {/* 3-col grid */}+ <div className="grid grid-cols-1 md:grid-cols-3 gap-3">+ {FEATURES.map((feature) => {+ const Visual = feature.visual+ return (+ <div+ key={feature.title}+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden"+ >+ {/* Visual with overlaid title */}+ <div className="relative flex items-center justify-center h-[320px]">+ <Visual />+ </div>+ {/* Content */}+ <div className="px-6 py-5 flex flex-col gap-1">+ <h4 className="text-foreground text-sm font-medium">{feature.description}</h4>+ <p className="text-foreground-lighter text-sm">{feature.detail}</p>+ </div>+ </div>+ )+ })}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/database/_components/Hero.tsx b/apps/www/app/(products)/database/_components/Hero.tsxnew file mode 100644index 00000000000..bd9249d04a9--- /dev/null+++ b/apps/www/app/(products)/database/_components/Hero.tsx@@ -0,0 +1,30 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Link from 'next/link'+import { Button } from 'ui'++export function Hero() {+ return (+ <SectionContainerWithCn>+ <div className="flex flex-col gap-6 lg:gap-8">+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h1 className="text-foreground text-3xl sm:text-5xl sm:leading-none">+ <span className="block">Postgres</span>+ <span className="text-foreground-lighter block">without the hassle</span>+ </h1>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Every Supabase project is a dedicated Postgres database. 100% portable with no vendor+ lock-in.+ </p>+ </div>+ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link href="https://supabase.com/dashboard">Start your project</Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link href="/docs/guides/database/overview">Documentation</Link>+ </Button>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/database/_components/HighlightsSection.tsx b/apps/www/app/(products)/database/_components/HighlightsSection.tsxnew file mode 100644index 00000000000..a64273bd9ad--- /dev/null+++ b/apps/www/app/(products)/database/_components/HighlightsSection.tsx@@ -0,0 +1,107 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { Check } from 'lucide-react'+import Image from 'next/image'+import Link from 'next/link'+import { Badge, Button } from 'ui'++type Highlight = {+ title: string+ badge?: string+ features: string[]+ cta: { label: string; href: string }+ image: { dark: string; light: string }+}++const HIGHLIGHTS: Highlight[] = [+ {+ title: 'Branching',+ features: [+ 'Branch your Supabase project',+ 'Sync with your git branches',+ 'Manage every Preview from the Dashboard',+ 'Support for Vercel Previews',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/platform/branching' },+ image: {+ dark: '/images/product/database/branching.svg',+ light: '/images/product/database/branching-light.svg',+ },+ },+ {+ title: 'Read Replicas',+ features: [+ 'Serve data closer to your users',+ 'Provide data redundancy',+ 'Run complex queries without affecting your primary database',+ 'Distribute load across various databases',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/platform/read-replicas' },+ image: {+ dark: '/images/product/database/read-replicas.svg',+ light: '/images/product/database/read-replicas-light.svg',+ },+ },+]++export function HighlightsSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Built for scale+ <br />+ <span className="text-foreground">with powerful new features</span>+ </h3>+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-3">+ {HIGHLIGHTS.map((highlight) => (+ <div+ key={highlight.title}+ className="relative flex flex-col overflow-hidden lg:min-h-[400px] bg-surface-75 border border-border rounded-lg"+ >+ <div className="relative z-10 flex flex-col justify-between h-full p-6 md:p-8 pr-0 md:pr-0">+ <div className="flex flex-col gap-4">+ <div className="flex items-center gap-2">+ <h4 className="text-foreground text-lg font-medium">{highlight.title}</h4>+ {highlight.badge && <Badge variant="success">{highlight.badge}</Badge>}+ </div>+ <ul className="flex flex-col text-foreground-lighter text-sm gap-1.5">+ {highlight.features.map((feature) => (+ <li key={feature} className="flex items-start gap-2">+ <Check className="w-3.5 h-3.5 mt-0.5 shrink-0 stroke-2 text-brand" />+ <span>{feature}</span>+ </li>+ ))}+ </ul>+ </div>+ <div className="mt-6">+ <Button variant="default" size="small" asChild>+ <Link href={highlight.cta.href}>{highlight.cta.label}</Link>+ </Button>+ </div>+ </div>+ {/* Decorative image */}+ <div+ className="hidden sm:flex lg:hidden xl:flex absolute top-0 right-0 bottom-0 items-end h-full opacity-50 dark:opacity-20 select-none"+ aria-hidden+ >+ <Image+ src={highlight.image.dark}+ alt=""+ width={296}+ height={275}+ className="hidden dark:block"+ />+ <Image+ src={highlight.image.light}+ alt=""+ width={296}+ height={275}+ className="dark:hidden"+ />+ </div>+ </div>+ ))}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/database/_components/Illustrations/SpreadsheetIllustration.tsx b/apps/www/app/(products)/database/_components/Illustrations/SpreadsheetIllustration.tsxnew file mode 100644index 00000000000..f37f71250a0--- /dev/null+++ b/apps/www/app/(products)/database/_components/Illustrations/SpreadsheetIllustration.tsx@@ -0,0 +1,196 @@+import { Key } from 'lucide-react'++const columns = [+ { name: 'id', format: 'int8', isPrimaryKey: true },+ { name: 'created_at', format: 'timestamptz' },+ { name: 'name', format: 'text' },+ { name: 'email', format: 'text' },+ { name: 'role', format: 'text' },+ { name: 'is_active', format: 'bool' },+ { name: 'avatar_url', format: 'text' },+]++const rows = [+ {+ id: 1,+ created_at: '2024-01-15 09:23:41+00',+ name: 'Alice Johnson',+ email: '[email protected]',+ role: 'admin',+ is_active: 'true',+ avatar_url: 'https://i.pravatar.cc/150?u=alice',+ },+ {+ id: 2,+ created_at: '2024-01-15 10:45:12+00',+ name: 'Bob Smith',+ email: '[email protected]',+ role: 'editor',+ is_active: 'true',+ avatar_url: 'https://i.pravatar.cc/150?u=bob',+ },+ {+ id: 3,+ created_at: '2024-02-03 14:12:08+00',+ name: 'Carol Williams',+ email: '[email protected]',+ role: 'viewer',+ is_active: 'false',+ avatar_url: 'https://i.pravatar.cc/150?u=carol',+ },+ {+ id: 4,+ created_at: '2024-02-14 08:33:55+00',+ name: 'David Brown',+ email: '[email protected]',+ role: 'editor',+ is_active: 'true',+ avatar_url: 'NULL',+ },+ {+ id: 5,+ created_at: '2024-03-01 16:07:29+00',+ name: 'Eve Martinez',+ email: '[email protected]',+ role: 'admin',+ is_active: 'true',+ avatar_url: 'https://i.pravatar.cc/150?u=eve',+ },+ {+ id: 6,+ created_at: '2024-03-10 11:52:44+00',+ name: 'Frank Lee',+ email: '[email protected]',+ role: 'viewer',+ is_active: 'true',+ avatar_url: 'https://i.pravatar.cc/150?u=frank',+ },+ {+ id: 7,+ created_at: '2024-03-22 07:18:03+00',+ name: 'Grace Kim',+ email: '[email protected]',+ role: 'editor',+ is_active: 'false',+ avatar_url: 'https://i.pravatar.cc/150?u=grace',+ },+ {+ id: 8,+ created_at: '2024-04-05 13:41:17+00',+ name: 'Henry Chen',+ email: '[email protected]',+ role: 'viewer',+ is_active: 'true',+ avatar_url: 'https://i.pravatar.cc/150?u=henry',+ },+ {+ id: 9,+ created_at: '2024-04-12 09:05:33+00',+ name: 'Isla Patel',+ email: '[email protected]',+ role: 'admin',+ is_active: 'true',+ avatar_url: 'https://i.pravatar.cc/150?u=isla',+ },+ {+ id: 10,+ created_at: '2024-04-18 15:22:07+00',+ name: 'Jack Rivera',+ email: '[email protected]',+ role: 'editor',+ is_active: 'false',+ avatar_url: 'NULL',+ },+]++const EDITED_ROW = 1+const EDITED_COL = 'created_at'++export function SpreadsheetIllustration() {+ return (+ <div className="relative w-full">+ <table className="w-full border-collapse text-[13px]" style={{ minWidth: 900 }}>+ <thead>+ <tr className="bg-surface-200">+ {columns.map((col) => (+ <th+ key={col.name}+ className="border-b border-r last:border-r-0 border-default px-3 py-1.5 text-left font-normal"+ >+ <div className="flex items-center gap-1.5 overflow-hidden">+ {col.isPrimaryKey && (+ <Key size={12} strokeWidth={2} className="text-brand rotate-45 shrink-0" />+ )}+ <span className="text-foreground text-xs truncate font-medium">{col.name}</span>+ <span className="text-foreground-light text-xs truncate">{col.format}</span>+ </div>+ </th>+ ))}+ </tr>+ </thead>+ <tbody>+ {rows.map((row) => (+ <tr key={row.id} className="bg-surface-75">+ {columns.map((col) => {+ const value = String(row[col.name as keyof typeof row])+ const isNull = value === 'NULL'+ const isEdited = row.id === EDITED_ROW && col.name === EDITED_COL++ return (+ <td+ key={col.name}+ className={`border-b border-r last:border-r-0 border-secondary px-3 py-1.5 max-w-[200px] ${+ isEdited ? 'bg-brand/10' : ''+ }`}+ >+ <span+ className={`block truncate ${isNull ? 'text-foreground-muted italic' : 'text-foreground'}`}+ >+ {value}+ </span>+ </td>+ )+ })}+ </tr>+ ))}+ </tbody>+ </table>++ {/* Floating cell editor */}+ <div className="absolute top-[42px] left-[105px] w-[280px] rounded-lg border border-strong bg-surface-200 shadow-2xl overflow-hidden z-10">+ <div className="px-3 py-2.5 border-b border-default">+ <div className="rounded bg-brand-400/20 px-2 py-1 text-[11px] text-foreground font-mono">+ 2024-01-15 09:23:41.206064+00+ </div>+ </div>+ <div className="px-3 py-2.5 flex flex-col gap-1">+ <span className="text-[10px] text-foreground-muted">Formatted value:</span>+ <span className="text-[12px] text-foreground font-mono">+ 15 Jan 2024 09:23:41 (+0000)+ </span>+ </div>+ <div className="px-3 pb-3 flex flex-col gap-1.5">+ <div className="flex items-center gap-3">+ <div className="flex items-center gap-2">+ <kbd className="flex items-center justify-center w-6 h-6 rounded border border-default bg-surface-300 text-foreground-light text-[10px]">+ ↵+ </kbd>+ <span className="text-[11px] text-foreground-muted">Save changes</span>+ </div>+ <div className="ml-auto">+ <div className="rounded border border-default bg-surface-100 px-2.5 py-1 text-[10px] text-foreground-light">+ Set to NOW+ </div>+ </div>+ </div>+ <div className="flex items-center gap-2">+ <kbd className="flex items-center justify-center px-1.5 h-6 rounded border border-default bg-surface-300 text-foreground-light text-[10px]">+ Esc+ </kbd>+ <span className="text-[11px] text-foreground-muted">Cancel changes</span>+ </div>+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/app/(products)/database/_components/QuoteSection.tsx b/apps/www/app/(products)/database/_components/QuoteSection.tsxnew file mode 100644index 00000000000..ad4df2c04f2--- /dev/null+++ b/apps/www/app/(products)/database/_components/QuoteSection.tsx@@ -0,0 +1,16 @@+import { QuoteSection as SharedQuoteSection } from '../../_shared/QuoteSection'++export function QuoteSection() {+ return (+ <SharedQuoteSection+ quote="You can have a really great product, but you need to want to work with the people behind it."+ highlight="With Supabase, we always felt very aligned."+ author={{+ name: 'Howard Haynes',+ role: 'CPO at Next Door Lending',+ image: '/images/blog/avatars/howard-haynes.webp',+ link: '/customers/next-door-lending',+ }}+ />+ )+}diff --git a/apps/www/app/(products)/database/_components/Shaders/PostgresGlow.tsx b/apps/www/app/(products)/database/_components/Shaders/PostgresGlow.tsxnew file mode 100644index 00000000000..6daaa48ccc0--- /dev/null+++ b/apps/www/app/(products)/database/_components/Shaders/PostgresGlow.tsx@@ -0,0 +1,229 @@+'use client'++import { useEffect, useRef } from 'react'++// ─── SVG paths (elephant) ────────────────────────────────────────────────────++const PATHS = [+ 'M192.144 125.816h-53.465c-8.506 0-16.159 5.17-19.334 13.061L99.0045 189.43c-3.0613 7.608-1.3448 16.306 4.3775 22.181l10.232 10.506c4.792 4.919 7.474 11.516 7.474 18.384l-.001 14.473c0 20.197 16.373 36.569 36.569 36.569 6.16 0 11.154-4.993 11.154-11.153l.001-86.241c0-18.629 7.441-36.486 20.668-49.602 2.746-2.723 7.178-2.704 9.9.041 2.722 2.745 2.703 7.178-.042 9.9-10.577 10.488-16.526 24.766-16.526 39.661l-.001 86.241c0 13.892-11.262 25.153-25.154 25.153-27.928 0-50.569-22.64-50.569-50.569l.001-14.474c0-3.218-1.257-6.309-3.503-8.615L93.353 221.38c-9.5904-9.847-12.4673-24.424-7.3366-37.176l20.3406-50.553c5.308-13.192 18.101-21.835 32.322-21.835h55.729v.084h10.339c49.104 0 88.91 39.806 88.91 88.91v50.842c0 3.866-3.134 7-7 7s-7-3.134-7-7V200.81c0-41.372-33.538-74.91-74.91-74.91H193.23c-.37 0-.732-.029-1.086-.084Z',+ 'M210.03 283.94c0-3.866-3.134-7-7-7s-7 3.134-7 7v3.113c0 26.959 21.854 48.814 48.813 48.814 26.351 0 47.825-20.879 48.781-46.996h24.614c3.866 0 7-3.134 7-7s-3.134-7-7-7h-26.841c-30.744 0-60.256-12.083-82.173-33.643-2.756-2.711-7.188-2.675-9.899.081-2.711 2.756-2.675 7.188.081 9.9 21.725 21.371 50.116 34.423 80.228 37.134-.679 18.629-15.995 33.524-34.791 33.524-19.227 0-34.813-15.587-34.813-34.814v-3.113Z',+ 'M238.03 202.145c0 4.792 3.885 8.677 8.677 8.677s8.676-3.885 8.676-8.677-3.884-8.676-8.676-8.676-8.677 3.884-8.677 8.676Z',+]++// ─── Shaders ─────────────────────────────────────────────────────────────────++const vert = /* glsl */ `+ attribute vec2 position;+ attribute vec2 uv;+ varying vec2 vUv;+ void main() {+ vUv = uv;+ gl_Position = vec4(position, 0.0, 1.0);+ }+`++// Animated dithered noise over the filled silhouette.+const frag = /* glsl */ `+ precision highp float;++ uniform sampler2D tMap;+ uniform float uHover;+ uniform float uTime;+ uniform vec2 uResolution;++ varying vec2 vUv;++ #define GREEN vec3(0.243, 0.812, 0.557)++ // ── Noise ──+ float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+ }++ float noise(vec2 p) {+ vec2 i = floor(p);+ vec2 f = fract(p);+ f = f * f * (3.0 - 2.0 * f);+ return mix(+ mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),+ mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x),+ f.y+ );+ }++ float fbm(vec2 p) {+ float v = 0.0, a = 0.5;+ for (int i = 0; i < 4; i++) {+ v += a * noise(p);+ p *= 2.0;+ a *= 0.5;+ }+ return v;+ }++ // ── Bayer dithering (recursive 8×8) ──+ float bayer2(vec2 a) {+ a = floor(a);+ return fract(a.x / 2.0 + a.y * a.y * 0.75);+ }+ float bayer4(vec2 a) { return bayer2(0.5 * a) * 0.25 + bayer2(a); }+ float bayer8(vec2 a) { return bayer4(0.5 * a) * 0.25 + bayer2(a); }++ void main() {+ float shape = texture2D(tMap, vUv).r;++ if (shape < 0.5) { gl_FragColor = vec4(0.0); return; }++ // Animated FBM noise — continuous drift+ vec2 noiseUv = vUv * 3.0 + vec2(uTime * 0.8, uTime * 0.5);+ float n = fbm(noiseUv);++ float value = n * 0.7 + 0.3;++ // Bayer dithering — divide resolution for bigger dots+ vec2 screenPos = vUv * uResolution / 3.0;+ float dither = bayer8(screenPos);+ float dithered = smoothstep(dither - 0.04, dither + 0.04, value);++ vec3 col = GREEN * dithered;+ float alpha = dithered * uHover;++ gl_FragColor = vec4(col * alpha, alpha);+ }+`++// ─── Helpers ─────────────────────────────────────────────────────────────────++function buildSVGCanvas(size: number): Promise<HTMLCanvasElement> {+ return new Promise((resolve) => {+ const canvas = document.createElement('canvas')+ canvas.width = size+ canvas.height = size+ const ctx = canvas.getContext('2d')!+ const svgSrc = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 390 430" width="${size}" height="${size}">+ ${PATHS.map((d) => `<path d="${d}" fill="white"/>`).join('')}+ </svg>`+ const blob = new Blob([svgSrc], { type: 'image/svg+xml;charset=utf-8' })+ const url = URL.createObjectURL(blob)+ const img = new Image()+ img.onload = () => {+ ctx.drawImage(img, 0, 0)+ URL.revokeObjectURL(url)+ resolve(canvas)+ }+ img.src = url+ })+}++// ─── Component ───────────────────────────────────────────────────────────────++interface Props {+ hovered: boolean+}++export function PostgresGlow({ hovered }: Props) {+ const canvasRef = useRef<HTMLCanvasElement>(null)+ const liveRef = useRef({ hovered: false, hover: 0 })++ useEffect(() => {+ liveRef.current.hovered = hovered+ }, [hovered])++ useEffect(() => {+ const canvas = canvasRef.current+ if (!canvas) return++ let running = true+ let raf: number++ async function init(canvas: HTMLCanvasElement) {+ const { Renderer, Program, Mesh, Triangle, Texture } = await import('ogl')+ if (!running) return++ const svgCanvas = await buildSVGCanvas(512)+ if (!running) return++ const renderer = new Renderer({+ canvas,+ alpha: true,+ premultipliedAlpha: true,+ dpr: window.devicePixelRatio,+ })+ const gl = renderer.gl+ gl.clearColor(0, 0, 0, 0)++ const texture = new Texture(gl, {+ image: svgCanvas,+ generateMipmaps: false,+ minFilter: gl.LINEAR,+ magFilter: gl.LINEAR,+ })++ const geometry = new Triangle(gl)+ const program = new Program(gl, {+ vertex: vert,+ fragment: frag,+ uniforms: {+ tMap: { value: texture },+ uHover: { value: 0 },+ uTime: { value: 0 },+ uResolution: { value: [canvas.width, canvas.height] },+ },+ transparent: true,+ depthTest: false,+ depthWrite: false,+ })++ const mesh = new Mesh(gl, { geometry, program })++ const container = canvas.parentElement!+ function resize(entries?: ResizeObserverEntry[]) {+ const w = entries?.[0]?.contentRect.width ?? container.offsetWidth+ const h = entries?.[0]?.contentRect.height ?? container.offsetHeight+ renderer.setSize(w, h)+ program.uniforms.uResolution.value = [canvas.width, canvas.height]+ }+ resize()+ const ro = new ResizeObserver(resize)+ ro.observe(container)++ function loop() {+ if (!running) return+ raf = requestAnimationFrame(loop)++ const live = liveRef.current+ const target = live.hovered ? 1 : 0+ live.hover += (target - live.hover) * 0.06++ program.uniforms.uHover.value = live.hover+ program.uniforms.uTime.value = performance.now() / 1000++ renderer.render({ scene: mesh })+ }+ loop()++ return () => ro.disconnect()+ }++ let cleanupResize: (() => void) | undefined+ init(canvas).then((c) => {+ cleanupResize = c+ })++ return () => {+ running = false+ cancelAnimationFrame(raf)+ cleanupResize?.()+ }+ }, [])++ return (+ <canvas+ ref={canvasRef}+ width={320}+ height={320}+ className="absolute inset-0 w-full h-full pointer-events-none"+ style={{ mixBlendMode: 'screen' }}+ />+ )+}diff --git a/apps/www/app/(products)/database/_components/SqlEditorSection.tsx b/apps/www/app/(products)/database/_components/SqlEditorSection.tsxnew file mode 100644index 00000000000..8c031b4ab95--- /dev/null+++ b/apps/www/app/(products)/database/_components/SqlEditorSection.tsx@@ -0,0 +1,185 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { Code, FileDown, Heart, MousePointerClick } from 'lucide-react'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { Code, MousePointerClick, Heart, FileDown } as const++type IconName = keyof typeof ICONS++const TABS = [+ {+ icon: 'Code' as IconName,+ label: 'Full SQL',+ description: 'A full SQL editor built right into the dashboard.',+ image: {+ dark: '/images/product/database/sql-view/sql-editor.png',+ light: '/images/product/database/sql-view/sql-editor-light.png',+ },+ },+ {+ icon: 'MousePointerClick' as IconName,+ label: 'Monaco editor',+ description: 'Built-in Monaco editor, with rich validation and autocomplete.',+ image: {+ dark: '/images/product/database/sql-view/monaco-editor.png',+ light: '/images/product/database/sql-view/monaco-editor-light.png',+ },+ },+ {+ icon: 'Heart' as IconName,+ label: 'Favorite queries',+ description: 'Save your favorite queries to use again and again.',+ image: {+ dark: '/images/product/database/sql-view/favorites.png',+ light: '/images/product/database/sql-view/favorites-light.png',+ },+ },+ {+ icon: 'FileDown' as IconName,+ label: 'Export to CSV',+ description: 'Any output can be exported into a CSV.',+ image: {+ dark: '/images/product/database/sql-view/export.png',+ light: '/images/product/database/sql-view/export-csv-light.png',+ },+ },+]++const INTERVAL_DURATION = 8000++export function SqlEditorSection() {+ const [activeIdx, setActiveIdx] = useState(0)+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = TABS[activeIdx]++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % TABS.length)+ }+ }, [progress])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} className="space-y-8 md:space-y-24">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Write and run queries with a+ <br />+ <span className="text-foreground">full SQL Editor</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Write, run, and save SQL queries directly from the dashboard with full autocomplete and+ syntax highlighting.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tabs */}+ <div className="flex flex-col gap-1 items-start justify-end">+ {TABS.map((tab, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[tab.icon]+ return (+ <button+ key={tab.label}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl font-medium transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} />+ {tab.label}+ </button>+ )+ })}+ </div>++ {/* Right: image + footer */}+ <div className="flex flex-col border border-border rounded-md overflow-clip bg-surface-75">+ <div className="relative aspect-[16/7.5] shrink-0 overflow-hidden rounded-t-md flex items-end justify-center">+ <AnimatePresence mode="wait">+ <motion.div+ key={active.label}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.2, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.1 } }}+ className="absolute inset-0 flex items-end justify-center px-6"+ >+ <img+ src={active.image.dark}+ alt={active.label}+ className="absolute inset-0 object-cover pointer-events-none hidden dark:block"+ />+ <img+ src={active.image.light}+ alt={active.label}+ className="absolute inset-0 object-cover pointer-events-none dark:hidden"+ />+ </motion.div>+ </AnimatePresence>+ </div>++ {/* Footer: active tab info */}+ <div className="border-t border-border px-6 py-4 flex items-center gap-8 justify-between bg-surface-100">+ <AnimatePresence mode="wait">+ <motion.div+ key={active.label}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="flex flex-col gap-1"+ >+ <h4 className="text-sm font-medium text-foreground">{active.label}</h4>+ <p className="text-sm text-foreground-lighter">{active.description}</p>+ </motion.div>+ </AnimatePresence>+ </div>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/database/_components/TableEditorSection.tsx b/apps/www/app/(products)/database/_components/TableEditorSection.tsxnew file mode 100644index 00000000000..0d4cacf8a97--- /dev/null+++ b/apps/www/app/(products)/database/_components/TableEditorSection.tsx@@ -0,0 +1,192 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { FileDown, Link2, Table, TableProperties } from 'lucide-react'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { TableProperties, Table, Link2, FileDown } as const++type IconName = keyof typeof ICONS++type Tab = {+ icon: IconName+ label: string+ description: string+ image: { dark: string; light: string }+}++const TABS: Tab[] = [+ {+ icon: 'TableProperties',+ label: 'Spreadsheet editing',+ description: 'Add, edit, and update your data with the simplicity of a no-code tool.',+ image: {+ dark: '/images/product/database/table-view/spreadsheet.png',+ light: '/images/product/database/table-view/table-editor-light.png',+ },+ },+ {+ icon: 'Table',+ label: 'Create tables',+ description: 'Add tables, columns and rows without writing SQL.',+ image: {+ dark: '/images/product/database/table-view/create-tables.png',+ light: '/images/product/database/table-view/create-table-light.png',+ },+ },+ {+ icon: 'Link2',+ label: 'Foreign keys',+ description: 'Build connections across tables with the full power of relational data.',+ image: {+ dark: '/images/product/database/table-view/foreign-keys.png',+ light: '/images/product/database/table-view/foreign-keys-light.png',+ },+ },+ {+ icon: 'FileDown',+ label: 'Export to CSV',+ description: 'Pick the rows you want and export them into a CSV.',+ image: {+ dark: '/images/product/database/table-view/export-csv.png',+ light: '/images/product/database/table-view/export-csv-light.png',+ },+ },+]++const INTERVAL_DURATION = 8000++export function TableEditorSection() {+ const [activeIdx, setActiveIdx] = useState(0)+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = TABS[activeIdx]++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % TABS.length)+ }+ }, [progress])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} className="space-y-8 md:space-y-24">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Manage your data with a+ <br />+ <span className="text-foreground">built-in Table Editor</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Manage your data with a spreadsheet-like interface. Create tables, set up relationships,+ and export — no SQL required.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tabs */}+ <div className="flex flex-col gap-1 items-start justify-end">+ {TABS.map((tab, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[tab.icon]+ return (+ <button+ key={tab.label}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl font-medium transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} />+ {tab.label}+ </button>+ )+ })}+ </div>++ {/* Right: image + footer */}+ <div className="flex flex-col border border-border rounded-md overflow-clip bg-surface-75">+ <div className="relative aspect-[16/7.5] shrink-0 overflow-hidden rounded-t-md flex items-end justify-center">+ <AnimatePresence mode="wait">+ <motion.div+ key={active.label}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.2, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.1 } }}+ className="absolute inset-0 flex items-end justify-center px-6"+ >+ <img+ src={active.image.dark}+ alt={active.label}+ className="absolute inset-0 object-cover pointer-events-none hidden dark:block"+ />+ <img+ src={active.image.light}+ alt={active.label}+ className="absolute inset-0 object-cover pointer-events-none dark:hidden"+ />+ </motion.div>+ </AnimatePresence>+ </div>++ {/* Footer: active tab info */}+ <div className="border-t border-border px-6 py-4 flex items-center gap-8 justify-between bg-surface-100">+ <AnimatePresence mode="wait">+ <motion.div+ key={active.label}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="flex flex-col gap-1"+ >+ <h4 className="text-sm font-medium text-foreground">{active.label}</h4>+ <p className="text-sm text-foreground-lighter">{active.description}</p>+ </motion.div>+ </AnimatePresence>+ </div>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/database/_components/VisualDemo.tsx b/apps/www/app/(products)/database/_components/VisualDemo.tsxnew file mode 100644index 00000000000..7dddbc3e2f3--- /dev/null+++ b/apps/www/app/(products)/database/_components/VisualDemo.tsx@@ -0,0 +1,599 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion } from 'framer-motion'+import { ChevronDown, Filter, Key, List } from 'lucide-react'+import { useEffect, useRef, useState } from 'react'+import { Button } from 'ui'++const columns = [+ { name: 'id', format: 'int8', isPrimaryKey: true },+ { name: 'created_at', format: 'timestamptz' },+ { name: 'name', format: 'text' },+ { name: 'email', format: 'text' },+ { name: 'role', format: 'text' },+ { name: 'is_active', format: 'bool' },+ { name: 'avatar_url', format: 'text' },+]++type Row = {+ id: number+ created_at: string+ name: string+ email: string+ role: string+ is_active: boolean+ avatar_url: string+}++const initialRows: Row[] = [+ {+ id: 1,+ created_at: '2024-01-15 09:23:41+00',+ name: 'Alice Johnson',+ email: '[email protected]',+ role: 'admin',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=alice',+ },+ {+ id: 2,+ created_at: '2024-01-15 10:45:12+00',+ name: 'Bob Smith',+ email: '[email protected]',+ role: 'editor',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=bob',+ },+ {+ id: 3,+ created_at: '2024-02-03 14:12:08+00',+ name: 'Carol Williams',+ email: '[email protected]',+ role: 'viewer',+ is_active: false,+ avatar_url: 'https://i.pravatar.cc/150?u=carol',+ },+ {+ id: 4,+ created_at: '2024-02-14 08:33:55+00',+ name: 'David Brown',+ email: '[email protected]',+ role: 'editor',+ is_active: true,+ avatar_url: 'NULL',+ },+ {+ id: 5,+ created_at: '2024-03-01 16:07:29+00',+ name: 'Eve Martinez',+ email: '[email protected]',+ role: 'admin',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=eve',+ },+ {+ id: 6,+ created_at: '2024-03-10 11:52:44+00',+ name: 'Frank Lee',+ email: '[email protected]',+ role: 'viewer',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=frank',+ },+ {+ id: 7,+ created_at: '2024-03-22 07:18:03+00',+ name: 'Grace Kim',+ email: '[email protected]',+ role: 'editor',+ is_active: false,+ avatar_url: 'https://i.pravatar.cc/150?u=grace',+ },+ {+ id: 8,+ created_at: '2024-04-05 13:41:17+00',+ name: 'Henry Chen',+ email: '[email protected]',+ role: 'viewer',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=henry',+ },+ {+ id: 9,+ created_at: '2024-04-12 09:05:33+00',+ name: 'Isla Patel',+ email: '[email protected]',+ role: 'admin',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=isla',+ },+ {+ id: 10,+ created_at: '2024-04-18 15:22:07+00',+ name: 'Jack Rivera',+ email: '[email protected]',+ role: 'editor',+ is_active: false,+ avatar_url: 'NULL',+ },+ {+ id: 11,+ created_at: '2024-05-02 11:48:19+00',+ name: 'Karen Nguyen',+ email: '[email protected]',+ role: 'viewer',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=karen',+ },+ {+ id: 12,+ created_at: '2024-05-09 08:14:52+00',+ name: "Liam O'Brien",+ email: '[email protected]',+ role: 'editor',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=liam',+ },+ {+ id: 13,+ created_at: '2024-05-21 17:33:28+00',+ name: 'Mia Tanaka',+ email: '[email protected]',+ role: 'admin',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=mia',+ },+ {+ id: 14,+ created_at: '2024-06-01 10:07:41+00',+ name: 'Noah Garcia',+ email: '[email protected]',+ role: 'viewer',+ is_active: false,+ avatar_url: 'https://i.pravatar.cc/150?u=noah',+ },+ {+ id: 15,+ created_at: '2024-06-14 14:55:03+00',+ name: 'Olivia Schmidt',+ email: '[email protected]',+ role: 'editor',+ is_active: true,+ avatar_url: 'NULL',+ },+ {+ id: 16,+ created_at: '2024-06-23 06:29:17+00',+ name: 'Pablo Morales',+ email: '[email protected]',+ role: 'viewer',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=pablo',+ },+ {+ id: 17,+ created_at: '2024-07-04 12:11:44+00',+ name: 'Quinn Foster',+ email: '[email protected]',+ role: 'admin',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=quinn',+ },+ {+ id: 18,+ created_at: '2024-07-15 19:38:56+00',+ name: 'Ruby Aoki',+ email: '[email protected]',+ role: 'editor',+ is_active: false,+ avatar_url: 'https://i.pravatar.cc/150?u=ruby',+ },+ {+ id: 19,+ created_at: '2024-07-28 07:52:10+00',+ name: 'Sam Walker',+ email: '[email protected]',+ role: 'viewer',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=sam',+ },+ {+ id: 20,+ created_at: '2024-08-03 16:04:33+00',+ name: 'Tara Singh',+ email: '[email protected]',+ role: 'admin',+ is_active: true,+ avatar_url: 'https://i.pravatar.cc/150?u=tara',+ },+]++const namePool = [+ 'Uri Petrov',+ 'Vera Costa',+ 'Will Chang',+ 'Xena Müller',+ 'Yuki Sato',+ 'Zara Ahmed',+ 'Felix Braun',+ 'Luna Park',+ 'Oscar Diaz',+ 'Nina Rossi',+]+const rolePool = ['admin', 'editor', 'viewer']+const editableFields = ['name', 'email', 'role', 'is_active'] as const+const nameEdits = [+ 'Alex Turner',+ 'Sofia Reyes',+ 'Marcus Cole',+ 'Priya Sharma',+ 'Leo Zhang',+ 'Dana Okafor',+]+const emailEdits = [+ '[email protected]',+ '[email protected]',+ '[email protected]',+ '[email protected]',+]++function randomTimestamp(): string {+ const m = String(Math.floor(Math.random() * 12) + 1).padStart(2, '0')+ const d = String(Math.floor(Math.random() * 28) + 1).padStart(2, '0')+ const h = String(Math.floor(Math.random() * 24)).padStart(2, '0')+ const min = String(Math.floor(Math.random() * 60)).padStart(2, '0')+ const sec = String(Math.floor(Math.random() * 60)).padStart(2, '0')+ return `2025-${m}-${d} ${h}:${min}:${sec}+00`+}++function pick<T>(arr: readonly T[]): T {+ return arr[Math.floor(Math.random() * arr.length)]+}++function formatCellValue(value: unknown): string {+ if (value === null || value === undefined) return 'NULL'+ if (typeof value === 'boolean') return value.toString()+ return String(value)+}++// ── Stable identity for each row instance ──+// Every row gets a unique _uid that never changes and is never reused.+let uidCounter = 0+type URow = Row & { _uid: string }++function stampRow(row: Row): URow {+ return { ...row, _uid: `u${++uidCounter}` }+}++// ── Flash state: at most one thing highlighted at a time ──+type Flash = {+ type: 'modify' | 'add' | 'delete'+ uid: string // row _uid+ col?: string // column name, only for 'modify'+} | null++export function VisualDemo() {+ // All rows carry a stable _uid used as the sole React key.+ const [initialStamped] = useState<URow[]>(() => initialRows.map(stampRow))+ const [rows, setRows] = useState<URow[]>(initialStamped)+ const [introComplete, setIntroComplete] = useState(false)+ const [flash, setFlash] = useState<Flash>(null)+ const [isInView, setIsInView] = useState(false)+ const containerRef = useRef<HTMLDivElement>(null)++ useEffect(() => {+ const el = containerRef.current+ if (!el) return+ const observer = new IntersectionObserver(([entry]) => setIsInView(entry.isIntersecting), {+ threshold: 0.1,+ })+ observer.observe(el)+ return () => observer.disconnect()+ }, [])++ // Map from _uid → stagger order for intro animation+ const introOrder = useRef<Record<string, number>>({})+ if (Object.keys(introOrder.current).length === 0) {+ initialStamped.forEach((r, i) => {+ introOrder.current[r._uid] = i+ })+ }++ // Mutable refs so the action loop never needs to re-create.+ const rowsRef = useRef(rows)+ rowsRef.current = rows+ const nextId = useRef(initialRows.length + 1)+ const deleted = useRef<URow[]>([])++ // Per-cell version counter: bumped on every modify so the AnimatePresence+ // key always changes, even if the display value happens to stay the same.+ const cellVer = useRef<Record<string, number>>({})+ function bumpCellVer(uid: string, col: string) {+ const k = `${uid}.${col}`+ cellVer.current[k] = (cellVer.current[k] || 0) + 1+ }+ function getCellVer(uid: string, col: string) {+ return cellVer.current[`${uid}.${col}`] || 0+ }++ // ── Intro stagger ──+ const introMs = (initialRows.length * 0.025 + 0.36) * 1000 + 200+ useEffect(() => {+ const t = setTimeout(() => setIntroComplete(true), introMs)+ return () => clearTimeout(t)+ }, [introMs])++ // ── Action loop — one action at a time, only while in view ──+ useEffect(() => {+ if (!introComplete || !isInView) return+ let cancelled = false+ let timer: ReturnType<typeof setTimeout>++ function schedule() {+ const delay = 1500 + Math.random() * 2500+ timer = setTimeout(() => {+ if (cancelled) return+ runAction(() => {+ if (!cancelled) schedule()+ })+ }, delay)+ }++ function runAction(onDone: () => void) {+ const cur = rowsRef.current+ const actions = ['modify', 'modify', 'delete', 'add'] as const+ let action = pick(actions)+ if (action === 'delete' && cur.length <= 20) action = 'add'++ if (action === 'modify') {+ const row = pick(cur)+ const field = pick(editableFields)+ const updated = { ...row }++ if (field === 'name') updated.name = pick(nameEdits)+ else if (field === 'email') {+ const u = updated.name.toLowerCase().split(' ')[0]+ updated.email = Math.random() > 0.5 ? `${u}@example.com` : pick(emailEdits)+ } else if (field === 'role') {+ updated.role = pick(rolePool.filter((r) => r !== updated.role))+ } else {+ updated.is_active = !updated.is_active+ }++ bumpCellVer(row._uid, field)+ setFlash({ type: 'modify', uid: row._uid, col: field })+ setRows((prev) => prev.map((r) => (r._uid === row._uid ? updated : r)))++ setTimeout(() => {+ setFlash(null)+ onDone()+ }, 800)+ return+ }++ if (action === 'delete') {+ const row = pick(cur)+ // Flash red and remove simultaneously — flash stays visible during exit animation+ setFlash({ type: 'delete', uid: row._uid })+ deleted.current.push(row)+ setRows((prev) => prev.filter((r) => r._uid !== row._uid))++ setTimeout(() => {+ setFlash(null)+ onDone()+ }, 600)+ return+ }++ // ── add ──+ let base: Row+ if (deleted.current.length > 0 && Math.random() > 0.3) {+ const i = Math.floor(Math.random() * deleted.current.length)+ base = { ...deleted.current[i], id: nextId.current++ }+ deleted.current.splice(i, 1)+ } else {+ const name = pick(namePool)+ const u = name.toLowerCase().split(' ')[0]+ base = {+ id: nextId.current++,+ created_at: randomTimestamp(),+ name,+ email: `${u}@example.com`,+ role: pick(rolePool),+ is_active: Math.random() > 0.3,+ avatar_url: Math.random() > 0.2 ? `https://i.pravatar.cc/150?u=${u}` : 'NULL',+ }+ }++ const newRow = stampRow(base)+ setFlash({ type: 'add', uid: newRow._uid })+ setRows((prev) => {+ const pos = Math.floor(Math.random() * (prev.length + 1))+ const next = [...prev]+ next.splice(pos, 0, newRow)+ return next+ })++ setTimeout(() => {+ setFlash(null)+ onDone()+ }, 800)+ }++ schedule()+ return () => {+ cancelled = true+ clearTimeout(timer)+ }+ }, [introComplete, isInView])++ return (+ <div ref={containerRef} className="border-t border-border relative">+ <SectionContainerWithCn height="none" className="pb-16 md:pb-24">+ <div className="pt-8 md:pt-0 md:-translate-y-16 relative w-full h-[620px]">+ {/* Gradient blob behind card */}+ <div+ className="pointer-events-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 h-[105%] w-[102%] rounded-[300px] blur-[50px] dark:blur-[24px] dark:saturate-[0.4] dark:brightness-50"+ style={{+ backgroundImage:+ 'linear-gradient(90deg, rgba(62, 207, 142, 0.2) 0%, rgba(151, 62, 198, 0.2) 50%, rgba(62, 207, 142, 0.2) 100%)',+ }}+ />+ {/* Card */}+ <div+ className="relative z-10 w-full h-full rounded-xl border border-border bg-surface-75 overflow-hidden flex flex-col"+ style={{+ boxShadow:+ '0 0 0 0.5px var(--shadow-border-color), 0 149px 199px 0 rgba(0,0,0,0.07), 0 62.249px 83.137px 0 rgba(0,0,0,0.05), 0 33.281px 44.449px 0 rgba(0,0,0,0.04), 0 18.657px 24.918px 0 rgba(0,0,0,0.04), 0 9.909px 13.234px 0 rgba(0,0,0,0.03), 0 4.123px 5.507px 0 rgba(0,0,0,0.02)',+ }}+ >+ {/* Toolbar */}+ <div className="flex items-center gap-2 px-1.5 h-10 border-b border-default bg-surface-200 shrink-0">+ <button className="flex items-center gap-1.5 px-2 py-1 rounded text-xs text-foreground-light hover:text-foreground transition-colors">+ <Filter size={14} strokeWidth={1.5} />+ <span>Filter</span>+ </button>+ <button className="flex items-center gap-1.5 px-2 py-1 rounded text-xs text-foreground-light hover:text-foreground transition-colors">+ <List size={14} strokeWidth={1.5} />+ <span>Sort</span>+ </button>+ <Button+ size="tiny"+ className="ml-auto"+ iconRight={<ChevronDown size={12} strokeWidth={2} />}+ >+ Insert+ </Button>+ </div>++ {/* Grid */}+ <div+ className="overflow-hidden"+ style={{+ maskImage: 'linear-gradient(to bottom, rgba(0,0,0,0.85) 80%, transparent 100%)',+ WebkitMaskImage:+ 'linear-gradient(to bottom, rgba(0,0,0,0.85) 80%, transparent 100%)',+ }}+ >+ <div className="overflow-hidden">+ <table+ className="w-full border-collapse text-[13px] !mt-0"+ style={{ minWidth: 900 }}+ >+ <thead>+ <tr className="bg-surface-200">+ {columns.map((col) => (+ <th+ key={col.name}+ className="border-b border-r last:border-r-0 border-default px-3 py-1.5 text-left font-normal"+ >+ <div className="flex items-center gap-1.5 overflow-hidden">+ {col.isPrimaryKey && (+ <Key+ size={12}+ strokeWidth={2}+ className="text-brand rotate-45 shrink-0"+ />+ )}+ <span className="text-foreground text-xs truncate font-medium">+ {col.name}+ </span>+ <span className="text-foreground-light text-xs truncate">+ {col.format}+ </span>+ </div>+ </th>+ ))}+ </tr>+ </thead>+ <tbody>+ <AnimatePresence initial={true}>+ {rows.map((row) => (+ <motion.tr+ key={row._uid}+ layout+ className="bg-surface-75"+ initial={{ opacity: 0, height: 0 }}+ animate={{ opacity: 1, height: 'auto' }}+ exit={{ opacity: 0, height: 0 }}+ transition={+ !introComplete+ ? {+ opacity: {+ duration: 0.36,+ delay: (introOrder.current[row._uid] ?? 0) * 0.025,+ ease: [0.25, 0.1, 0.25, 1],+ },+ height: { duration: 0 },+ }+ : {+ layout: { duration: 0.3, ease: [0.25, 0.1, 0.25, 1] },+ opacity: { duration: 0.2 },+ height: { duration: 0.3 },+ }+ }+ >+ {columns.map((col) => {+ const value = row[col.name as keyof Row]+ const displayValue = formatCellValue(value)+ const isNull = displayValue === 'NULL'+ const isBool = col.format === 'bool'++ const isModifiedCell =+ flash?.type === 'modify' &&+ flash.uid === row._uid &&+ flash.col === col.name+ const isAddedRow = flash?.type === 'add' && flash.uid === row._uid+ const isDeletedRow = flash?.type === 'delete' && flash.uid === row._uid++ const cellBg = isDeletedRow+ ? 'hsl(var(--destructive-default) / 0.15)'+ : isModifiedCell || isAddedRow+ ? 'hsl(var(--brand-default) / 0.15)'+ : undefined++ const ver = getCellVer(row._uid, col.name)++ return (+ <td+ key={col.name}+ className="border-b border-r last:border-r-0 border-secondary px-3 py-1.5 max-w-[200px] transition-colors duration-500"+ style={cellBg ? { backgroundColor: cellBg } : undefined}+ >+ <AnimatePresence mode="wait" initial={false}>+ <motion.span+ key={`${row._uid}.${col.name}.${ver}`}+ className={`block truncate ${+ isNull ? 'text-foreground-muted italic' : 'text-foreground'+ }`}+ initial={{ opacity: 0, y: 4 }}+ animate={{ opacity: 1, y: 0 }}+ exit={{ opacity: 0, y: -4 }}+ transition={{ duration: 0.15 }}+ >+ {isNull+ ? 'NULL'+ : isBool+ ? value+ ? 'true'+ : 'false'+ : displayValue}+ </motion.span>+ </AnimatePresence>+ </td>+ )+ })}+ </motion.tr>+ ))}+ </AnimatePresence>+ </tbody>+ </table>+ </div>+ </div>+ </div>+ </div>+ </SectionContainerWithCn>+ </div>+ )+}diff --git a/apps/www/app/(products)/database/page.tsx b/apps/www/app/(products)/database/page.tsxnew file mode 100644index 00000000000..f699b84f336--- /dev/null+++ b/apps/www/app/(products)/database/page.tsx@@ -0,0 +1,14 @@+import type { Metadata } from 'next'++import { ApiSection } from './_components/ApiSection'+import { DatabaseContent } from './_components/DatabaseContent'++export const metadata: Metadata = {+ title: 'Database | Supabase',+ description:+ 'Every Supabase project is a dedicated Postgres database. 100% portable with no vendor lock-in.',+}++export default function DatabasePage() {+ return <DatabaseContent apiSlot={<ApiSection />} />+}diff --git a/apps/www/app/(products)/edge-functions/_components/CTASection.tsx b/apps/www/app/(products)/edge-functions/_components/CTASection.tsxnew file mode 100644index 00000000000..fcba5d1665f--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/CTASection.tsx@@ -0,0 +1,93 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import Link from 'next/link'+import { useEffect, useRef, useState } from 'react'+import { Button } from 'ui'++const TERMINAL_LINES = [+ { text: '$ supabase functions new hello-world', delay: 0 },+ { text: 'Created function: supabase/functions/hello-world/index.ts', delay: 0.3, dim: true },+ { text: '', delay: 0.5 },+ { text: '$ supabase functions deploy hello-world', delay: 0.6 },+ { text: 'Bundling function...', delay: 0.9, dim: true },+ { text: 'Deploying to 30+ regions...', delay: 1.1, dim: true },+ { text: '', delay: 1.3 },+ { text: '✓ Function deployed:', delay: 1.4, accent: true },+ { text: ' https://your-project.supabase.co/functions/v1/hello-world', delay: 1.5, accent: true },+]++function TerminalAnimation() {+ const ref = useRef<HTMLDivElement>(null)+ const inView = useInView(ref, { once: true, amount: 0.5 })+ const [visibleCount, setVisibleCount] = useState(0)++ useEffect(() => {+ if (!inView) return+ const timeouts: ReturnType<typeof setTimeout>[] = []+ TERMINAL_LINES.forEach((line, i) => {+ timeouts.push(setTimeout(() => setVisibleCount(i + 1), line.delay * 1000))+ })+ return () => timeouts.forEach(clearTimeout)+ }, [inView])++ return (+ <div+ ref={ref}+ className="w-full max-w-xl mx-auto rounded-lg border border-border bg-surface-75 overflow-hidden"+ >+ {/* Title bar */}+ <div className="flex items-center gap-1.5 px-2 py-2 border-b border-border bg-surface-200">+ <span className="ml-2 text-xs text-foreground-muted font-mono uppercase">Terminal</span>+ </div>+ {/* Lines */}+ <div className="px-4 md:px-6 font-mono text-xs md:text-sm leading-relaxed h-[280px] flex flex-col justify-start items-start text-left pt-4">+ <AnimatePresence>+ {TERMINAL_LINES.slice(0, visibleCount).map((line, i) => (+ <motion.div+ key={i}+ initial={{ opacity: 0, y: 1 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: 0.2 }}+ className={+ line.accent ? 'text-brand' : line.dim ? 'text-foreground-light' : 'text-foreground'+ }+ >+ {line.text || '\u00A0'}+ </motion.div>+ ))}+ </AnimatePresence>+ </div>+ </div>+ )+}++export function CTASection() {+ return (+ <SectionContainerWithCn height="none">+ <div className="flex flex-col items-center text-center gap-10 py-24 md:py-32">+ <div className="flex flex-col items-center gap-4">+ <h2 className="text-2xl md:text-4xl text-foreground">+ Deploy your first function+ <span className="block text-foreground-lighter">in under a minute</span>+ </h2>+ <p className="text-foreground-lighter text-sm max-w-md">+ Two commands. Global deployment. No infrastructure to manage.+ </p>+ </div>++ <TerminalAnimation />++ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link href="https://supabase.com/dashboard">Start your project</Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link href="/docs/guides/functions/quickstart">Quickstart guide</Link>+ </Button>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/EdgeFunctionsContent.tsx b/apps/www/app/(products)/edge-functions/_components/EdgeFunctionsContent.tsxnew file mode 100644index 00000000000..ed9e1b7a0ca--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/EdgeFunctionsContent.tsx@@ -0,0 +1,58 @@+import { QuoteSection } from '../../_shared/QuoteSection'+import { CTASection } from './CTASection'+import { ExamplesSection } from './ExamplesSection'+import { GlobalPresenceSection } from './GlobalPresenceSection'+import { Hero } from './Hero'+import { Highlights } from './Highlights'+import { IntegratesSection } from './IntegratesSection'+import { LocalDXSection } from './LocalDXSection'+import { ObservabilitySection } from './ObservabilitySection'++export function EdgeFunctionsContent() {+ return (+ <div className="overflow-x-clip">+ <section className="border-t border-border" aria-label="Hero">+ <Hero />+ <Highlights />+ </section>+ <section id="quote" className="border-t border-border" aria-label="Customer quote">+ <QuoteSection+ quote="Supabase gave us the flexibility and scalability needed at every growth stage."+ highlight="It's rare to find a tool that works just as well for startups as it does for large-scale operations."+ author={{+ name: 'Zeno Rocha',+ role: 'CEO at Resend',+ image: '/images/blog/avatars/zeno-rocha.png',+ link: '/customers/resend',+ }}+ />+ </section>+ <section id="examples" className="border-t border-border" aria-label="Example projects">+ <ExamplesSection />+ </section>+ <section+ id="local-dx"+ className="border-t border-border"+ aria-label="Local developer experience"+ >+ <LocalDXSection />+ </section>+ <section id="global-presence" className="border-t border-border" aria-label="Global presence">+ <GlobalPresenceSection />+ </section>+ <section id="observability" className="border-t border-border" aria-label="Observability">+ <ObservabilitySection />+ </section>+ <section+ id="integrations"+ className="border-y border-border"+ aria-label="Supabase integrations"+ >+ <IntegratesSection />+ </section>+ <section id="get-started" aria-label="Get started">+ <CTASection />+ </section>+ </div>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/ExamplesSection.tsx b/apps/www/app/(products)/edge-functions/_components/ExamplesSection.tsxnew file mode 100644index 00000000000..c88ad81fbb9--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/ExamplesSection.tsx@@ -0,0 +1,102 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Examples from 'data/Examples'+import Link from 'next/link'+import { PRODUCT_NAMES } from 'shared-data/products'++const EXAMPLE_ICON: Record<string, { src: string; invert?: boolean; className?: string }> = {+ Resend: { src: '/images/logos/resend-wordmark.svg', invert: true, className: 'h-4 w-auto' },+ OpenAI: { src: '/images/logos/frameworks/openai.svg', invert: true, className: 'h-5 w-5' },+ Stripe: { src: '/images/logos/frameworks/stripe.svg', className: 'h-7 w-auto' },+ Postgres: { src: '/images/product/database/postgresql-icon.svg', className: 'h-5 w-5' },+ Huggingface: { src: '/images/logos/hugging-face-icon.svg', className: 'h-5 w-5' },+ Supabase: { src: '/images/supabase-logo-icon.svg', className: 'h-5 w-5' },+}++export function ExamplesSection() {+ const examples = Examples.filter((example) => example.products.includes(PRODUCT_NAMES.FUNCTIONS))+ const featuredExamples = examples.slice(0, 2)+ const gridExamples = examples.slice(2, 6)++ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <div className="flex flex-col gap-4 md:flex-row md:items-end md:justify-between">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ What you can build <br />+ <span className="text-foreground">with Edge Functions</span>+ </h3>+ <Link+ href="/docs/guides/functions#examples"+ className="text-sm text-foreground-light hover:text-foreground underline"+ >+ View all examples+ </Link>+ </div>++ {/* Cards */}+ <div>+ {/* Featured row - 2 large cells */}+ <div className="grid grid-cols-1 md:grid-cols-2 gap-3">+ {featuredExamples.map((example) => {+ const tag = example.tags?.[0]+ const icon = tag ? EXAMPLE_ICON[tag] : undefined+ return (+ <Link+ key={example.title}+ href={example.repo_url ?? '#'}+ target="_blank"+ rel="noopener noreferrer"+ className="group flex flex-col bg-surface-75 border border-border rounded-lg px-6 py-8 "+ >+ <div className="flex items-center gap-2 mb-4">+ {icon && (+ <img+ src={icon.src}+ alt=""+ className={`${icon.className} object-contain${icon.invert ? ' dark:invert' : ''}`}+ />+ )}+ </div>+ <h4 className="text-foreground text-sm font-medium">{example.title}</h4>+ <p className="text-foreground-lighter text-sm mt-1 line-clamp-2">+ {example.description}+ </p>+ </Link>+ )+ })}+ </div>++ {/* Grid row - 4 smaller cells */}+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mt-3">+ {gridExamples.map((example) => {+ const tag = example.tags?.[0]+ const icon = tag ? EXAMPLE_ICON[tag] : undefined+ return (+ <Link+ key={example.title}+ href={example.repo_url ?? '#'}+ target="_blank"+ rel="noopener noreferrer"+ className="group flex flex-col bg-surface-75 border border-border rounded-lg px-6 py-10 "+ >+ <div className="flex items-center gap-2 mb-4">+ {icon && (+ <img+ src={icon.src}+ alt=""+ className={`${icon.className} object-contain${icon.invert ? ' dark:invert' : ''}`}+ />+ )}+ </div>+ <h4 className="text-foreground text-sm font-medium">{example.title}</h4>+ <p className="text-foreground-lighter text-sm mt-1 line-clamp-2">+ {example.description}+ </p>+ </Link>+ )+ })}+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/GlobalPresenceSection.tsx b/apps/www/app/(products)/edge-functions/_components/GlobalPresenceSection.tsxnew file mode 100644index 00000000000..437599640f9--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/GlobalPresenceSection.tsx@@ -0,0 +1,53 @@+import Link from 'next/link'++import SectionContainerWithCn from '../../../../components/Layouts/SectionContainerWithCn'++const features = [+ {+ label: 'Global presence',+ paragraph: (+ <>+ Edge functions run globally or can be{' '}+ <Link+ href="https://supabase.com/docs/guides/functions/regional-invocation"+ className="underline hover:text-foreground-light transition-colors"+ >+ pinned to your database's proximity+ </Link>+ </>+ ),+ },+ {+ label: 'Automatic scaling',+ paragraph: 'Seamlessly scale with usage without any manual tuning',+ },+ {+ label: 'Secure',+ paragraph: 'Scale with confidence with SSL, Firewall and DDOS protection built in',+ },+]++export function GlobalPresenceSection() {+ return (+ <SectionContainerWithCn>+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-8 md:gap-16">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Edge Functions run{' '}+ <span className="text-foreground">server-side logic geographically close to users</span>,+ offering low latency and great performance.+ </h3>+ <div className="flex flex-col gap-6">+ {features.map((feature) => (+ <div+ key={feature.label}+ className="flex flex-col gap-1 pl-3 border-l border-border text-sm"+ >+ <p className="font-mono uppercase tracking-wide text-foreground">{feature.label}</p>+ <p className="text-foreground-lighter">{feature.paragraph}</p>+ </div>+ ))}+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/Hero.tsx b/apps/www/app/(products)/edge-functions/_components/Hero.tsxnew file mode 100644index 00000000000..3386fafb288--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/Hero.tsx@@ -0,0 +1,32 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Link from 'next/link'+import { Button } from 'ui'++import { Highlights } from './Highlights'++export function Hero() {+ return (+ <SectionContainerWithCn spacing="sections">+ <div className="flex flex-col gap-6 lg:gap-8">+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h1 className="text-foreground text-3xl sm:text-5xl sm:leading-none">+ <span className="block">Edge Functions</span>+ <span className="text-foreground-lighter block">globally in seconds</span>+ </h1>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Author, deploy, and monitor serverless functions distributed globally at the edge, close+ to your users.+ </p>+ </div>+ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link href="https://supabase.com/dashboard">Start your project</Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link href="/docs/guides/functions">Documentation</Link>+ </Button>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/Highlights.tsx b/apps/www/app/(products)/edge-functions/_components/Highlights.tsxnew file mode 100644index 00000000000..160a4715acb--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/Highlights.tsx@@ -0,0 +1,107 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { Globe } from 'lucide-react'++const highlights = [+ {+ title: 'Fully managed',+ paragraph: <>Edge Functions scale automatically, reducing your devops burden</>,+ icon: (+ <svg className="w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M11.8217 2.21899C9.75065 2.21899 8.07174 3.89791 8.07174 5.96896V11.783C8.07174 11.8536 8.08148 11.9218 8.0997 11.9866C8.17354 12.3232 8.47349 12.5752 8.83229 12.5752H10.5494C10.8626 12.5752 11.1749 12.8513 11.1749 13.2656V15.0638C11.1749 15.3165 11.2998 15.54 11.4913 15.6759C11.6177 15.7729 11.7759 15.8306 11.9476 15.8306H17.9997C20.0707 15.8306 21.7496 14.1517 21.7496 12.0806V5.96896C21.7496 3.89791 20.0707 2.21899 17.9997 2.21899H11.8217ZM12.6749 14.3307H17.9997C19.2423 14.3307 20.2497 13.3233 20.2497 12.0806L20.2497 5.96896C20.2497 4.7263 19.2423 3.71893 17.9997 3.71893H11.8217C10.579 3.71893 9.57167 4.7263 9.57167 5.96896V11.0752H10.5494C10.9115 11.0752 11.2478 11.1666 11.5412 11.3263C11.5507 11.3157 11.5605 11.3052 11.5708 11.295L15.5026 7.36084L12.6816 7.36066C12.2674 7.36063 11.9316 7.02482 11.9317 6.61061C11.9317 6.1964 12.2675 5.86063 12.6817 5.86066L16.543 5.86091C17.3714 5.86096 18.0429 6.53248 18.0429 7.36085L18.0431 11.2597C18.0431 11.6739 17.7073 12.0097 17.2931 12.0097C16.8789 12.0097 16.5431 11.674 16.5431 11.2598L16.543 8.44186L12.6317 12.3553C12.597 12.3901 12.5597 12.4207 12.5205 12.4472C12.6204 12.7022 12.6749 12.9791 12.6749 13.2656V14.3307Z"+ fill="currentColor"+ />+ <path+ d="M4.53957 11.0752H6.25666C6.67087 11.0752 7.00666 11.411 7.00666 11.8252C7.00666 12.2394 6.67087 12.5752 6.25666 12.5752H4.53957C4.22636 12.5752 3.91406 12.8513 3.91406 13.2656L3.91406 15.0638C3.91406 15.4781 3.57828 15.8138 3.16406 15.8138C2.74985 15.8138 2.41406 15.4781 2.41406 15.0638V13.2656C2.41406 12.0889 3.33344 11.0752 4.53957 11.0752Z"+ fill="currentColor"+ />+ <path+ d="M3.16406 17.0111C3.57828 17.0111 3.91406 17.3469 3.91406 17.7611L3.91406 19.5593C3.91406 19.9737 4.22636 20.2498 4.53957 20.2498L6.25666 20.2498C6.67087 20.2498 7.00666 20.5856 7.00666 20.9998C7.00666 21.414 6.67087 21.7498 6.25666 21.7498L4.53957 21.7498C3.33344 21.7498 2.41406 20.7361 2.41406 19.5593V17.7611C2.41406 17.3469 2.74985 17.0111 3.16406 17.0111Z"+ fill="currentColor"+ />+ <path+ d="M11.9249 17.0111C12.3391 17.0111 12.6749 17.3469 12.6749 17.7611V19.5593C12.6749 20.7361 11.7555 21.7498 10.5494 21.7498H8.83229C8.41807 21.7498 8.08229 21.414 8.08229 20.9998C8.08229 20.5856 8.41807 20.2498 8.83229 20.2498H10.5494C10.8626 20.2498 11.1749 19.9737 11.1749 19.5593V17.7611C11.1749 17.3469 11.5107 17.0111 11.9249 17.0111Z"+ fill="currentColor"+ />+ </svg>+ ),+ },+ {+ title: 'Global deployments',+ paragraph: 'Deploy worldwide for maximum resiliency and low latency',+ icon: <Globe className="w-5 h-5 stroke-[1.4px]" />,+ },+ {+ title: 'Secure and Scalable',+ paragraph: 'Simply write your code in TypeScript and deploy',+ icon: (+ <svg className="w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M13.7377 6.5363C14.145 6.61196 14.4138 7.00343 14.3381 7.41068L12.5869 16.8366C12.5112 17.2438 12.1197 17.5126 11.7125 17.437C11.3052 17.3613 11.0364 16.9698 11.1121 16.5626L12.8633 7.13669C12.939 6.72944 13.3305 6.46064 13.7377 6.5363Z"+ fill="currentColor"+ />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M15.7279 9.10834C16.0208 8.81543 16.4957 8.81539 16.7886 9.10826L19.1499 11.4692C19.2906 11.6099 19.3696 11.8007 19.3696 11.9996C19.3696 12.1985 19.2906 12.3893 19.15 12.5299L16.7886 14.8913C16.4957 15.1842 16.0209 15.1842 15.728 14.8913C15.4351 14.5984 15.4351 14.1235 15.728 13.8306L17.5589 11.9997L15.728 10.169C15.4351 9.87613 15.4351 9.40126 15.7279 9.10834Z"+ fill="currentColor"+ />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M9.72153 14.8913C9.42866 15.1842 8.95379 15.1842 8.66087 14.8913L6.29954 12.5303C6.15887 12.3897 6.07983 12.1989 6.07983 12C6.07982 11.8011 6.15884 11.6103 6.2995 11.4696L8.66083 9.10831C8.95373 8.81542 9.4286 8.81542 9.72149 9.10831C10.0144 9.4012 10.0144 9.87608 9.72149 10.169L7.89053 11.9999L9.72145 13.8306C10.0144 14.1235 10.0144 14.5983 9.72153 14.8913Z"+ fill="currentColor"+ />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M2.95312 6C2.95312 3.92893 4.63206 2.25 6.70313 2.25H18.7031C20.7742 2.25 22.4531 3.92893 22.4531 6V18C22.4531 20.0711 20.7742 21.75 18.7031 21.75H6.70313C4.63206 21.75 2.95312 20.0711 2.95312 18V6ZM6.70313 3.75C5.46048 3.75 4.45313 4.75736 4.45313 6V18C4.45313 19.2426 5.46048 20.25 6.70313 20.25H18.7031C19.9458 20.25 20.9531 19.2426 20.9531 18V6C20.9531 4.75736 19.9458 3.75 18.7031 3.75H6.70313Z"+ fill="currentColor"+ />+ </svg>+ ),+ },+ {+ title: 'Node.js Support',+ paragraph: 'Migrate existing workloads with NPM and Node.js support',+ icon: (+ <svg className="w-5 h-5" viewBox="0 0 26 28" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path+ d="M11.9233 0.444469C12.6102 0.0512999 13.5049 0.049524 14.1912 0.444469C17.6439 2.39542 21.0976 4.3433 24.5497 6.29543C25.199 6.66117 25.6333 7.38378 25.6267 8.13193V19.8696C25.6315 20.6487 25.1543 21.3886 24.4693 21.746C21.028 23.6862 17.5884 25.6288 14.1477 27.569C13.4466 27.9698 12.5339 27.939 11.8547 27.5052C10.823 26.9072 9.78955 26.312 8.75774 25.7145C8.5469 25.5888 8.30922 25.4888 8.16034 25.2844C8.29195 25.107 8.52726 25.0849 8.71847 25.0074C9.14913 24.8705 9.54467 24.6507 9.9403 24.4373C10.0403 24.3689 10.1625 24.3951 10.2584 24.4564C11.1406 24.9622 12.0151 25.4828 12.9003 25.9838C13.0891 26.0928 13.2803 25.9481 13.4417 25.8581C16.8187 23.9495 20.1999 22.048 23.5763 20.1388C23.7014 20.0786 23.7706 19.9458 23.7604 19.8088C23.7628 15.9368 23.761 12.0641 23.7616 8.19212C23.7759 8.03662 23.6859 7.89366 23.5453 7.83003C20.1159 5.89871 16.6883 3.96444 13.2595 2.03263C13.2001 1.99179 13.1297 1.96988 13.0576 1.96977C12.9855 1.96967 12.9151 1.99138 12.8556 2.03204C9.42677 3.96444 5.99974 5.90049 2.57093 7.8317C2.43083 7.89544 2.3368 8.03603 2.35348 8.19212C2.35407 12.0641 2.35348 15.9368 2.35348 19.8094C2.34753 19.8763 2.36222 19.9433 2.39556 20.0016C2.4289 20.0599 2.47929 20.1065 2.53995 20.1353C3.45494 20.6541 4.37112 21.1694 5.2867 21.6864C5.80251 21.9641 6.43582 22.129 7.00412 21.9163C7.50562 21.7365 7.85715 21.2247 7.84758 20.6922C7.85232 16.8428 7.84521 12.9928 7.85113 9.14401C7.8386 8.97313 8.0007 8.83194 8.16685 8.84802C8.60649 8.84506 9.04672 8.8421 9.48636 8.84921C9.66987 8.84506 9.79616 9.02907 9.77347 9.20123C9.77169 13.075 9.7782 16.9489 9.77051 20.8227C9.77169 21.8551 9.34754 22.9784 8.39259 23.4836C7.21614 24.093 5.76206 23.9638 4.59982 23.3794C3.59366 22.8772 2.63348 22.2845 1.64518 21.7465C0.958393 21.391 0.483532 20.6482 0.488366 19.8697V8.13193C0.481164 7.36829 0.932741 6.63256 1.60226 6.27215C5.04301 4.33038 8.48316 2.38713 11.9233 0.444469Z"+ fill="currentColor"+ />+ <path+ d="M14.9242 8.57537C16.4248 8.47878 18.0313 8.51814 19.3817 9.25742C20.4272 9.82394 21.0069 11.0129 21.0253 12.1745C20.9961 12.3311 20.8323 12.4176 20.6828 12.4068C20.2474 12.4062 19.8119 12.4127 19.3765 12.4039C19.1918 12.411 19.0844 12.2407 19.0613 12.0774C18.9362 11.5216 18.6331 10.9712 18.11 10.7031C17.3069 10.3011 16.3759 10.3213 15.5002 10.3297C14.861 10.3636 14.1736 10.419 13.6321 10.7949C13.2163 11.0796 13.09 11.6544 13.2384 12.1173C13.3783 12.4497 13.762 12.557 14.076 12.6558C15.8844 13.1288 17.8008 13.0818 19.5748 13.7042C20.3092 13.958 21.0277 14.4513 21.2791 15.2203C21.6079 16.2509 21.4638 17.4828 20.7305 18.3102C20.1359 18.991 19.2698 19.3616 18.406 19.5629C17.2569 19.8191 16.0644 19.8256 14.8974 19.7119C13.8001 19.5868 12.6582 19.2985 11.8111 18.5508C11.0867 17.9218 10.7329 16.9418 10.768 15.996C10.7764 15.8362 10.9354 15.7248 11.0885 15.7379C11.5269 15.7344 11.9654 15.7332 12.4038 15.7385C12.579 15.726 12.7088 15.8774 12.7178 16.0424C12.7987 16.5719 12.9977 17.1277 13.4594 17.4416C14.3505 18.0166 15.4687 17.9772 16.489 17.9933C17.3344 17.9558 18.2833 17.9444 18.9732 17.3857C19.3371 17.067 19.445 16.5339 19.3466 16.0752C19.24 15.6879 18.8349 15.5075 18.487 15.3895C16.7017 14.8247 14.7639 15.0297 12.9959 14.391C12.2781 14.1374 11.584 13.6578 11.3083 12.9204C10.9235 11.8767 11.0998 10.5858 11.9099 9.78635C12.6998 8.99113 13.8401 8.68498 14.9242 8.57537Z"+ fill="currentColor"+ />+ </svg>+ ),+ },+]++export function Highlights() {+ return (+ <div className="border-t border-border">+ <SectionContainerWithCn height="none" className="-mt-8 mb-8 md:mb-24">+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3">+ {highlights.map((highlight) => (+ <div+ key={highlight.title}+ className="bg-surface-75 border border-border rounded-lg p-6 flex flex-col gap-3"+ >+ <div className="text-foreground-lighter" aria-hidden>+ {highlight.icon}+ </div>+ <h3 className="text-foreground text-base font-medium">{highlight.title}</h3>+ <p className="text-foreground-lighter text-sm">{highlight.paragraph}</p>+ </div>+ ))}+ </div>+ </SectionContainerWithCn>+ </div>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/IntegratesSection.tsx b/apps/www/app/(products)/edge-functions/_components/IntegratesSection.tsxnew file mode 100644index 00000000000..1f775480cfb--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/IntegratesSection.tsx@@ -0,0 +1,212 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'+import { IntegratesSectionClient } from './IntegratesSectionClient'++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#ffffff' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#15593b' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#525252' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ ],+}++const USE_CASES = [+ {+ icon: 'Zap' as const,+ label: 'Zero configuration',+ paragraph: 'Pre-populated environment variables required to access your Supabase project',+ lang: 'javascript' as const,+ code: `import { createClient } from 'jsr:@supabase/supabase-js@2'++Deno.serve(async () => {+ // These are automatically available — no setup needed+ const supabase = createClient(+ Deno.env.get('SUPABASE_URL')!,+ Deno.env.get('SUPABASE_ANON_KEY')!+ )++ const { data } = await supabase.from('todos').select('*')+ return new Response(JSON.stringify(data))+})`,+ },+ {+ icon: 'Database' as const,+ label: 'Connect to your database',+ paragraph:+ 'Connect to your Postgres database from an Edge Function using the supabase-js client',+ lang: 'javascript' as const,+ code: `const supabase = createClient(+ Deno.env.get('SUPABASE_URL')!,+ Deno.env.get('SUPABASE_ANON_KEY')!,+ {+ global: {+ headers: {+ Authorization: req.headers.get('Authorization')!+ }+ }+ }+)++const { data, error } = await supabase+ .from('countries')+ .select('*')`,+ },+ {+ icon: 'Webhook' as const,+ label: 'Trigger via webhook',+ paragraph:+ 'Database Webhooks send real-time data from your database whenever a table event occurs',+ lang: 'sql' as const,+ code: `create trigger "my_webhook" after insert+on "public"."my_table" for each row+execute function "supabase_functions"."http_request"(+ 'http://localhost:3000',+ 'POST',+ '{"Content-Type":"application/json"}',+ '{}',+ '1000'+);`,+ },+ {+ icon: 'Shield' as const,+ label: 'Works with Supabase Auth',+ paragraph: 'Verify users and enforce permissions directly inside your Edge Functions',+ lang: 'javascript' as const,+ code: `import { createClient } from 'jsr:@supabase/supabase-js@2'++Deno.serve(async (req: Request) => {+ // Create supabase client+ const supabase = createClient(+ Deno.env.get('SUPABASE_URL')!,+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!,+ { global: {+ headers: {+ Authorization: req.headers.get('Authorization')!}+ }+ }+ )++ // Get the session or user object+ const { data } = await supabase.auth.getUser()+ const user = data.user+})`,+ },+ {+ icon: 'HardDrive' as const,+ label: 'Works with Supabase Storage',+ paragraph: 'Upload, transform, and serve files with built-in caching from your Edge Functions',+ lang: 'javascript' as const,+ code: `import { createClient } from 'jsr:@supabase/supabase-js@2'++Deno.serve(async (req: Request) => {+ // Create supabase client+ const supabase = createClient(+ Deno.env.get('SUPABASE_URL')!,+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!+ )++ // Upload image to storage+ const { data, error } = await supabase.storage+ .from('images')+ .upload('filename.png', file, {+ contentType: 'image/png',+ cacheControl: '31536000',+ upsert: false,+ })+})`,+ },+]++export async function IntegratesSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: ['javascript', 'sql'],+ })++ const useCases = USE_CASES.map((useCase) => ({+ icon: useCase.icon,+ label: useCase.label,+ paragraph: useCase.paragraph,+ darkHtml: hl.codeToHtml(useCase.code, { lang: useCase.lang, theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(useCase.code, { lang: useCase.lang, theme: 'supabase-light' }),+ }))++ hl.dispose()++ return <IntegratesSectionClient useCases={useCases} />+}diff --git a/apps/www/app/(products)/edge-functions/_components/IntegratesSectionClient.tsx b/apps/www/app/(products)/edge-functions/_components/IntegratesSectionClient.tsxnew file mode 100644index 00000000000..5a396516ebb--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/IntegratesSectionClient.tsx@@ -0,0 +1,227 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { Database, HardDrive, Shield, Webhook, Zap } from 'lucide-react'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { Zap, Database, Webhook, Shield, HardDrive } as const++type IconName = keyof typeof ICONS++type UseCase = {+ icon: IconName+ label: string+ paragraph: React.ReactNode+ darkHtml: string+ lightHtml: string+}++const INTERVAL_DURATION = 6000 // ms per tab++export function IntegratesSectionClient({ useCases }: { useCases: UseCase[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = useCases[activeIdx]++ // Auto-size the code area to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ // Auto-advance when progress completes+ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % useCases.length)+ }+ }, [progress, useCases.length])++ // Start/stop timer based on visibility+ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl text-balance">+ Integrates with the <span className="text-foreground">Supabase ecosystem</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Access your database, auth, storage, and webhooks directly from Edge Functions with zero+ configuration.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tab cards */}+ <div+ role="tablist"+ aria-label="Edge Functions integrations"+ className="flex flex-col gap-1 items-start justify-end"+ >+ {useCases.map((useCase, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[useCase.icon]+ return (+ <button+ key={useCase.label}+ role="tab"+ aria-selected={isActive}+ aria-controls={`ef-integrates-panel-${index}`}+ id={`ef-integrates-tab-${index}`}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} aria-hidden />+ {useCase.label}+ </button>+ )+ })}+ </div>++ {/* Right: code area */}+ <div+ role="tabpanel"+ id={`ef-integrates-panel-${activeIdx}`}+ aria-labelledby={`ef-integrates-tab-${activeIdx}`}+ className="flex flex-col self-end border border-border rounded-md overflow-clip"+ >+ <motion.div+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative shrink-0 overflow-hidden"+ >+ {/* Invisible measuring copy: drives the animated code-area height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ />++ <AnimatePresence mode="wait">+ <motion.div+ key={active.label}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{ __html: active.lightHtml }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ </motion.div>++ {/* Footer: active tab info */}+ <div className="border-t border-border px-6 py-4 flex items-center gap-8 justify-between bg-surface-75">+ <AnimatePresence mode="wait">+ <motion.div+ key={active.label}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="flex flex-col gap-1"+ >+ <h4 className="text-sm font-medium text-foreground">{active.label}</h4>+ <p className="text-sm text-foreground-lighter">{active.paragraph}</p>+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/guides/functions"+ className="flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap shrink-0"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ aria-hidden+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </div>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/LocalDXSection.tsx b/apps/www/app/(products)/edge-functions/_components/LocalDXSection.tsxnew file mode 100644index 00000000000..3d2139e7e2f--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/LocalDXSection.tsx@@ -0,0 +1,157 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import dynamic from 'next/dynamic'+import Link from 'next/link'+import { useState } from 'react'++const LocalDXImage = dynamic(() => import('~/components/Products/Functions/LocalDXImage'))+const ParityImage = dynamic(() => import('~/components/Products/Functions/ParityImage'))+const NpmEcosystem = dynamic(() => import('~/components/Products/Functions/NpmEcosystem'))+const CI = dynamic(() => import('~/components/Products/Functions/CI'))++function EcosystemCard() {+ const [isHovered, setIsHovered] = useState(false)++ return (+ <div+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden col-span-1 md:row-span-2"+ onMouseEnter={() => setIsHovered(true)}+ onMouseLeave={() => setIsHovered(false)}+ >+ <div className="flex-1 relative overflow-hidden min-h-[320px] md:min-h-0">+ <NpmEcosystem isHovered={isHovered} />+ </div>+ <div className="flex flex-col gap-2 px-6 py-5">+ <h4 className="text-foreground text-base font-medium">Use any NPM module</h4>+ <p className="text-foreground-lighter text-sm">Tap into the Deno and NPM ecosystem</p>+ </div>+ </div>+ )+}++function ParityCard() {+ const [isHovered, setIsHovered] = useState(false)++ return (+ <div+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden "+ onMouseEnter={() => setIsHovered(true)}+ onMouseLeave={() => setIsHovered(false)}+ >+ <div className="aspect-[3/2] w-full flex items-center justify-center overflow-hidden">+ <ParityImage isHovered={isHovered} />+ </div>+ <div className="flex flex-col gap-2 px-6 py-5">+ <h4 className="text-foreground text-base font-medium">Dev and Prod parity</h4>+ <p className="text-foreground-lighter text-sm">+ The open source{' '}+ <Link+ href="https://github.com/supabase/edge-runtime/"+ className="underline hover:text-foreground-light transition-colors"+ target="_blank"+ rel="noopener noreferrer"+ >+ Edge runtime+ </Link>{' '}+ runs locally in dev and powers functions in production+ </p>+ </div>+ </div>+ )+}++function CICard() {+ const [isHovered, setIsHovered] = useState(false)++ return (+ <div+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden md:col-span-2"+ onMouseEnter={() => setIsHovered(true)}+ onMouseLeave={() => setIsHovered(false)}+ >+ <div+ className="flex-1 flex items-center justify-center overflow-hidden pl-2 pt-8 md:pt-12"+ style={{+ maskImage: 'linear-gradient(to bottom, black 95%, transparent 100%)',+ WebkitMaskImage: 'linear-gradient(to bottom, black 95%, transparent 100%)',+ }}+ >+ <CI isHovered={isHovered} />+ </div>+ <div className="flex flex-col gap-2 px-6 py-5">+ <h4 className="text-foreground text-base font-medium">Continuous Integration</h4>+ <p className="text-foreground-lighter text-sm">+ Use the{' '}+ <Link+ href="https://supabase.com/docs/guides/functions/cicd-workflow"+ className="underline hover:text-foreground-light transition-colors"+ target="_blank"+ rel="noopener noreferrer"+ >+ Supabase CLI with GitHub actions+ </Link>{' '}+ to preview and deploy your functions along with the rest of your application+ </p>+ </div>+ </div>+ )+}++function LocalDXCard() {+ const [isHovered, setIsHovered] = useState(false)++ return (+ <div+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden "+ onMouseEnter={() => setIsHovered(true)}+ onMouseLeave={() => setIsHovered(false)}+ >+ <div className="aspect-[3/2] w-full flex items-center justify-center overflow-hidden">+ <LocalDXImage isHovered={isHovered} />+ </div>+ <div className="flex flex-col gap-2 px-6 py-5">+ <h4 className="text-foreground text-base font-medium">First-class local dev experience</h4>+ <p className="text-foreground-lighter text-sm">+ Write code with hot code reloading, a fast Language server for autocompletion, type+ checking and linting+ </p>+ </div>+ </div>+ )+}++export function LocalDXSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Delightful DX from <br />+ <span className="text-foreground">local to production</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Edge Functions are developed using{' '}+ <Link+ href="https://deno.com/"+ className="underline hover:text-foreground-light transition-colors"+ target="_blank"+ rel="noopener noreferrer"+ >+ Deno+ </Link>+ , an open source JavaScript runtime that ensures maximum power and flexibility. Migrate in+ and out at any time with no vendor lock-in.+ </p>+ </div>++ {/* Bento grid */}+ <div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 grid-flow-dense gap-3">+ <LocalDXCard />+ <ParityCard />+ <CICard />+ <EcosystemCard />+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/_components/ObservabilitySection.tsx b/apps/www/app/(products)/edge-functions/_components/ObservabilitySection.tsxnew file mode 100644index 00000000000..b980e932a01--- /dev/null+++ b/apps/www/app/(products)/edge-functions/_components/ObservabilitySection.tsx@@ -0,0 +1,83 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import dynamic from 'next/dynamic'+import { useState } from 'react'+import { cn } from 'ui'++const RealtimeLogs = dynamic(() => import('~/components/Products/Functions/RealtimeLogs'))+const QueryLogs = dynamic(() => import('~/components/Products/Functions/QueryLogs'))+const Metrics = dynamic(() => import('~/components/Products/Functions/Metrics'))++const cards = [+ {+ id: 'realtime-logs',+ label: 'Realtime logs',+ paragraph: 'Stream logs to the dashboard in realtime with rich metadata to help debugging',+ render: (isActive: boolean) => <RealtimeLogs isActive={isActive} isInView />,+ },+ {+ id: 'log-explorer',+ label: 'Query Logs via Log explorer',+ paragraph: 'Get deeper insights into function behavior by writing SQL queries on function logs',+ render: (isActive: boolean) => <QueryLogs isActive={isActive} isInView />,+ },+ {+ id: 'metrics',+ label: 'Metrics',+ paragraph: 'Dashboards show the health of your functions at all times',+ render: (isActive: boolean) => <Metrics isActive={isActive} />,+ },+]++function ObservabilityCard({+ card,+ className,+}: {+ card: (typeof cards)[number]+ className?: string+}) {+ const [isHovered, setIsHovered] = useState(false)++ return (+ <div+ className={cn(+ 'flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden ',+ className+ )}+ onMouseEnter={() => setIsHovered(true)}+ onMouseLeave={() => setIsHovered(false)}+ >+ <div className="relative flex-1 min-h-[285px] overflow-hidden">{card.render(isHovered)}</div>+ <div className="flex flex-col gap-2 px-6 py-5">+ <h4 className="text-foreground text-base font-medium">{card.label}</h4>+ <p className="text-foreground-lighter text-sm">{card.paragraph}</p>+ </div>+ </div>+ )+}++export function ObservabilitySection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Debug and monitor with <br />+ <span className="text-foreground">built-in observability</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Monitor, debug, and optimize your Edge Functions with realtime logs, queryable log+ explorer, and health dashboards — all built into the Supabase Dashboard.+ </p>+ </div>++ {/* 3-column grid */}+ <div className="grid grid-cols-1 md:grid-cols-3 gap-3">+ {cards.map((card) => (+ <ObservabilityCard key={card.id} card={card} />+ ))}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/edge-functions/page.tsx b/apps/www/app/(products)/edge-functions/page.tsxnew file mode 100644index 00000000000..e7358b5f469--- /dev/null+++ b/apps/www/app/(products)/edge-functions/page.tsx@@ -0,0 +1,12 @@+import type { Metadata } from 'next'++import { EdgeFunctionsContent } from './_components/EdgeFunctionsContent'++export const metadata: Metadata = {+ title: 'Edge Functions | Supabase',+ description: 'Execute your code closest to your users with fast deploy times and low latency.',+}++export default function EdgeFunctionsPage() {+ return <EdgeFunctionsContent />+}diff --git a/apps/www/app/(products)/layout.tsx b/apps/www/app/(products)/layout.tsxnew file mode 100644index 00000000000..df95193d971--- /dev/null+++ b/apps/www/app/(products)/layout.tsx@@ -0,0 +1,31 @@+'use client'++import { useForceDeepDark } from 'lib/theme.utils'+import { usePathname } from 'next/navigation'+import { PRODUCT_NAMES } from 'shared-data/products'++import ProductsNav from '../../components/Products/ProductsNav'+import DefaultLayout from '@/components/Layouts/Default'++const SEGMENT_TO_PRODUCT: Record<string, PRODUCT_NAMES> = {+ database: PRODUCT_NAMES.DATABASE,+ auth: PRODUCT_NAMES.AUTHENTICATION,+ storage: PRODUCT_NAMES.STORAGE,+ 'edge-functions': PRODUCT_NAMES.FUNCTIONS,+ realtime: PRODUCT_NAMES.REALTIME,+}++export default function ProductsLayout({ children }: { children: React.ReactNode }) {+ useForceDeepDark()++ const pathname = usePathname()+ const segment = pathname?.split('/')[1] ?? ''+ const activePage = SEGMENT_TO_PRODUCT[segment]++ return (+ <DefaultLayout>+ <ProductsNav activePage={activePage} />+ {children}+ </DefaultLayout>+ )+}diff --git a/apps/www/app/(products)/realtime/_components/ApiSection.tsx b/apps/www/app/(products)/realtime/_components/ApiSection.tsxnew file mode 100644index 00000000000..e6ec95fc632--- /dev/null+++ b/apps/www/app/(products)/realtime/_components/ApiSection.tsx@@ -0,0 +1,169 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'+import { ApiSectionClient } from './ApiSectionClient'++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#ffffff' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#15593b' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#525252' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ ],+}++const API_EXAMPLES = [+ {+ icon: 'Database' as const,+ title: 'Database changes',+ description: 'Listen to inserts, updates, and deletes in real time.',+ code: `import { createClient } from '@supabase/supabase-js'++const supabase = createClient('URL', 'ANON_KEY')+const channel = supabase+ .channel('db-changes')+ .on('postgres_changes', {+ event: 'INSERT',+ schema: 'public',+ table: 'messages',+ }, (payload) => {+ console.log('New message:', payload.new)+ })+ .subscribe()`,+ },+ {+ icon: 'Users' as const,+ title: 'Presence',+ description: 'Track and synchronize online user state across clients.',+ code: `import { createClient } from '@supabase/supabase-js'++const supabase = createClient('URL', 'ANON_KEY')+const channel = supabase.channel('online-users')++channel+ .on('presence', { event: 'sync' }, () => {+ const state = channel.presenceState()+ console.log('Online users:', state)+ })+ .subscribe(async (status) => {+ if (status === 'SUBSCRIBED') {+ await channel.track({ user: 'user-123' })+ }+ })`,+ },+ {+ icon: 'Radio' as const,+ title: 'Broadcast',+ description: 'Send ephemeral messages to all subscribed clients instantly.',+ code: `import { createClient } from '@supabase/supabase-js'++const supabase = createClient('URL', 'ANON_KEY')+const channel = supabase.channel('cursor-pos')++channel+ .on('broadcast', { event: 'cursor' }, (payload) => {+ console.log('Cursor position:', payload)+ })+ .subscribe(async (status) => {+ if (status === 'SUBSCRIBED') {+ await channel.send({+ type: 'broadcast',+ event: 'cursor',+ payload: { x: 100, y: 200 },+ })+ }+ })`,+ },+]++export async function ApiSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: ['javascript'],+ })++ const examples = API_EXAMPLES.map((example) => ({+ icon: example.icon,+ title: example.title,+ description: example.description,+ darkHtml: hl.codeToHtml(example.code, { lang: 'javascript', theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(example.code, { lang: 'javascript', theme: 'supabase-light' }),+ }))++ hl.dispose()++ return <ApiSectionClient examples={examples} />+}diff --git a/apps/www/app/(products)/realtime/_components/ApiSectionClient.tsx b/apps/www/app/(products)/realtime/_components/ApiSectionClient.tsxnew file mode 100644index 00000000000..7efb3db2f60--- /dev/null+++ b/apps/www/app/(products)/realtime/_components/ApiSectionClient.tsx@@ -0,0 +1,195 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { Database, Radio, Users } from 'lucide-react'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { Database, Users, Radio } as const++type IconName = keyof typeof ICONS++type ApiExample = {+ icon: IconName+ title: string+ description: string+ darkHtml: string+ lightHtml: string+}++const INTERVAL_DURATION = 10000++export function ApiSectionClient({ examples }: { examples: ApiExample[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = examples[activeIdx]++ // Auto-size the code panel to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % examples.length)+ }+ }, [progress, examples.length])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Simple and convenient+ <br />+ <span className="text-foreground">APIs</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ APIs that you can understand. With powerful libraries that work on client and server-side+ applications.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tab cards */}+ <div className="flex flex-col gap-1 items-start justify-end">+ {examples.map((example, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[example.icon]+ return (+ <button+ key={example.title}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl font-medium transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} />+ {example.title}+ </button>+ )+ })}+ </div>++ {/* Right: code block */}+ <motion.div+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative self-end overflow-hidden border border-border rounded-md"+ >+ {/* Invisible measuring copy: drives the animated container height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto pb-12 [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ />++ <AnimatePresence mode="wait">+ <motion.div+ key={active.title}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto pb-12"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{ __html: active.lightHtml }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/guides/realtime"+ className="absolute bottom-4 right-4 flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </motion.div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/realtime/_components/FeaturesSection.tsx b/apps/www/app/(products)/realtime/_components/FeaturesSection.tsxnew file mode 100644index 00000000000..b73f2cf638b--- /dev/null+++ b/apps/www/app/(products)/realtime/_components/FeaturesSection.tsx@@ -0,0 +1,688 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { motion } from 'framer-motion'+import { Key } from 'lucide-react'+import { useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const FEATURES = [+ {+ title: 'Database changes',+ description:+ 'Listen to inserts, updates, and deletes in your Postgres database and react instantly.',+ visual: DatabaseChangesSkeleton,+ },+ {+ title: 'Presence',+ description:+ 'Store and synchronize online user state consistently across all connected clients.',+ visual: PresenceSkeleton,+ },+ {+ title: 'Broadcast',+ description: 'Send any data to any client subscribed to the same channel with low latency.',+ visual: BroadcastSkeleton,+ },+]++type ChatMsg = { id: number; user: string; text: string }++const MAX_MESSAGES = 20++const initialMessages: ChatMsg[] = [+ { id: 1, user: 'Alice', text: 'Hey, is the deploy ready?' },+ { id: 2, user: 'Bob', text: 'Almost — running final tests now.' },+ { id: 3, user: 'Alice', text: 'Nice, let me know when it\u2019s live.' },+]++const incomingMessages: ChatMsg[] = [+ { id: 4, user: 'Bob', text: 'All green. Deploying now \u{1F680}' },+ { id: 5, user: 'Alice', text: 'Awesome, checking it out.' },+ { id: 6, user: 'Bob', text: 'Latency dropped to 42ms!' },+ { id: 7, user: 'Alice', text: 'That\u2019s a big improvement.' },+ { id: 8, user: 'Bob', text: 'Yeah, the new index helped.' },+ { id: 9, user: 'Alice', text: 'Should we update the docs?' },+ { id: 10, user: 'Bob', text: 'Already on it.' },+]++function DatabaseChangesSkeleton() {+ const [messages, setMessages] = useState<ChatMsg[]>(initialMessages)+ const [tableFlashId, setTableFlashId] = useState<number | null>(null)+ const [chatFlashId, setChatFlashId] = useState<number | null>(null)+ const containerRef = useRef<HTMLDivElement>(null)+ const tableScrollRef = useRef<HTMLDivElement>(null)+ const chatScrollRef = useRef<HTMLDivElement>(null)+ const [isInView, setIsInView] = useState(false)+ const nextMsgIdx = useRef(0)++ useEffect(() => {+ const el = containerRef.current+ if (!el) return+ const observer = new IntersectionObserver(([entry]) => setIsInView(entry.isIntersecting), {+ threshold: 0.3,+ })+ observer.observe(el)+ return () => observer.disconnect()+ }, [])++ useEffect(() => {+ if (!isInView) return++ const innerTimers: ReturnType<typeof setTimeout>[] = []++ const timer = setInterval(() => {+ const msg = incomingMessages[nextMsgIdx.current % incomingMessages.length]+ const newMsg = { ...msg, id: Date.now() + nextMsgIdx.current }+ nextMsgIdx.current++++ setMessages((prev) => [...prev.slice(-(MAX_MESSAGES - 1)), newMsg])+ setTableFlashId(newMsg.id)++ requestAnimationFrame(() => {+ tableScrollRef.current?.scrollTo({+ top: tableScrollRef.current.scrollHeight,+ behavior: 'smooth',+ })+ })++ const chatTimer = setTimeout(() => {+ setChatFlashId(newMsg.id)+ requestAnimationFrame(() => {+ chatScrollRef.current?.scrollTo({+ top: chatScrollRef.current.scrollHeight,+ behavior: 'smooth',+ })+ })+ const clearTimer = setTimeout(() => {+ setTableFlashId(null)+ setChatFlashId(null)+ }, 600)+ innerTimers.push(clearTimer)+ }, 200)+ innerTimers.push(chatTimer)+ }, 3000)++ return () => {+ clearInterval(timer)+ innerTimers.forEach(clearTimeout)+ }+ }, [isInView])++ return (+ <div+ ref={containerRef}+ className="relative w-full h-full flex flex-col justify-end"+ style={{+ maskImage:+ 'linear-gradient(to bottom, black 50%, rgba(0,0,0,0.9) 65%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.1) 85%, transparent 90%)',+ WebkitMaskImage:+ 'linear-gradient(to bottom, black 50%, rgba(0,0,0,0.9) 65%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.1) 85%, transparent 90%)',+ }}+ >+ <div+ className="absolute top-12 -right-24 z-[2]"+ style={{+ maskImage: 'linear-gradient(to right, black 35%, transparent 70%)',+ WebkitMaskImage: 'linear-gradient(to right, black 35%, transparent 70%)',+ }}+ >+ <div+ className="border border-border rounded-lg overflow-hidden bg-surface-75"+ style={{ width: 420 }}+ >+ <table className="w-full border-collapse text-[13px] !mt-0 table-fixed">+ <colgroup>+ <col style={{ width: 72 }} />+ <col style={{ width: 100 }} />+ <col />+ </colgroup>+ <thead>+ <tr className="bg-surface-200">+ <th className="border-b border-r border-default px-3 py-1.5 text-left font-normal">+ <div className="flex items-center gap-1.5 overflow-hidden">+ <Key size={12} strokeWidth={2} className="text-brand rotate-45 shrink-0" />+ <span className="text-foreground text-xs font-medium">id</span>+ <span className="text-foreground-light text-xs">int8</span>+ </div>+ </th>+ <th className="border-b border-r border-default px-3 py-1.5 text-left font-normal">+ <div className="flex items-center gap-1.5 overflow-hidden">+ <span className="text-foreground text-xs font-medium">user</span>+ <span className="text-foreground-light text-xs">text</span>+ </div>+ </th>+ <th className="border-b border-default px-3 py-1.5 text-left font-normal">+ <div className="flex items-center gap-1.5 overflow-hidden">+ <span className="text-foreground text-xs font-medium">text</span>+ <span className="text-foreground-light text-xs">text</span>+ </div>+ </th>+ </tr>+ </thead>+ </table>+ <div+ ref={tableScrollRef}+ className="max-h-[58px] overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"+ >+ <table className="w-full border-collapse text-sm !mt-0 table-fixed">+ <colgroup>+ <col style={{ width: 72 }} />+ <col style={{ width: 100 }} />+ <col />+ </colgroup>+ <tbody className="[&>tr:last-child>td]:border-b-0 [&>tr:first-child>td]:border-t-0">+ {messages.map((msg) => (+ <tr+ key={msg.id}+ className={cn(+ 'transition-colors duration-500',+ tableFlashId === msg.id ? 'bg-brand/15 dark:bg-brand/5' : 'bg-surface-75'+ )}+ >+ <td className="border-b border-r border-default px-3 py-1.5 text-foreground-muted text-xs truncate max-w-0">+ {msg.id}+ </td>+ <td className="border-b border-r border-default px-3 py-1.5 text-foreground text-xs truncate max-w-0">+ {msg.user}+ </td>+ <td className="border-b border-default px-3 py-1.5 text-foreground text-xs truncate max-w-0">+ {msg.text}+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ </div>+ </div>++ {/* Connecting dashed lines */}+ <div className="absolute left-1/2 -translate-x-1/2 top-[140px] flex gap-2 z-[1] text-background-surface-300">+ <svg width="2" height="52" fill="none" className="overflow-visible">+ <line+ x1="1"+ y1="0"+ x2="1"+ y2="52"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeDasharray="4 4"+ style={{ animation: 'rlDashFlow 1s linear infinite' }}+ />+ </svg>+ <svg width="2" height="52" fill="none" className="overflow-visible">+ <line+ x1="1"+ y1="0"+ x2="1"+ y2="52"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeDasharray="4 4"+ style={{ animation: 'rlDashFlow 1s linear infinite 0.5s' }}+ />+ </svg>+ <style>{`@keyframes rlDashFlow { to { stroke-dashoffset: -8; } }`}</style>+ </div>++ {/* Chat UI */}+ <div className="px-4 pb-4 relative z-[2]">+ <div className="border border-border rounded-lg overflow-hidden bg-surface-200 max-w-[90%]">+ <div+ ref={chatScrollRef}+ className="h-[120px] overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden flex flex-col gap-2 px-3 py-3"+ style={{+ maskImage: 'linear-gradient(to bottom, transparent 0%, black 20%)',+ WebkitMaskImage: 'linear-gradient(to bottom, transparent 0%, black 20%)',+ }}+ >+ {messages.map((msg) => {+ const isAlice = msg.user === 'Alice'+ return (+ <div key={msg.id} className={cn('flex', isAlice ? 'justify-end' : 'justify-start')}>+ <div+ className={cn(+ 'max-w-[75%] px-3 py-1.5 rounded-xl text-xs leading-snug transition-colors duration-500',+ isAlice+ ? 'bg-brand/15 text-foreground rounded-br-sm'+ : 'bg-surface-300 text-foreground rounded-bl-sm',+ chatFlashId === msg.id && 'ring-1 ring-brand/30'+ )}+ >+ {msg.text}+ </div>+ </div>+ )+ })}+ </div>+ </div>+ </div>+ </div>+ )+}++const PRESENCE_USERS = [+ { name: 'Alan', initials: 'AD', color: '#3ECF8E' },+ { name: 'Jonny', initials: 'JW', color: '#6c63ff' },+ { name: 'Copple', initials: 'CP', color: '#F06A50' },+ { name: 'Terry', initials: 'TP', color: '#f1a10d' },+]++// Subtle looping paths — small movements around a home position+const CURSOR_PATHS: { x: number; y: number }[][] = [+ [+ { x: 24, y: 38 },+ { x: 28, y: 42 },+ { x: 22, y: 44 },+ { x: 26, y: 36 },+ ],+ [+ { x: 58, y: 30 },+ { x: 54, y: 34 },+ { x: 60, y: 36 },+ { x: 56, y: 28 },+ ],+ [+ { x: 36, y: 64 },+ { x: 40, y: 68 },+ { x: 34, y: 70 },+ { x: 38, y: 62 },+ ],+ [+ { x: 68, y: 56 },+ { x: 64, y: 60 },+ { x: 70, y: 62 },+ { x: 66, y: 54 },+ ],+]++// Different loop durations so cursors drift out of phase+const CURSOR_DURATIONS = [6, 7.5, 8.5, 7]++function PresenceCursor({+ user,+ path,+ duration,+}: {+ user: (typeof PRESENCE_USERS)[number]+ path: { x: number; y: number }[]+ duration: number+}) {+ // Build looping keyframes — close the loop by appending the first point+ const xFrames = [...path.map((p) => `${p.x}%`), `${path[0].x}%`]+ const yFrames = [...path.map((p) => `${p.y}%`), `${path[0].y}%`]++ return (+ <motion.div+ className="absolute"+ initial={{ left: `${path[0].x}%`, top: `${path[0].y}%` }}+ animate={{ left: xFrames, top: yFrames }}+ transition={{+ duration,+ repeat: Infinity,+ ease: 'easeInOut',+ }}+ >+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ className="drop-shadow-md"+ style={{ filter: 'drop-shadow(0 2px 4px rgba(0,0,0,0.25))' }}+ aria-hidden+ >+ <path+ d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"+ fill={user.color}+ stroke="white"+ strokeWidth="1.5"+ strokeLinejoin="round"+ />+ </svg>+ <span+ className="ml-3 -mt-0.5 inline-block rounded px-1.5 py-0.5 text-[9px] font-medium text-white shadow-sm"+ style={{ backgroundColor: user.color }}+ >+ {user.name}+ </span>+ </motion.div>+ )+}++const YOU_COLOR = '#e563f5'++function PresenceSkeleton() {+ const containerRef = useRef<HTMLDivElement>(null)+ const [hovered, setHovered] = useState(false)+ const [mouse, setMouse] = useState({ x: 0, y: 0 })++ const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {+ const rect = e.currentTarget.getBoundingClientRect()+ setMouse({ x: e.clientX - rect.left, y: e.clientY - rect.top })+ }++ return (+ <div+ ref={containerRef}+ className="relative h-full w-full overflow-hidden"+ style={{ cursor: hovered ? 'none' : undefined }}+ onMouseEnter={() => setHovered(true)}+ onMouseLeave={() => setHovered(false)}+ onMouseMove={handleMouseMove}+ >+ {/* Stacked avatars — top right */}+ <div className="absolute right-4 top-4 z-10 flex -space-x-2">+ {PRESENCE_USERS.map((user) => (+ <div+ key={user.name}+ className="flex h-7 w-7 items-center justify-center rounded-full bg-surface-200 text-[9px] font-medium text-foreground"+ style={{+ boxShadow: `0 0 0 2px hsl(var(--background-surface-75)), 0 0 0 4px ${user.color}`,+ }}+ >+ {user.initials}+ </div>+ ))}+ {/* Your avatar — appears on hover */}+ <motion.div+ className="flex h-7 w-7 items-center justify-center rounded-full bg-surface-200 text-[9px] font-medium text-foreground"+ style={{+ boxShadow: `0 0 0 2px hsl(var(--background-surface-75)), 0 0 0 4px ${YOU_COLOR}`,+ }}+ initial={{ opacity: 0, scale: 0.5, width: 0, marginLeft: 0 }}+ animate={+ hovered+ ? { opacity: 1, scale: 1, width: 28, marginLeft: -8 }+ : { opacity: 0, scale: 0.5, width: 0, marginLeft: 0 }+ }+ transition={{ type: 'spring', duration: 0.47, bounce: 0 }}+ >+ You+ </motion.div>+ </div>++ {/* Animated cursors */}+ {PRESENCE_USERS.map((user, i) => (+ <PresenceCursor+ key={user.name}+ user={user}+ path={CURSOR_PATHS[i]}+ duration={CURSOR_DURATIONS[i]}+ />+ ))}++ {/* Your cursor — follows mouse on hover */}+ {hovered && (+ <div className="pointer-events-none absolute z-20" style={{ left: mouse.x, top: mouse.y }}>+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ className="drop-shadow-md"+ style={{ filter: 'drop-shadow(0 2px 4px rgba(0,0,0,0.25))' }}+ aria-hidden+ >+ <path+ d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"+ fill={YOU_COLOR}+ stroke="white"+ strokeWidth="1.5"+ strokeLinejoin="round"+ />+ </svg>+ <span+ className="ml-3 -mt-0.5 inline-block rounded px-1.5 py-0.5 text-[9px] font-medium text-white shadow-sm"+ style={{ backgroundColor: YOU_COLOR }}+ >+ You+ </span>+ </div>+ )}+ </div>+ )+}++const BROADCAST_PATHS = [+ { d: 'M180,58 C180,135 80,175 80,268', delay: 0 },+ { d: 'M180,58 C180,135 140,175 140,268', delay: 0.15 },+ { d: 'M180,58 C180,135 220,175 220,268', delay: 0.3 },+ { d: 'M180,58 C180,135 280,175 280,268', delay: 0.45 },+]++const BROADCAST_CLIENTS = [+ {+ // User icon+ icon: (+ <>+ <path+ d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinecap="round"+ />+ <circle cx="12" cy="7" r="4" stroke="currentColor" strokeWidth="1.5" />+ </>+ ),+ },+ {+ // Image icon+ icon: (+ <>+ <rect x="3" y="3" width="18" height="18" rx="2" stroke="currentColor" strokeWidth="1.5" />+ <circle cx="9" cy="9" r="2" stroke="currentColor" strokeWidth="1.5" />+ <path+ d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinecap="round"+ />+ </>+ ),+ },+ {+ // Layers icon+ icon: (+ <>+ <path+ d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinejoin="round"+ />+ <path+ d="m2 12 8.58 3.91a2 2 0 0 0 1.66 0L21 12"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="m2 17 8.58 3.91a2 2 0 0 0 1.66 0L21 17"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </>+ ),+ },+ {+ // Database icon+ icon: (+ <>+ <ellipse cx="12" cy="5" rx="7" ry="3" stroke="currentColor" strokeWidth="1.5" />+ <path d="M19 12c0 1.66-3.13 3-7 3s-7-1.34-7-3" stroke="currentColor" strokeWidth="1.5" />+ <path d="M5 5v14c0 1.66 3.13 3 7 3s7-1.34 7-3V5" stroke="currentColor" strokeWidth="1.5" />+ </>+ ),+ },+]++const PULSE_DURATION = 3000+// Time (ms) for pulse leading edge to reach the node+const PULSE_ARRIVAL = 350++function BroadcastSkeleton() {+ const [flashSet, setFlashSet] = useState<Set<number>>(new Set())++ useEffect(() => {+ const timers: ReturnType<typeof setTimeout>[] = []++ function scheduleFlashes() {+ BROADCAST_PATHS.forEach((line, i) => {+ const arrivalOffset = line.delay * 1000 + PULSE_ARRIVAL+ const t = setTimeout(() => {+ setFlashSet((prev) => new Set(prev).add(i))+ const clearT = setTimeout(() => {+ setFlashSet((prev) => {+ const next = new Set(prev)+ next.delete(i)+ return next+ })+ }, 500)+ timers.push(clearT)+ }, arrivalOffset)+ timers.push(t)+ })+ }++ scheduleFlashes()+ const interval = setInterval(scheduleFlashes, PULSE_DURATION)++ return () => {+ timers.forEach(clearTimeout)+ clearInterval(interval)+ }+ }, [])++ return (+ <div className="relative h-full w-full">+ {/* Source node — top center */}+ <div className="absolute left-1/2 top-5 z-10 -translate-x-1/2">+ <div className="flex items-center gap-2 rounded-xl border border-border bg-surface-100 px-3 py-2 shadow-xs dark:shadow-sm">+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ className="text-brand"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <path d="m22 8-6 4 6 4V8Z" stroke="currentColor" strokeWidth="1.5" />+ <rect+ x="2"+ y="6"+ width="14"+ height="12"+ rx="2"+ stroke="currentColor"+ strokeWidth="1.5"+ />+ </svg>+ <span className="text-xs font-medium text-foreground">channel:room-1</span>+ </div>+ </div>++ {/* SVG curves */}+ <svg+ className="absolute inset-0 h-full w-full"+ viewBox="0 0 360 320"+ fill="none"+ preserveAspectRatio="xMidYMid meet"+ >+ {BROADCAST_PATHS.map((line, i) => (+ <g key={i}>+ <path+ d={line.d}+ stroke="hsl(var(--foreground-muted))"+ strokeWidth="2"+ strokeLinecap="round"+ opacity="0.15"+ />+ <path+ d={line.d}+ stroke="#3ECF8E"+ strokeWidth="2"+ strokeLinecap="round"+ strokeDasharray="40 560"+ style={{+ animation: `broadcastPulse 3s ${line.delay}s linear infinite`,+ }}+ />+ </g>+ ))}+ </svg>++ {/* Destination nodes — positioned to match SVG path endpoints */}+ {BROADCAST_CLIENTS.map((client, i) => {+ const xPercent = [23.2, 39.5, 61, 77][i]+ const isFlashing = flashSet.has(i)++ return (+ <div+ key={i}+ className={cn(+ 'absolute bottom-6 z-10 flex h-10 w-10 -translate-x-1/2 items-center justify-center rounded-xl border bg-surface-100 shadow-xs dark:shadow-sm transition-all duration-300',+ isFlashing ? 'border-brand text-brand' : 'border-border text-foreground-muted'+ )}+ style={{ left: `${xPercent}%` }}+ >+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden>+ {client.icon}+ </svg>+ </div>+ )+ })}++ <style>{`+ @keyframes broadcastPulse {+ from { stroke-dashoffset: 600; }+ to { stroke-dashoffset: 0; }+ }+ `}</style>+ </div>+ )+}++export function FeaturesSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Three ways+ <br />+ <span className="text-foreground">to go realtime</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Database changes, presence tracking, and broadcast messaging — everything you need to+ build collaborative, real-time applications.+ </p>+ </div>++ {/* 3-col grid */}+ <div className="grid grid-cols-1 md:grid-cols-3 gap-3">+ {FEATURES.map((feature) => {+ const Visual = feature.visual+ return (+ <div+ key={feature.title}+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden"+ >+ <div className="relative flex items-center justify-center h-[320px]">+ <Visual />+ </div>+ <div className="px-6 py-5 flex flex-col gap-1">+ <h4 className="text-foreground text-sm font-medium">{feature.title}</h4>+ <p className="text-foreground-lighter text-sm">{feature.description}</p>+ </div>+ </div>+ )+ })}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/realtime/_components/Hero.tsx b/apps/www/app/(products)/realtime/_components/Hero.tsxnew file mode 100644index 00000000000..ab998add2d0--- /dev/null+++ b/apps/www/app/(products)/realtime/_components/Hero.tsx@@ -0,0 +1,30 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Link from 'next/link'+import { Button } from 'ui'++export function Hero() {+ return (+ <SectionContainerWithCn>+ <div className="flex flex-col gap-6 lg:gap-8">+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h1 className="text-foreground text-3xl sm:text-5xl sm:leading-none">+ <span className="block">Realtime</span>+ <span className="text-foreground-lighter block">sync in milliseconds</span>+ </h1>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Sync client state globally over WebSockets. Listen to database changes, store user+ presence, and broadcast messages to all connected clients.+ </p>+ </div>+ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link href="https://supabase.com/dashboard">Start your project</Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link href="/docs/guides/realtime">Documentation</Link>+ </Button>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/realtime/_components/QuoteSection.tsx b/apps/www/app/(products)/realtime/_components/QuoteSection.tsxnew file mode 100644index 00000000000..d0a5b86328b--- /dev/null+++ b/apps/www/app/(products)/realtime/_components/QuoteSection.tsx@@ -0,0 +1,15 @@+import { QuoteSection as SharedQuoteSection } from '../../_shared/QuoteSection'++export function QuoteSection() {+ return (+ <SharedQuoteSection+ quote="Supabase takes out the mental effort from our back-end infrastructure so we can focus on our customers needs."+ author={{+ name: 'Aaron Sullivan',+ role: 'Principal Software Engineer at Epsilon3',+ image: '/images/blog/avatars/aaron-epsilon3.png',+ link: '/customers/epsilon3',+ }}+ />+ )+}diff --git a/apps/www/app/(products)/realtime/_components/RealtimeContent.tsx b/apps/www/app/(products)/realtime/_components/RealtimeContent.tsxnew file mode 100644index 00000000000..fa6bf2b45e2--- /dev/null+++ b/apps/www/app/(products)/realtime/_components/RealtimeContent.tsx@@ -0,0 +1,34 @@+import { FeaturesSection } from './FeaturesSection'+import { Hero } from './Hero'+import { QuoteSection } from './QuoteSection'+import { BuiltWithSupabaseSection } from '@/components/BuiltWithSupabaseSection'+import { CTASection } from '@/components/CTASection'++export function RealtimeContent({ apiSlot }: { apiSlot: React.ReactNode }) {+ return (+ <div className="overflow-x-clip">+ <section aria-label="Hero">+ <Hero />+ </section>+ <section id="features" className="border-t border-border" aria-label="Realtime features">+ <FeaturesSection />+ </section>+ <section id="quote" className="border-t border-border" aria-label="Customer quote">+ <QuoteSection />+ </section>+ <section id="api" className="border-t border-border" aria-label="API examples">+ {apiSlot}+ </section>+ <section+ id="built-with-supabase"+ className="border-t border-border"+ aria-label="Built with Supabase"+ >+ <BuiltWithSupabaseSection />+ </section>+ <section id="get-started" className="border-t border-border" aria-label="Get started">+ <CTASection />+ </section>+ </div>+ )+}diff --git a/apps/www/app/(products)/realtime/page.tsx b/apps/www/app/(products)/realtime/page.tsxnew file mode 100644index 00000000000..d9018b99747--- /dev/null+++ b/apps/www/app/(products)/realtime/page.tsx@@ -0,0 +1,14 @@+import type { Metadata } from 'next'++import { ApiSection } from './_components/ApiSection'+import { RealtimeContent } from './_components/RealtimeContent'++export const metadata: Metadata = {+ title: 'Realtime | Supabase',+ description:+ 'Sync client state globally over WebSockets. Listen to database changes, store user presence, and broadcast messages in real time.',+}++export default function RealtimePage() {+ return <RealtimeContent apiSlot={<ApiSection />} />+}diff --git a/apps/www/app/(products)/storage/_components/ApiSection.tsx b/apps/www/app/(products)/storage/_components/ApiSection.tsxnew file mode 100644index 00000000000..17550e1598e--- /dev/null+++ b/apps/www/app/(products)/storage/_components/ApiSection.tsx@@ -0,0 +1,257 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'+import { ApiSectionClient } from './ApiSectionClient'++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#ffffff' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ {+ scope: [+ 'entity.name.function',+ 'support.function',+ 'entity.name.tag',+ 'support.class.component',+ ],+ settings: { foreground: '#15593b' },+ },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ {+ scope: [+ 'variable.other.property',+ 'support.type.property-name',+ 'meta.object-literal.key',+ 'entity.other.attribute-name',+ ],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['variable.parameter'], settings: { foreground: '#525252' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ ],+}++const LANG_MAP: Record<string, string> = {+ JavaScript: 'javascript',+ Flutter: 'dart',+ Python: 'python',+ 'C#': 'csharp',+ Kotlin: 'kotlin',+ Swift: 'swift',+}++const API_EXAMPLES = [+ {+ icon: 'Upload' as const,+ title: 'Upload a file',+ description: 'Upload any file type to your storage buckets with a single call.',+ code: {+ JavaScript: `// Upload an image to the "avatars" bucket+const spaceCat = event.target.files[0]+const { data, error } = await supabase+ .storage+ .from('avatars')+ .upload('space-cat.png', spaceCat)`,+ Flutter: `// Upload an image to the "avatars" bucket+final file = File('space-cat.png');+await supabase+ .storage+ .from('avatars')+ .upload('space-cat.png', file);`,+ Python: `# Upload an image to the "avatars" bucket+with open("space-cat.png", "rb") as f:+ supabase.storage.from_("avatars").upload(+ "space-cat.png", f+ )`,+ 'C#': `// Upload an image to the "avatars" bucket+var bytes = File.ReadAllBytes("space-cat.png");+await supabase.Storage+ .From("avatars")+ .Upload(bytes, "space-cat.png");`,+ Kotlin: `// Upload an image to the "avatars" bucket+supabase.storage.from("avatars")+ .upload("space-cat.png", file)`,+ Swift: `// Upload an image to the "avatars" bucket+let data = try Data(contentsOf: fileURL)+try await supabase.storage+ .from("avatars")+ .upload("space-cat.png", data: data)`,+ },+ },+ {+ icon: 'Download' as const,+ title: 'Download a file',+ description: 'Retrieve files from your buckets directly or via signed URLs.',+ code: {+ JavaScript: `// Download the "space-cat.png" from "avatars"+const { data, error } = await supabase+ .storage+ .from('avatars')+ .download('space-cat.png')`,+ Flutter: `// Download the "space-cat.png" from "avatars"+final bytes = await supabase+ .storage+ .from('avatars')+ .download('space-cat.png');`,+ Python: `# Download the "space-cat.png" from "avatars"+data = supabase.storage.from_("avatars") \\+ .download("space-cat.png")`,+ 'C#': `// Download the "space-cat.png" from "avatars"+var bytes = await supabase.Storage+ .From("avatars")+ .Download("space-cat.png");`,+ Kotlin: `// Download the "space-cat.png" from "avatars"+val bytes = supabase.storage.from("avatars")+ .downloadAuthenticated("space-cat.png")`,+ Swift: `// Download the "space-cat.png" from "avatars"+let data = try await supabase.storage+ .from("avatars")+ .download(path: "space-cat.png")`,+ },+ },+ {+ icon: 'List' as const,+ title: 'List files',+ description: 'Browse and list all files within a storage bucket.',+ code: {+ JavaScript: `// List all the files in the "avatars" bucket+const { data, error } = await supabase+ .storage+ .from('avatars')+ .list()`,+ Flutter: `// List all the files in the "avatars" bucket+final files = await supabase+ .storage+ .from('avatars')+ .list();`,+ Python: `# List all the files in the "avatars" bucket+files = supabase.storage.from_("avatars") \\+ .list()`,+ 'C#': `// List all the files in the "avatars" bucket+var files = await supabase.Storage+ .From("avatars")+ .List();`,+ Kotlin: `// List all the files in the "avatars" bucket+val files = supabase.storage.from("avatars")+ .list()`,+ Swift: `// List all the files in the "avatars" bucket+let files = try await supabase.storage+ .from("avatars")+ .list()`,+ },+ },+ {+ icon: 'ArrowRightLeft' as const,+ title: 'Move and rename',+ description: 'Organize your files by moving and renaming within or across buckets.',+ code: {+ JavaScript: `// Move and rename files+const { data, error } = await supabase+ .storage+ .from('avatars')+ .move('public/space-cat.png', 'private/space-cat.png')`,+ Flutter: `// Move and rename files+await supabase+ .storage+ .from('avatars')+ .move('public/space-cat.png', 'private/space-cat.png');`,+ Python: `# Move and rename files+supabase.storage.from_("avatars") \\+ .move("public/space-cat.png", "private/space-cat.png")`,+ 'C#': `// Move and rename files+await supabase.Storage+ .From("avatars")+ .Move("public/space-cat.png", "private/space-cat.png");`,+ Kotlin: `// Move and rename files+supabase.storage.from("avatars")+ .move("public/space-cat.png", "private/space-cat.png")`,+ Swift: `// Move and rename files+try await supabase.storage+ .from("avatars")+ .move(+ from: "public/space-cat.png",+ to: "private/space-cat.png"+ )`,+ },+ },+]++export async function ApiSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: Object.values(LANG_MAP),+ })++ const examples = API_EXAMPLES.map((example) => ({+ icon: example.icon,+ title: example.title,+ description: example.description,+ languages: Object.fromEntries(+ Object.entries(example.code).map(([lang, code]) => [+ lang,+ {+ darkHtml: hl.codeToHtml(code, { lang: LANG_MAP[lang], theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(code, { lang: LANG_MAP[lang], theme: 'supabase-light' }),+ },+ ])+ ),+ }))++ hl.dispose()++ return <ApiSectionClient examples={examples} />+}diff --git a/apps/www/app/(products)/storage/_components/ApiSectionClient.tsx b/apps/www/app/(products)/storage/_components/ApiSectionClient.tsxnew file mode 100644index 00000000000..12086abfc29--- /dev/null+++ b/apps/www/app/(products)/storage/_components/ApiSectionClient.tsx@@ -0,0 +1,217 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import { ArrowRightLeft, ChevronDown, Download, List, Upload } from 'lucide-react'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++const ICONS = { Upload, Download, List, ArrowRightLeft } as const++type IconName = keyof typeof ICONS++type ApiExample = {+ icon: IconName+ title: string+ description: string+ languages: Record<string, { darkHtml: string; lightHtml: string }>+}++const LANGUAGES = ['JavaScript', 'Flutter', 'Python', 'C#', 'Kotlin', 'Swift']++const INTERVAL_DURATION = 8000++export function ApiSectionClient({ examples }: { examples: ApiExample[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [activeLang, setActiveLang] = useState('JavaScript')+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = examples[activeIdx]++ // Auto-size the code panel to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % examples.length)+ }+ }, [progress, examples.length])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Simple and convenient+ <br />+ <span className="text-foreground">APIs</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Built from the ground up for interoperable authentication. Fast and easy to implement+ using our powerful library clients.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tab cards */}+ <div className="flex flex-col gap-1 items-start justify-end">+ {examples.map((example, index) => {+ const isActive = index === activeIdx+ const Icon = ICONS[example.icon]+ return (+ <button+ key={example.title}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex items-center gap-3 py-2 text-2xl font-medium transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <Icon size={22} strokeWidth={1.5} />+ {example.title}+ </button>+ )+ })}+ </div>++ {/* Right: code block */}+ <motion.div+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative self-end overflow-hidden border border-border rounded-md"+ >+ {/* Invisible measuring copy: drives the animated container height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto pb-12 [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.languages[activeLang]?.darkHtml ?? '' }}+ />++ {/* Language switcher */}+ <div className="absolute top-3 right-4 z-10 flex items-center">+ <div className="relative flex items-center gap-1 text-foreground-muted text-xs">+ <select+ value={activeLang}+ onChange={(e) => setActiveLang(e.target.value)}+ className="appearance-none bg-transparent text-foreground-light text-xs pr-4 cursor-pointer border-none outline-none shadow-none focus:border-none focus:outline-none focus:shadow-none focus:ring-0"+ >+ {LANGUAGES.map((lang) => (+ <option key={lang} value={lang}>+ {lang}+ </option>+ ))}+ </select>+ <ChevronDown size={12} className="absolute right-0 pointer-events-none" />+ </div>+ </div>++ <AnimatePresence mode="wait">+ <motion.div+ key={`${active.title}-${activeLang}`}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto pb-12"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.languages[activeLang]?.darkHtml ?? '' }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{+ __html: active.languages[activeLang]?.lightHtml ?? '',+ }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/guides/storage"+ className="absolute bottom-4 right-4 flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </motion.div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/storage/_components/BucketTypesSection.tsx b/apps/www/app/(products)/storage/_components/BucketTypesSection.tsxnew file mode 100644index 00000000000..5587e5e30f1--- /dev/null+++ b/apps/www/app/(products)/storage/_components/BucketTypesSection.tsx@@ -0,0 +1,77 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { Check } from 'lucide-react'+import Link from 'next/link'+import { Button } from 'ui'++const BUCKET_TYPES = [+ {+ title: 'Files buckets',+ features: [+ 'Store images, videos, documents, and more',+ 'Serve fast from a global CDN',+ 'Fine-grained access controls',+ 'Image optimizations and transformations',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/storage' },+ },+ {+ title: 'Analytics buckets',+ features: [+ 'Apache Iceberg open table format',+ 'Efficient query, partition, and transform',+ 'Historical and time-series data',+ 'Optionally expose via Postgres',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/storage/analytics-buckets' },+ },+ {+ title: 'Vector buckets',+ features: [+ 'Store and index vector embeddings',+ 'Multiple distance metrics',+ 'Metadata filtering and similarity queries',+ 'RAG systems and AI-powered search',+ ],+ cta: { label: 'Learn more', href: '/docs/guides/storage/vector-buckets' },+ },+]++export function BucketTypesSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Bucket types+ <br />+ <span className="text-foreground">for every application</span>+ </h3>+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-3">+ {BUCKET_TYPES.map((bucket) => (+ <div+ key={bucket.title}+ className="relative flex flex-col overflow-hidden lg:min-h-[320px] bg-surface-75 border border-border rounded-lg"+ >+ <div className="relative z-10 flex flex-col justify-between h-full p-6 md:p-8">+ <div className="flex flex-col gap-4">+ <h4 className="text-foreground text-lg font-medium">{bucket.title}</h4>+ <ul className="flex flex-col text-foreground-lighter text-sm gap-1.5">+ {bucket.features.map((feature) => (+ <li key={feature} className="flex items-start gap-2">+ <Check className="w-3.5 h-3.5 mt-0.5 shrink-0 stroke-2 text-brand" />+ <span>{feature}</span>+ </li>+ ))}+ </ul>+ </div>+ <div className="mt-6">+ <Button variant="default" size="small" asChild>+ <Link href={bucket.cta.href}>{bucket.cta.label}</Link>+ </Button>+ </div>+ </div>+ </div>+ ))}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/storage/_components/FeaturesSection.tsx b/apps/www/app/(products)/storage/_components/FeaturesSection.tsxnew file mode 100644index 00000000000..57d933117e5--- /dev/null+++ b/apps/www/app/(products)/storage/_components/FeaturesSection.tsx@@ -0,0 +1,328 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { cn } from 'ui'++const FEATURES = [+ {+ title: 'Interoperable',+ description: 'Integrates with the rest of Supabase — Auth and Postgres work together.',+ visual: InteroperableSkeleton,+ },+ {+ title: 'Lightning fast',+ description:+ 'Thin API server layer built on Postgres permissions with content delivered via global CDN.',+ visual: CDNSkeleton,+ },+ {+ title: 'Multiple bucket types',+ description:+ 'Files, Analytics, or Vector buckets — choose the right storage model for your application.',+ visual: BucketsSkeleton,+ },+]++function InteroperableSkeleton() {+ return (+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden [mask-image:radial-gradient(ellipse_88%_88%_at_50%_50%,black_40%,transparent_80%)] [webkit-mask-image:radial-gradient(ellipse_88%_88%_at_50%_50%,black_40%,transparent_80%)]">+ <div className="relative h-[220px] w-[310px]">+ <div className="pointer-events-none absolute inset-0 text-foreground-muted/12">+ <line x1="155" y1="8" x2="155" y2="212" className="stroke-current" strokeWidth="1" />+ <line x1="60" y1="8" x2="60" y2="212" className="stroke-current" strokeWidth="1" />+ <line x1="250" y1="8" x2="250" y2="212" className="stroke-current" strokeWidth="1" />+ <line x1="8" y1="110" x2="302" y2="110" className="stroke-current" strokeWidth="1" />+ </div>++ <div className="pointer-events-none absolute left-[58px] top-1/2 flex w-[56px] -translate-y-1/2 flex-col gap-1">+ {[0, 1].map((i) => (+ <div+ key={`left-conn-${i}`}+ className="relative h-[1.5px] w-full overflow-hidden bg-brand/18 [mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)] [webkit-mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)]"+ >+ <div+ className="absolute inset-y-0 left-0 w-24 [animation:interopLineSweep_1.05s_linear_infinite]"+ style={{+ animationDelay: `${i * 100}ms`,+ background:+ 'linear-gradient(to right, hsl(var(--brand-default)/0), hsl(var(--brand-default)/0.95), hsl(var(--brand-default)/0))',+ }}+ />+ </div>+ ))}+ </div>+ <div className="pointer-events-none absolute right-[58px] top-1/2 flex w-[56px] -translate-y-1/2 flex-col gap-1">+ {[0, 1].map((i) => (+ <div+ key={`right-conn-${i}`}+ className="relative h-[1.5px] w-full overflow-hidden bg-brand/18 [mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)] [webkit-mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)]"+ >+ <div+ className="absolute inset-y-0 left-0 w-24 [animation:interopLineSweep_1.05s_linear_infinite]"+ style={{+ animationDelay: `${140 + i * 100}ms`,+ background:+ 'linear-gradient(to right, hsl(var(--brand-default)/0), hsl(var(--brand-default)/0.95), hsl(var(--brand-default)/0))',+ }}+ />+ </div>+ ))}+ </div>++ <div className="absolute left-0 top-1/2 flex h-[70px] w-[70px] -translate-y-1/2 items-center justify-center rounded-xl border border-border bg-surface-100/95 shadow-[0_2px_10px_hsl(var(--background-default)/0.15)]">+ <div className="absolute inset-3 rounded-full border border-foreground-muted/15" />+ <div className="absolute inset-5 rounded-full border border-foreground-muted/10" />+ <svg+ width="20"+ height="20"+ viewBox="0 0 24 24"+ fill="none"+ className="relative z-10 text-foreground-muted"+ strokeWidth="1.9"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" className="stroke-current" />+ <circle cx="12" cy="7" r="4" className="stroke-current" />+ </svg>+ </div>++ <div className="absolute left-1/2 top-1/2 flex h-[92px] w-[108px] -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-2xl border border-border bg-surface-100/95 shadow-[0_6px_18px_hsl(var(--background-default)/0.16)]">+ <div className="absolute inset-3 rounded-[14px] border border-foreground-muted/10" />+ <div className="absolute size-12 rounded-full border border-foreground-muted/15" />+ <div className="absolute size-16 rounded-full border border-foreground-muted/8" />+ <svg+ width="34"+ height="34"+ viewBox="0 0 24 24"+ fill="none"+ className="relative z-10 text-brand"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <path+ d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"+ className="stroke-current"+ />+ </svg>+ </div>++ <div className="absolute right-0 top-1/2 flex h-[70px] w-[70px] -translate-y-1/2 items-center justify-center rounded-xl border border-border bg-surface-100/95 shadow-[0_2px_10px_hsl(var(--background-default)/0.15)]">+ <div className="absolute inset-3 rounded-full border border-foreground-muted/15" />+ <div className="absolute inset-5 rounded-full border border-foreground-muted/10" />+ <svg+ width="20"+ height="20"+ viewBox="0 0 24 24"+ fill="none"+ className="relative z-10 text-foreground-muted"+ strokeWidth="1.8"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <ellipse cx="12" cy="5" rx="7" ry="3" className="stroke-current" />+ <path d="M19 12c0 1.66-3.13 3-7 3s-7-1.34-7-3" className="stroke-current" />+ <path d="M5 5v14c0 1.66 3.13 3 7 3s7-1.34 7-3V5" className="stroke-current" />+ </svg>+ </div>++ <style>{`+ @keyframes interopLineSweep {+ from {+ transform: translateX(-120%);+ }+ to {+ transform: translateX(260%);+ }+ }+ `}</style>+ </div>+ </div>+ )+}++function CDNSkeleton() {+ return (+ <div className="relative flex h-full w-full items-center justify-center [mask-image:radial-gradient(ellipse_85%_85%_at_50%_50%,black_35%,transparent_78%)] [webkit-mask-image:radial-gradient(ellipse_85%_85%_at_50%_50%,black_35%,transparent_78%)]">+ <div className="absolute inset-0 z-[1] flex items-center justify-center">+ <div className="flex w-[290px] flex-col gap-0.5">+ {[-20, -10, 0, 10, 20].map((offset, i) => (+ <div+ key={`flash-${offset}`}+ className="relative h-px w-full overflow-hidden bg-brand/15 [mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)] [webkit-mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)]"+ style={{ transform: `translateY(${offset}px)` }}+ >+ <div+ className="absolute inset-y-0 left-0 w-24 [animation:cdnFlashSweep_1.05s_linear_infinite]"+ style={{+ animationDelay: `${i * 130}ms`,+ background:+ 'linear-gradient(to right, hsl(var(--brand-default)/0), hsl(var(--brand-default)/0.9), hsl(var(--brand-default)/0))',+ }}+ />+ </div>+ ))}+ </div>+ </div>++ <div className="absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2">+ <div className="pointer-events-none absolute left-1/2 top-1/2 -z-10 -translate-x-1/2 -translate-y-1/2">+ <div className="absolute -left-[70px] top-1/2 h-[88px] w-[122px] -translate-y-1/2 rounded-[20px] border border-border bg-surface-100 shadow-[0_2px_10px_hsl(var(--background-default)/0.18)]" />+ <div className="absolute -right-[70px] top-1/2 h-[88px] w-[122px] -translate-y-1/2 rounded-[20px] border border-border bg-surface-100 shadow-[0_2px_10px_hsl(var(--background-default)/0.18)]" />+ </div>++ <div className="relative flex h-[116px] w-[116px] items-center justify-center rounded-[24px] border border-foreground/15 bg-surface-200/95 shadow-[0_8px_28px_hsl(var(--background-default)/0.24)]">+ <div className="absolute inset-0 rounded-[24px] shadow-[inset_0_1px_0_hsl(var(--foreground-default)/0.06)]" />+ <div className="absolute size-10 rounded-full bg-brand/15 blur-xl" />+ <svg+ width="48"+ height="48"+ viewBox="0 0 24 24"+ fill="none"+ className="relative z-10 text-brand"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <path+ d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"+ className="stroke-current"+ />+ </svg>+ </div>+ </div>++ <style>{`+ @keyframes cdnFlashSweep {+ from {+ transform: translateX(-120%);+ }+ to {+ transform: translateX(260%);+ }+ }+ `}</style>+ </div>+ )+}++function BucketsSkeleton() {+ const buckets = [+ {+ name: 'Files',+ label: 'images, videos, docs',+ icon: 'folder' as const,+ colorClass: 'text-brand',+ },+ {+ name: 'Analytics',+ label: 'Iceberg, time-series',+ icon: 'chart' as const,+ colorClass: 'text-blue-700 dark:text-blue-400',+ },+ {+ name: 'Vectors',+ label: 'embeddings, RAG',+ icon: 'sparkles' as const,+ colorClass: 'text-purple-700 dark:text-purple-400',+ },+ ]++ return (+ <div className="flex items-center justify-center w-full h-full">+ <div className="flex w-64 flex-col gap-2">+ {buckets.map((bucket) => (+ <div+ key={bucket.name}+ className="flex items-center justify-between px-4 py-2.5 rounded-lg border border-border bg-surface-200"+ >+ <div className="flex items-center gap-2">+ <svg+ width="13"+ height="13"+ viewBox="0 0 24 24"+ fill="none"+ className={cn('shrink-0', bucket.colorClass)}+ strokeWidth="1.75"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ {bucket.icon === 'folder' && (+ <path+ d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"+ className="stroke-current"+ />+ )}+ {bucket.icon === 'chart' && (+ <>+ <line x1="5" y1="20" x2="5" y2="10" className="stroke-current" />+ <line x1="12" y1="20" x2="12" y2="6" className="stroke-current" />+ <line x1="19" y1="20" x2="19" y2="13" className="stroke-current" />+ </>+ )}+ {bucket.icon === 'sparkles' && (+ <>+ <path+ d="M12 3l2.3 5.2L20 10.5l-5.7 2.3L12 18l-2.3-5.2L4 10.5l5.7-2.3L12 3z"+ className="stroke-current"+ />+ <path d="M19 3v4" className="stroke-current" />+ <path d="M21 5h-4" className="stroke-current" />+ </>+ )}+ </svg>+ <span className={cn('text-xs font-medium', bucket.colorClass)}>{bucket.name}</span>+ </div>+ <span className="text-foreground-muted text-[11px]">{bucket.label}</span>+ </div>+ ))}+ </div>+ </div>+ )+}++export function FeaturesSection() {+ return (+ <SectionContainerWithCn spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Everything you need+ <br />+ <span className="text-foreground">for storage</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ S3 compatible storage with global CDN, image transformations, and fine-grained access+ controls powered by Postgres RLS.+ </p>+ </div>++ {/* 3-col grid */}+ <div className="grid grid-cols-1 md:grid-cols-3 gap-3">+ {FEATURES.map((feature) => {+ const Visual = feature.visual+ return (+ <div+ key={feature.title}+ className="flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden"+ >+ <div className="relative flex items-center justify-center h-[320px]">+ <Visual />+ </div>+ <div className="px-6 py-5 flex flex-col gap-1">+ <h4 className="text-foreground text-sm font-medium">{feature.title}</h4>+ <p className="text-foreground-lighter text-sm">{feature.description}</p>+ </div>+ </div>+ )+ })}+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/storage/_components/Hero.tsx b/apps/www/app/(products)/storage/_components/Hero.tsxnew file mode 100644index 00000000000..e3f3eb3de7d--- /dev/null+++ b/apps/www/app/(products)/storage/_components/Hero.tsx@@ -0,0 +1,30 @@+import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import Link from 'next/link'+import { Button } from 'ui'++export function Hero() {+ return (+ <SectionContainerWithCn>+ <div className="flex flex-col gap-6 lg:gap-8">+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h1 className="text-foreground text-3xl sm:text-5xl sm:leading-none">+ <span className="block">Store and serve</span>+ <span className="text-foreground-lighter block">any type of digital content</span>+ </h1>+ <p className="text-foreground-lighter text-sm lg:text-base">+ An open source S3 compatible storage solution with unlimited scalability, for any file+ type. With custom policies and permissions that are familiar and easy to implement.+ </p>+ </div>+ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link href="https://supabase.com/dashboard">Start your project</Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link href="/docs/guides/storage">Documentation</Link>+ </Button>+ </div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/storage/_components/PermissionsSection.tsx b/apps/www/app/(products)/storage/_components/PermissionsSection.tsxnew file mode 100644index 00000000000..d9f01562175--- /dev/null+++ b/apps/www/app/(products)/storage/_components/PermissionsSection.tsx@@ -0,0 +1,111 @@+import { createHighlighter, type ThemeRegistration } from 'shiki'++import { PermissionsSectionClient } from './PermissionsSectionClient'++const supabaseDark: ThemeRegistration = {+ name: 'supabase-dark',+ type: 'dark',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#ffffff',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#bda4ff' },+ },+ { scope: ['entity.name.function', 'support.function'], settings: { foreground: '#3ecf8e' } },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#3ecf8e' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#ffcda1' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['punctuation'], settings: { foreground: '#ffffff' } },+ { scope: ['constant.numeric'], settings: { foreground: '#ededed' } },+ ],+}++const supabaseLight: ThemeRegistration = {+ name: 'supabase-light',+ type: 'light',+ colors: {+ 'editor.background': '#00000000',+ 'editor.foreground': '#525252',+ },+ tokenColors: [+ {+ scope: ['keyword', 'storage', 'storage.type', 'storage.modifier'],+ settings: { foreground: '#6b35dc' },+ },+ { scope: ['entity.name.function', 'support.function'], settings: { foreground: '#15593b' } },+ {+ scope: ['constant', 'variable.other.constant', 'support.constant'],+ settings: { foreground: '#15593b' },+ },+ { scope: ['string', 'string.quoted'], settings: { foreground: '#f1a10d' } },+ { scope: ['comment', 'punctuation.definition.comment'], settings: { foreground: '#7e7e7e' } },+ { scope: ['punctuation'], settings: { foreground: '#a0a0a0' } },+ { scope: ['constant.numeric'], settings: { foreground: '#525252' } },+ ],+}++const PERMISSION_EXAMPLES = [+ {+ title: 'Public access to a bucket',+ description: 'Allow any user access to all files in a bucket.',+ code: `create policy "Public Access"+on storage.objects for all+using ( bucket_id = 'avatars' );`,+ },+ {+ title: 'Public access to a folder',+ description: 'Allow public CRUD access to a specific folder within a bucket.',+ code: `create policy "Public access to a folder"+on storage.objects for all+using (+ bucket_id = 'avatars'+ and (storage.foldername(name))[1] = 'public'+);`,+ },+ {+ title: 'Authenticated access',+ description: 'Restrict access to authenticated users for a specific folder.',+ code: `create policy "Logged in access"+on storage.objects+for all using (+ bucket_id = 'avatars'+ and auth.role() = 'authenticated'+ and (storage.foldername(name))[1] = 'authenticated'+);`,+ },+ {+ title: 'Individual file access',+ description: 'Grant a specific user access to a single file by UID.',+ code: `create policy "Individual access"+on storage.objects for all+using (+ bucket_id = 'avatars'+ and name = 'folder/only_uid.jpg'+ and (select auth.uid()) = 'd8c7bce9-cfeb-497b-bd61-e66ce2cbdaa2'+);`,+ },+]++export async function PermissionsSection() {+ const hl = await createHighlighter({+ themes: [supabaseDark, supabaseLight],+ langs: ['sql'],+ })++ const examples = PERMISSION_EXAMPLES.map((example) => ({+ title: example.title,+ description: example.description,+ darkHtml: hl.codeToHtml(example.code, { lang: 'sql', theme: 'supabase-dark' }),+ lightHtml: hl.codeToHtml(example.code, { lang: 'sql', theme: 'supabase-light' }),+ }))++ hl.dispose()++ return <PermissionsSectionClient examples={examples} />+}diff --git a/apps/www/app/(products)/storage/_components/PermissionsSectionClient.tsx b/apps/www/app/(products)/storage/_components/PermissionsSectionClient.tsxnew file mode 100644index 00000000000..f7f17fea931--- /dev/null+++ b/apps/www/app/(products)/storage/_components/PermissionsSectionClient.tsx@@ -0,0 +1,195 @@+'use client'++import SectionContainerWithCn from '~/components/Layouts/SectionContainerWithCn'+import { AnimatePresence, motion, useInView } from 'framer-motion'+import Link from 'next/link'+import { useCallback, useEffect, useRef, useState } from 'react'+import { cn } from 'ui'++type PermissionExample = {+ title: string+ description: string+ darkHtml: string+ lightHtml: string+}++const INTERVAL_DURATION = 10000++export function PermissionsSectionClient({ examples }: { examples: PermissionExample[] }) {+ const [activeIdx, setActiveIdx] = useState(0)+ const [progress, setProgress] = useState(0)+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null)+ const inViewRef = useRef<HTMLDivElement>(null)+ const inView = useInView(inViewRef, { amount: 0.3 })+ const active = examples[activeIdx]++ // Auto-size the code panel to the active snippet. We measure an always-mounted,+ // invisible copy of the current code so the target height is known immediately on+ // switch (and doesn't collapse during the cross-fade), then animate `height` to it.+ const measureRef = useRef<HTMLDivElement>(null)+ const [height, setHeight] = useState<number>()+ const hasMeasured = useRef(false)++ useEffect(() => {+ const el = measureRef.current+ if (!el) return+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight))+ ro.observe(el)+ setHeight(el.offsetHeight)+ return () => ro.disconnect()+ }, [])++ useEffect(() => {+ if (height != null) hasMeasured.current = true+ }, [height])++ const clearTimer = useCallback(() => {+ if (intervalRef.current) {+ clearInterval(intervalRef.current)+ intervalRef.current = null+ }+ }, [])++ const startTimer = useCallback(() => {+ clearTimer()+ setProgress(0)+ const updateFrequency = 30+ const increment = (100 / INTERVAL_DURATION) * updateFrequency+ intervalRef.current = setInterval(() => {+ setProgress((prev) => {+ const next = prev + increment+ if (next >= 100) return 100+ return next+ })+ }, updateFrequency)+ }, [clearTimer])++ useEffect(() => {+ if (progress >= 100) {+ setActiveIdx((prev) => (prev + 1) % examples.length)+ }+ }, [progress, examples.length])++ useEffect(() => {+ if (inView) {+ startTimer()+ } else {+ clearTimer()+ }+ return clearTimer+ }, [inView, activeIdx, startTimer, clearTimer])++ const handleTabClick = (index: number) => {+ setActiveIdx(index)+ startTimer()+ }++ return (+ <SectionContainerWithCn ref={inViewRef} spacing="sections">+ {/* Header */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-end">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Integrates natively+ <br />+ <span className="text-foreground">with Supabase Auth</span>+ </h3>+ <p className="text-foreground-lighter text-sm lg:text-base">+ Storage authorization is built around Postgres so that you can use any combination of SQL,+ Postgres functions, and even your own metadata to write policies.+ </p>+ </div>++ {/* Content */}+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">+ {/* Left: tabs */}+ <div className="flex flex-col gap-3 items-start justify-end">+ {examples.map((example, index) => {+ const isActive = index === activeIdx+ return (+ <button+ key={example.title}+ onClick={() => handleTabClick(index)}+ className={cn(+ 'text-left flex flex-col gap-0.5 py-2 transition-colors',+ isActive ? 'text-foreground' : 'text-foreground-muted hover:text-foreground-light'+ )}+ >+ <span className="text-2xl font-medium tracking-tight">{example.title}</span>+ <span+ className={cn(+ 'text-sm transition-colors',+ isActive ? 'text-foreground-lighter' : 'text-foreground-muted'+ )}+ >+ {example.description}+ </span>+ </button>+ )+ })}+ </div>++ {/* Right: code block */}+ <motion.div+ initial={false}+ animate={height != null ? { height } : undefined}+ transition={+ hasMeasured.current ? { duration: 0.35, ease: [0.22, 1, 0.36, 1] } : { duration: 0 }+ }+ className="relative self-end overflow-hidden border border-border rounded-md"+ >+ {/* Invisible measuring copy: drives the animated container height */}+ <div+ ref={measureRef}+ aria-hidden+ className="pointer-events-none invisible absolute inset-x-0 top-0 overflow-x-auto pb-12 [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ />++ <AnimatePresence mode="wait">+ <motion.div+ key={active.title}+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15, delay: 0.05 } }}+ exit={{ opacity: 0, transition: { duration: 0.05 } }}+ className="overflow-x-auto pb-12"+ >+ <div+ dangerouslySetInnerHTML={{ __html: active.darkHtml }}+ className="hidden dark:block [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ <div+ dangerouslySetInnerHTML={{ __html: active.lightHtml }}+ className="block dark:hidden [&_pre]:!bg-transparent [&_pre]:m-0 [&_pre]:p-6"+ style={{ fontSize: '0.8125rem', fontWeight: 500, lineHeight: 1.7 }}+ />+ </motion.div>+ </AnimatePresence>+ <Link+ href="/docs/reference/javascript/storage-createbucket"+ className="absolute bottom-4 right-4 flex items-center gap-1.5 rounded-full bg-surface-100 border border-border px-3 py-1.5 text-xs text-foreground-light hover:text-foreground hover:bg-surface-200 transition-colors whitespace-nowrap"+ >+ Documentation+ <svg+ width={12}+ height={12}+ viewBox="0 0 12 12"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="shrink-0"+ >+ <path+ d="M3.5 2.5H9.5V8.5M9.5 2.5L2.5 9.5"+ stroke="currentColor"+ strokeWidth={1.5}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </Link>+ </motion.div>+ </div>+ </SectionContainerWithCn>+ )+}diff --git a/apps/www/app/(products)/storage/_components/QuoteSection.tsx b/apps/www/app/(products)/storage/_components/QuoteSection.tsxnew file mode 100644index 00000000000..8b6858ee5ab--- /dev/null+++ b/apps/www/app/(products)/storage/_components/QuoteSection.tsx@@ -0,0 +1,15 @@+import { QuoteSection as SharedQuoteSection } from '../../_shared/QuoteSection'++export function QuoteSection() {+ return (+ <SharedQuoteSection+ quote="Supabase is great because it has everything. I don't need a different solution for authentication, a different solution for database, or a different solution for storage."+ author={{+ name: 'Yasser Elsaid',+ role: 'Founder of Chatbase',+ image: '/images/blog/avatars/yasser-elsaid-chatbase.jpeg',+ link: '/customers/chatbase',+ }}+ />+ )+}diff --git a/apps/www/app/(products)/storage/_components/StorageContent.tsx b/apps/www/app/(products)/storage/_components/StorageContent.tsxnew file mode 100644index 00000000000..de134996ecf--- /dev/null+++ b/apps/www/app/(products)/storage/_components/StorageContent.tsx@@ -0,0 +1,47 @@+import { BucketTypesSection } from './BucketTypesSection'+import { FeaturesSection } from './FeaturesSection'+import { Hero } from './Hero'+import { QuoteSection } from './QuoteSection'+import { BuiltWithSupabaseSection } from '@/components/BuiltWithSupabaseSection'+import { CTASection } from '@/components/CTASection'++export function StorageContent({+ apiSlot,+ permissionsSlot,+}: {+ apiSlot: React.ReactNode+ permissionsSlot: React.ReactNode+}) {+ return (+ <div className="overflow-x-clip">+ <section aria-label="Hero">+ <Hero />+ </section>+ <section id="features" className="border-t border-border" aria-label="Storage features">+ <FeaturesSection />+ </section>+ <section id="quote" className="border-t border-border" aria-label="Customer quote">+ <QuoteSection />+ </section>+ <section id="bucket-types" className="border-t border-border" aria-label="Bucket types">+ <BucketTypesSection />+ </section>+ <section id="api" className="border-t border-border" aria-label="API examples">+ {apiSlot}+ </section>+ <section id="permissions" className="border-t border-border" aria-label="Permissions">+ {permissionsSlot}+ </section>+ <section+ id="built-with-supabase"+ className="border-t border-border"+ aria-label="Built with Supabase"+ >+ <BuiltWithSupabaseSection />+ </section>+ <section id="get-started" className="border-t border-border" aria-label="Get started">+ <CTASection />+ </section>+ </div>+ )+}diff --git a/apps/www/app/(products)/storage/page.tsx b/apps/www/app/(products)/storage/page.tsxnew file mode 100644index 00000000000..736e585dcfb--- /dev/null+++ b/apps/www/app/(products)/storage/page.tsx@@ -0,0 +1,15 @@+import type { Metadata } from 'next'++import { ApiSection } from './_components/ApiSection'+import { PermissionsSection } from './_components/PermissionsSection'+import { StorageContent } from './_components/StorageContent'++export const metadata: Metadata = {+ title: 'Storage | Supabase',+ description:+ 'An open source S3 compatible storage solution with unlimited scalability, for any file type.',+}++export default function StoragePage() {+ return <StorageContent apiSlot={<ApiSection />} permissionsSlot={<PermissionsSection />} />+}diff --git a/apps/www/components/BuiltWithSupabaseSection.tsx b/apps/www/components/BuiltWithSupabaseSection.tsxnew file mode 100644index 00000000000..f2e17f39311--- /dev/null+++ b/apps/www/components/BuiltWithSupabaseSection.tsx@@ -0,0 +1,200 @@+import Examples from 'data/Examples'+import Link from 'next/link'+import { cn } from 'ui'++const EXAMPLE_LOGO: Record<string, { src: string; invert?: boolean }> = {+ 'Stripe Subscriptions Starter': { src: '/images/logos/frameworks/stripe.svg' },+ 'Next.js Starter': { src: '/images/logos/frameworks/nextjs.svg', invert: true },+ 'AI Chatbot': { src: '/images/logos/frameworks/openai.svg', invert: true },+ 'LangChain + Next.js Starter': { src: '/images/logos/frameworks/langchain.svg' },+ 'Flutter User Management': { src: '/images/logos/frameworks/flutter.svg' },+ 'Expo React Native Starter': { src: '/images/logos/frameworks/expo.svg', invert: true },+}++function SkeletonBar({ className }: { className?: string }) {+ return <div className={cn(`rounded bg-foreground-muted/10`, className)} />+}++function StripeSkeleton() {+ return (+ <div+ aria-label="Pricing page with subscription tiers"+ className="flex flex-col items-center justify-center gap-3 p-5 w-full"+ >+ <div className="flex -mb-8">+ <div className="w-24 aspect-[9/16] border flex flex-col items-center">+ <div className="flex flex-col items-center justify-center gap-2 p-2">+ <SkeletonBar className="w-8 h-2.5" />+ <SkeletonBar className="w-16 h-2.5" />+ </div>++ <SkeletonBar className="w-20 aspect-square mt-4" />+ </div>++ <div className="w-24 aspect-[9/16] border flex flex-col items-center border-l-0 bg-[#635BFF]/5">+ <div className="flex flex-col items-center justify-center gap-2 p-2">+ <SkeletonBar className="w-8 h-2.5 bg-purple-800" />+ <SkeletonBar className="w-16 h-2.5 bg-purple-900" />+ </div>++ <SkeletonBar className="w-20 aspect-square mt-4 dark:bg-muted" />+ </div>++ <div className="w-24 aspect-[9/16] border flex flex-col items-center border-l-0">+ <div className="flex flex-col items-center justify-center gap-2 p-2">+ <SkeletonBar className="w-8 h-2.5" />+ <SkeletonBar className="w-16 h-2.5" />+ </div>++ <SkeletonBar className="w-20 aspect-square mt-4" />+ </div>+ </div>+ </div>+ )+}++function NextjsSkeleton() {+ return (+ <div+ aria-label="Dashboard with sidebar navigation and data grid"+ className="flex w-full h-full"+ >+ {/* Sidebar */}+ <div className="w-24 border-r border-foreground-muted/10 flex flex-col gap-2 p-3 pt-3">+ <SkeletonBar className="h-3 w-3 rounded-sm bg-[#0070F3]" />+ <div className="flex flex-col gap-1.5 mt-3">+ <SkeletonBar className="h-2 w-full bg-muted" />+ <SkeletonBar className="h-2 w-14" />+ <SkeletonBar className="h-2 w-full" />+ <SkeletonBar className="h-2 w-10" />+ </div>+ </div>+ {/* Main */}+ <div className="flex-1 flex flex-col gap-2 p-3">+ <SkeletonBar className="h-2.5 w-16 bg-muted" />+ {/* 3x4 data grid */}+ <div className="grid grid-cols-4 grid-rows-3 gap-1.5 flex-1">+ {Array.from({ length: 12 }).map((_, i) => (+ <div+ key={i}+ className={cn(+ 'rounded-sm bg-foreground-muted/10 min-h-[40px]',+ [1, 6, 9].includes(i) && 'bg-muted/70'+ )}+ />+ ))}+ </div>+ </div>+ </div>+ )+}++const SKELETON_CONTENT: Record<string, () => React.JSX.Element> = {+ 'Stripe Subscriptions Starter': StripeSkeleton,+ 'Next.js Starter': NextjsSkeleton,+}++export function BuiltWithSupabaseSection() {+ const featuredExamples = Examples.slice(0, 2)+ const gridExamples = Examples.slice(2, 6)++ return (+ <div className="py-24 flex flex-col gap-16">+ {/* Header row */}+ <div className="mx-auto max-w-(--container-max-w,75rem) w-full px-6">+ <div className="flex flex-col gap-4 md:flex-row md:items-end md:justify-between">+ <h3 className="text-2xl md:text-4xl text-foreground-lighter max-w-xl">+ Kickstart your next project <br />+ <span className="text-foreground">with production ready templates</span>+ </h3>+ <Link+ href="/docs/guides/examples"+ className="text-sm text-foreground-light hover:text-foreground underline"+ >+ View all examples+ </Link>+ </div>+ </div>++ <div className="mx-auto max-w-(--container-max-w,75rem) px-6 w-full">+ {/* Featured row - 2 large cells */}+ <div className="grid grid-cols-1 md:grid-cols-2 gap-3">+ {featuredExamples.map((example) => {+ const logo = EXAMPLE_LOGO[example.title]+ const Skeleton = SKELETON_CONTENT[example.title]+ return (+ <Link+ key={example.title}+ href={example.repo_url ?? '#'}+ target="_blank"+ rel="noopener noreferrer"+ className="group flex flex-col bg-surface-75 border border-border rounded-lg overflow-hidden hover:bg-surface-100 transition-colors"+ >+ <div className="px-6 py-5 flex flex-col gap-2.5">+ {logo && (+ <img+ src={logo.src}+ alt=""+ className={`h-5 w-fit object-contain ${logo.invert ? ' dark:invert' : ''}`}+ />+ )}+ <div>+ <h4 className="text-foreground text-sm font-medium">{example.title}</h4>+ <p className="text-foreground-lighter text-sm mt-1 line-clamp-2">+ {example.description}+ </p>+ </div>+ </div>+ <div className="flex-1 flex items-center justify-center px-6 pt-4 pb-0 overflow-hidden">+ {/* Browser frame */}+ <div className="w-full rounded-t-lg border border-b-0 border-border-stronger/50 shadow-lg -mb-[10%] overflow-hidden">+ {/* Title bar */}+ <div className="flex items-center gap-1.5 px-3 py-2.5 border-b border-border bg-background-200">+ <span className="size-2.5 rounded-full bg-foreground-muted/30" />+ <span className="size-2.5 rounded-full bg-foreground-muted/30" />+ <span className="size-2.5 rounded-full bg-foreground-muted/30" />+ </div>+ {/* Skeleton content */}+ <div className="h-[240px] flex items-center justify-center bg-background">+ {Skeleton ? <Skeleton /> : null}+ </div>+ </div>+ </div>+ </Link>+ )+ })}+ </div>++ {/* Grid row - 4 smaller cells */}+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mt-3">+ {gridExamples.map((example) => {+ const logo = EXAMPLE_LOGO[example.title]+ return (+ <Link+ key={example.title}+ href={example.repo_url ?? '#'}+ target="_blank"+ rel="noopener noreferrer"+ className="group flex flex-col bg-surface-75 border border-border rounded-lg px-6 py-10 hover:bg-surface-100 transition-colors"+ >+ <div className="flex items-center gap-2 mb-3">+ {logo && (+ <img+ src={logo.src}+ alt=""+ className={`h-5 w-5 object-contain${logo.invert ? ' dark:invert' : ''}`}+ />+ )}+ </div>+ <h4 className="text-foreground text-sm font-medium">{example.title}</h4>+ <p className="text-foreground-lighter text-sm mt-1 line-clamp-2">+ {example.description}+ </p>+ </Link>+ )+ })}+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/CTASection.tsx b/apps/www/components/CTASection.tsxnew file mode 100644index 00000000000..346b93b89f2--- /dev/null+++ b/apps/www/components/CTASection.tsx@@ -0,0 +1,48 @@+'use client'++import { useSendTelemetryEvent } from '~/lib/telemetry'+import Link from 'next/link'+import { Button } from 'ui'++export function CTASection() {+ const sendTelemetryEvent = useSendTelemetryEvent()++ return (+ <div className="relative overflow-hidden py-32">+ <div className="relative z-20 flex flex-col items-center text-center gap-6">+ <h2 className="h2">+ <span className="text-foreground-lighter">Build in a weekend,</span>+ <span className="text-foreground block sm:inline"> scale to millions</span>+ </h2>+ <div className="flex items-center gap-2">+ <Button asChild size="medium">+ <Link+ href="https://supabase.com/dashboard"+ onClick={() =>+ sendTelemetryEvent({+ action: 'start_project_button_clicked',+ properties: { buttonLocation: 'CTA Banner' },+ })+ }+ >+ Start your project+ </Link>+ </Button>+ <Button asChild size="medium" variant="default">+ <Link+ href="/contact/sales"+ onClick={() =>+ sendTelemetryEvent({+ action: 'request_demo_button_clicked',+ properties: { buttonLocation: 'CTA Banner' },+ })+ }+ >+ Request a demo+ </Link>+ </Button>+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/Layouts/SectionContainerWithCn.tsx b/apps/www/components/Layouts/SectionContainerWithCn.tsxindex 037db66e255..0416f200d69 100644--- a/apps/www/components/Layouts/SectionContainerWithCn.tsx+++ b/apps/www/components/Layouts/SectionContainerWithCn.tsx@@ -13,10 +13,15 @@ const sectionContainerVariants = cva('section-container relative', {narrow: 'py-6 md:py-8 lg:py-8 xl:py-10',none: '',},+ spacing: {+ none: '',+ sections: 'space-y-8 md:space-y-16',+ },},defaultVariants: {width: 'normal',height: 'normal',+ spacing: 'none',},})@@ -33,8 +38,12 @@ interface Props extends VariantProps<typeof sectionContainerVariants> {* @param height - 'normal' (default) or 'narrow'*/const SectionContainerWithCn = forwardRef(- ({ children, className, id, width, height }: Props, ref: Ref<HTMLDivElement>) => (- <div ref={ref} id={id} className={cn(sectionContainerVariants({ width, height }), className)}>+ ({ children, className, id, width, height, spacing }: Props, ref: Ref<HTMLDivElement>) => (+ <div+ ref={ref}+ id={id}+ className={cn(sectionContainerVariants({ width, height, spacing }), className)}+ >{children}</div>)diff --git a/apps/www/components/Products/Functions/CI.tsx b/apps/www/components/Products/Functions/CI.tsxindex 8e2df8fb933..a2c546e92f8 100644--- a/apps/www/components/Products/Functions/CI.tsx+++ b/apps/www/components/Products/Functions/CI.tsx@@ -1,36 +1,129 @@-import React from 'react'-import CodeWindow from '~/components/CodeWindow'--const ciCode = `jobs:- deploy:- runs-on: ubuntu-latest-- steps:- - uses: actions/checkout@v4- - uses: supabase/setup-cli@v1- with:- version: latest- - run: supabase functions deploy-`--const CI = () => (- <div className="w-full h-full relative pl-4 xl:mb-0 pt-4 sm:pt-4 border-b xl:border-none overflow-hidden">- <CodeWindow- code={ciCode}- lang="yaml"- className="- rounded-r-none rounded-b-none border-r-0 border-b-0- h-full text-[13px]! xl:text-sm! leading-4- [&_.synthax-highlighter]:rounded-b-none- [&_.synthax-highlighter]:rounded-r-none- [&_.synthax-highlighter]:border-r-0- [&_.synthax-highlighter]:border-b-0- [&_.synthax-highlighter]:pb-8!- [&_.synthax-highlighter]:xl:min-h-[240px]- pr-0 pb-0 -bottom-2 xl:-bottom-4- "- />- </div>-)+'use client'+import { motion } from 'framer-motion'+import { useEffect, useState } from 'react'++const CODE_LINES = [+ 'jobs:',+ ' deploy:',+ ' runs-on: ubuntu-latest',+ '',+ ' steps:',+ ' - uses: actions/checkout@v4',+ ' - uses: supabase/setup-cli@v1',+ ' with:',+ ' version: latest',+ ' - run: supabase functions deploy',+]++type TokenType = 'key' | 'value' | 'punct' | 'dim' | 'plain'++interface Token {+ text: string+ type: TokenType+}++// Colors from supabase-light / supabase-dark shiki themes+const TOKEN_CLASS: Record<TokenType, string> = {+ key: '[color:#6b35dc] dark:[color:#bda4ff]',+ value: '[color:#f1a10d] dark:[color:#ffcda1]',+ punct: '[color:#a0a0a0] dark:[color:#ffffff99]',+ dim: '[color:#7e7e7e]',+ plain: '[color:#525252] dark:[color:#ffffff]',+}++function tokenizeLine(line: string): Token[] {+ if (!line.trim()) return [{ text: '\u00a0', type: 'plain' }]++ const indent = line.match(/^(\s*)/)?.[1] ?? ''+ const trimmed = line.trimStart()++ const tokens: Token[] = []+ if (indent) tokens.push({ text: indent, type: 'plain' })++ // List item: "- ..."+ if (trimmed.startsWith('- ')) {+ const rest = trimmed.slice(2)+ const ci = rest.indexOf(': ')+ tokens.push({ text: '- ', type: 'dim' })+ if (ci >= 0) {+ tokens.push({ text: rest.slice(0, ci), type: 'key' })+ tokens.push({ text: ': ', type: 'punct' })+ tokens.push({ text: rest.slice(ci + 2), type: 'value' })+ } else {+ tokens.push({ text: rest, type: 'value' })+ }+ return tokens+ }++ // "key: value"+ const ci = trimmed.indexOf(': ')+ if (ci >= 0) {+ tokens.push({ text: trimmed.slice(0, ci), type: 'key' })+ tokens.push({ text: ': ', type: 'punct' })+ tokens.push({ text: trimmed.slice(ci + 2), type: 'value' })+ return tokens+ }++ // "key:" only+ if (trimmed.endsWith(':')) {+ tokens.push({ text: trimmed.slice(0, -1), type: 'key' })+ tokens.push({ text: ':', type: 'punct' })+ return tokens+ }++ tokens.push({ text: trimmed, type: 'plain' })+ return tokens+}++const containerVariants = {+ visible: { transition: { staggerChildren: 0.08 } },+}++const lineVariants = {+ hidden: { opacity: 0, x: -8 },+ visible: { opacity: 1, x: 0, transition: { duration: 0.15, ease: 'easeOut' } },+}++export const CI = ({ isHovered = false }: { isHovered?: boolean }) => {+ const [hoverCount, setHoverCount] = useState(0)++ useEffect(() => {+ if (isHovered) setHoverCount((c) => c + 1)+ }, [isHovered])++ return (+ <div className="w-full h-full relative pl-4 xl:-mb-0 pt-4 sm:pt-4 border-b xl:border-none overflow-hidden">+ {/* CodeWindow shell */}+ <div className="relative rounded-2xl rounded-r-none rounded-b-none shadow-lg pt-0 w-full h-full bg-alternative-200 border border-r-0 border-b-0 flex flex-col">+ {/* Title bar */}+ <div className="w-full px-4 py-3 flex items-center gap-1.5 border-b">+ <div className="w-2 h-2 bg-border rounded-full" />+ <div className="w-2 h-2 bg-border rounded-full" />+ <div className="w-2 h-2 bg-border rounded-full" />+ </div>++ {/* Code area */}+ <div className="flex-1 rounded-lg rounded-r-none rounded-b-none overflow-hidden p-4 text-[13px] xl:text-sm font-mono leading-6 bg-surface-75 whitespace-pre">+ <motion.div+ key={hoverCount}+ initial="hidden"+ animate="visible"+ variants={containerVariants}+ >+ {CODE_LINES.map((line, i) => (+ <motion.div key={i} variants={lineVariants}>+ {tokenizeLine(line).map((token, j) => (+ <span key={j} className={TOKEN_CLASS[token.type]}>+ {token.text}+ </span>+ ))}+ </motion.div>+ ))}+ </motion.div>+ </div>+ </div>+ </div>+ )+}export default CIdiff --git a/apps/www/components/Products/Functions/LocalDXImage.tsx b/apps/www/components/Products/Functions/LocalDXImage.tsxindex 1951f80928f..567d3a78933 100644--- a/apps/www/components/Products/Functions/LocalDXImage.tsx+++ b/apps/www/components/Products/Functions/LocalDXImage.tsx@@ -1,46 +1,124 @@+'use client'++import { AnimatePresence, motion } from 'framer-motion'import { Check, Copy } from 'lucide-react'import Image from 'next/image'-import { useState } from 'react'+import { useEffect, useRef, useState } from 'react'import CopyToClipboard from 'react-copy-to-clipboard'-const LocalDXImage = () => {+const COMMAND = 'supabase functions serve'+const OUTPUT = 'Functions listening on 127.0.0.1:54321/functions/v1/'++const LocalDXImage = ({ isHovered = false }: { isHovered?: boolean }) => {const [copied, setCopied] = useState(false)+ const [visibleChars, setVisibleChars] = useState(COMMAND.length)+ const [showOutput, setShowOutput] = useState(false)+ const visibleCharsRef = useRef(COMMAND.length)+ const timeoutsRef = useRef<ReturnType<typeof setTimeout>[]>([])++ const clearTimeouts = () => {+ timeoutsRef.current.forEach(clearTimeout)+ timeoutsRef.current = []+ }++ const setChars = (n: number) => {+ visibleCharsRef.current = n+ setVisibleChars(n)+ }++ useEffect(() => {+ clearTimeouts()+ if (isHovered) {+ setShowOutput(false)+ setChars(0)+ COMMAND.split('').forEach((_, i) => {+ const t = setTimeout(() => setChars(i + 1), i * 40)+ timeoutsRef.current.push(t)+ })+ // Show output line shortly after typing completes+ const t = setTimeout(() => setShowOutput(true), COMMAND.length * 40 + 120)+ timeoutsRef.current.push(t)+ } else {+ setShowOutput(false)+ const current = visibleCharsRef.current+ for (let i = current; i < COMMAND.length; i++) {+ const t = setTimeout(() => setChars(i + 1), (i - current) * 18)+ timeoutsRef.current.push(t)+ }+ }+ return clearTimeouts+ }, [isHovered])const handleCopy = () => {setCopied(true)- setTimeout(() => {- setCopied(false)- }, 1000)+ setTimeout(() => setCopied(false), 1000)}return (- <div className="relative w-full h-full flex-1 flex items-center justify-center">+ <div className="relative w-full h-full flex-1 flex items-center justify-center px-4 xl:px-6"><Image- src="/images/product/functions/grid-gradient-dark.svg"+ src="/images/product/functions/lines-gradient-light.svg"alt=""fillsizes="100%"aria-hiddendraggable={false}- className="object-cover absolute z-0 inset-0 hidden dark:block"+ className="object-cover absolute z-0 inset-0 dark:hidden block"/><Image- src="/images/product/functions/grid-gradient-light.svg"+ src="/images/product/functions/lines-gradient-dark.svg"alt=""fillsizes="100%"aria-hiddendraggable={false}- className="object-cover absolute z-0 inset-0 dark:hidden block"+ className="object-cover absolute z-0 inset-0 hidden dark:block"/><CopyToClipboard text="supabase functions serve <function-name>"><buttononClick={handleCopy}- className="p-3 relative z-10 group hover:border-strong flex gap-2 xl:gap-4 items-center bg-alternative-200 rounded-xl border"+ className="p-3 relative z-10 w-full group hover:border-strong flex gap-2 items-center bg-alternative-200 rounded-xl border overflow-hidden">- <div className="text-foreground-muted text-sm font-mono">$</div>- <div className="text-foreground text-sm font-mono">supabase functions serve</div>- <div className="text-foreground rounded-sm p-1.5 ml-2 opacity-0 group-hover:opacity-100 transition-opacity">+ <div className="text-foreground-muted text-sm font-mono shrink-0">$</div>++ {/* Slot: command ↔ output, same position */}+ <div className="relative flex-1 min-w-0 text-sm font-mono h-5">+ {/* Ghost text stabilises width */}+ <span className="invisible select-none whitespace-nowrap">{COMMAND}</span>++ <AnimatePresence mode="wait" initial={false}>+ {!showOutput ? (+ <motion.span+ key="cmd"+ className="absolute inset-0 flex items-center text-foreground"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1, transition: { duration: 0.15 } }}+ exit={{ opacity: 0, transition: { duration: 0.1 } }}+ >+ {COMMAND.slice(0, visibleChars)}+ {isHovered && visibleChars < COMMAND.length && (+ <motion.span+ animate={{ opacity: [1, 0] }}+ transition={{ repeat: Infinity, duration: 0.6, ease: 'linear' }}+ className="inline-block w-[1.5px] h-[14px] bg-foreground align-middle ml-px shrink-0"+ />+ )}+ </motion.span>+ ) : (+ <motion.span+ key="output"+ className="absolute inset-0 flex items-center gap-1.5 text-foreground-muted truncate"+ initial={{ opacity: 0, y: 4 }}+ animate={{ opacity: 1, y: 0, transition: { duration: 0.2, ease: 'easeOut' } }}+ exit={{ opacity: 0, transition: { duration: 0.1 } }}+ >+ <span className="truncate">{OUTPUT}</span>+ </motion.span>+ )}+ </AnimatePresence>+ </div>++ <div className="text-foreground rounded p-1.5 ml-2 opacity-0 group-hover:opacity-100 transition-opacity shrink-0">{copied ? (<span className="text-brand"><Check className="w-3.5 h-3.5" />diff --git a/apps/www/components/Products/Functions/Metrics.tsx b/apps/www/components/Products/Functions/Metrics.tsxindex c04a7e24f53..57a8ed15cfb 100644--- a/apps/www/components/Products/Functions/Metrics.tsx+++ b/apps/www/components/Products/Functions/Metrics.tsx@@ -78,20 +78,24 @@ const Metrics = ({ isActive }: { isActive?: boolean }) => {return (<divclassName={cn(- 'absolute inset-0 bottom-4 px-4 opacity-50 transition-opacity overflow-hidden',+ 'absolute inset-0 opacity-50 transition-opacity overflow-hidden',isActive && 'opacity-100')}>- <div className="relative rounded-md w-full h-full border border-overlay shadow-sm p-4 min-w-[300px]!">- <p className="text-foreground text-sm mb-2">Execution time</p>- <p className="text-foreground text-base mb-4">- {displayValue ? data[displayValue]?.pv : highlightedValue}ms {displayValue ? '' : '(Avg)'}- </p>- <ResponsiveContainer minWidth={200} minHeight={200} width="100%" height="90%">+ <div className="relative w-full h-full py-4 !min-w-[300px]">+ <div className="px-6 mb-4">+ <p className="text-foreground text-sm mb-2">Execution time</p>+ <p className="text-foreground text-base">+ {displayValue ? data[displayValue]?.pv : highlightedValue}ms{' '}+ {displayValue ? '' : '(Avg)'}+ </p>+ </div>++ <ResponsiveContainer minWidth={200} width="100%" height="70%"><AreaChartclassName="relative z-20 text-xs"data={data}- margin={{ top: 10, right: 0, left: 0, bottom: 40 }}+ margin={{ top: 10, right: 0, left: 0, bottom: 0 }}onMouseMove={(e: any) => {if (e.activeTooltipIndex !== displayValue) {setDisplayValue(e.activeTooltipIndex)@@ -125,8 +129,9 @@ const Metrics = ({ isActive }: { isActive?: boolean }) => {/></AreaChart></ResponsiveContainer>+{data && (- <div className="absolute inset-4 top-auto text-foreground-lighter flex items-center justify-between text-xs">+ <div className="absolute bottom-4 inset-x-0 px-6 text-foreground-lighter flex items-center justify-between text-xs"><span>{dayjs(data[0].timestamp).subtract(7, 'days').format(dateFormat)}</span><span>{dayjs(data[data?.length - 1]?.timestamp).format(dateFormat)}</span></div>diff --git a/apps/www/components/Products/Functions/NpmEcosystem.tsx b/apps/www/components/Products/Functions/NpmEcosystem.tsxindex d173166e3fd..a27d1e72433 100644--- a/apps/www/components/Products/Functions/NpmEcosystem.tsx+++ b/apps/www/components/Products/Functions/NpmEcosystem.tsx@@ -1,4 +1,6 @@-import React from 'react'+'use client'++import { motion } from 'framer-motion'const npmList = ['fetch',@@ -29,11 +31,17 @@ const npmList = ['js-yaml','typescript','jest',+ 'vitest','winston',+ 'pino','debug','eslint',+ 'prettier','nodemon',+ 'tsx','dotenv',+ 'zod',+ 'valibot','@octokit/rest','cross-env','commander',@@ -42,82 +50,167 @@ const npmList = ['chalk','colors','ora',+ 'kleur',+ 'picocolors','@aws-sdk',+ '@google-cloud/storage','axios',+ 'got',+ 'ky','passport','nodemailer',+ 'resend',+ '@sendgrid/mail','@supabase/auth-helpers-react','mongoose',+ 'prisma',+ 'drizzle-orm',+ 'kysely','openai',+ '@anthropic-ai/sdk',+ 'langchain','jwt','react',+ 'solid-js',+ 'svelte','mocha','autoprefixer','@supabase/auth-ui-react','gray-matter',+ 'marked',+ 'unified',+ 'rehype',+ 'remark','request','prop-types','react-dom','bluebird',+ 'p-limit',+ 'p-queue','vue',+ 'nuxt',+ 'next','tslib',+ 'ts-node','inquirer',+ 'prompts','webpack',+ 'esbuild',+ 'rollup','classnames',+ 'clsx','body-parser','rxjs',+ 'xstate','babel-runtime','jquery',- 'fetch',- 'crypto',- 'eslint',- 'atob',- 'moment',- 'express',- 'fastify',- 'socket.io',- 'async',- 'lodash',- 'underscore',- 'ramda',- 'validator',- 'yup',- 'day.js',- 'date-fns',- 'jsonwebtoken',- 'bcrypt',- 'minimist',- 'chalk',+ 'stripe',+ '@clerk/clerk-js',+ 'posthog-js',+ 'sentry',+ 'datadog-metrics',+ 'sharp',+ 'jimp',+ 'pdf-lib',+ 'archiver',+ 'node-cron',+ 'bull',+ 'ioredis',+ 'cheerio',+ 'playwright',+ 'puppeteer',+ 'stytch',+ 'twilio',+ 'vonage',+ '@slack/web-api',+ 'discord.js',+ 'telegraf',+ 'hono',+ 'oak',+ 'itty-router',+ 'zx',+ 'execa',+ 'nanoid',+ 'ms',+ 'qs',+ 'node-fetch',+ 'undici',+ 'msw',+ 'jose',+ 'qrcode',+ 'jsdom',+ 'xlsx',+ 'csv-parse',+ 'papaparse',+ 'yaml',+ 'bullmq',+ 'lru-cache',+ 'keyv',+ 'deepmerge',+ 'immer',+ 'zustand',+ 'jotai',]-const NpmEcosystem = () => {+const center = Math.floor(npmList.length / 2)+const maxDistance = center++const NpmEcosystem = ({ isHovered = false }: { isHovered?: boolean }) => {return (- <div className="relative w-full h-full flex justify-center overflow-hidden group">- <div- className="absolute flex flex-wrap items-start gap-2 opacity-80 dark:opacity-50"- style={{ left: -50, right: -150 }}- >- {npmList.map((module, i) => (- <span- key={`${module}-${i}`}- className="py-1 px-2 rounded-md bg-surface-75 border text-foreground-muted"- >- {module}- </span>- ))}+ <div className="absolute inset-0 flex justify-center overflow-hidden">+ {/* Pills */}+ <div className="absolute flex flex-wrap items-start gap-2" style={{ left: -50, right: -150 }}>+ {npmList.map((module, i) => {+ const distance = Math.abs(i - center)+ return (+ <motion.span+ key={`${module}-${i}`}+ className="py-1 px-2 rounded-md bg-surface-75 border text-foreground-muted text-sm"+ initial={{ opacity: 0, scale: 0.95 }}+ animate={+ isHovered+ ? {+ opacity: 1,+ scale: 1,+ transition: {+ delay: distance * 0.012,+ duration: 0.2,+ ease: 'easeOut',+ },+ }+ : {+ opacity: 0,+ scale: 0.85,+ transition: {+ delay: (maxDistance - distance) * 0.008,+ duration: 0.15,+ ease: 'easeIn',+ },+ }+ }+ >+ {module}+ </motion.span>+ )+ })}</div>++ {/* Radial gradient fade */}<div- className="absolute inset-0"+ className="absolute inset-0 z-10"style={{- background: `radial-gradient(70% 50% at 50% 50%, transparent, hsl(var(--background-surface-75))`,+ background: `radial-gradient(70% 50% at 50% 50%, transparent, hsl(var(--background-surface-75)))`,}}/>- <div className="absolute z-10 inset-0 flex flex-col items-center justify-center font-bold text-7xl uppercase text-foreground-light group-hover:text-foreground transition-colors">++ {/* npm logo */}+ <div className="absolute z-20 inset-0 flex flex-col items-center justify-center"><svgwidth="111"height="42"viewBox="0 0 111 42"fill="currentColor"+ className="text-foreground-light"xmlns="http://www.w3.org/2000/svg"><path d="M36.1763 37.4452H49.2591V30.8616H62.342V4.52698H36.1763V37.4452ZM49.2591 11.1106H55.8006V24.2779H49.2591V11.1106ZM67.5752 4.52698V30.8616H80.6581V11.1106H87.1995V30.8616H93.7409V11.1106H100.282V30.8616H106.824V4.52698H67.5752ZM4.77734 30.8616H17.8602V11.1106H24.4017V30.8616H30.9431V4.52698H4.77734V30.8616Z" />diff --git a/apps/www/components/Products/Functions/ParityImage.tsx b/apps/www/components/Products/Functions/ParityImage.tsxindex d155fc9473c..913dc8ed8aa 100644--- a/apps/www/components/Products/Functions/ParityImage.tsx+++ b/apps/www/components/Products/Functions/ParityImage.tsx@@ -1,7 +1,57 @@+'use client'++import { motion } from 'framer-motion'import Image from 'next/image'-import React from 'react'+import { cn } from 'ui'++const SYNC_WIDTH = 48++function SyncLines({ isHovered }: { isHovered: boolean }) {+ const shimmerTransition = (delay: number) =>+ isHovered+ ? { duration: 0.7, repeat: Infinity, ease: 'linear' as const, repeatDelay: 1.8, delay }+ : { duration: 0.4, ease: 'easeOut' as const }-const ParityImage = () => (+ const tipMask = 'linear-gradient(to right, transparent, black 28%, black 72%, transparent)'++ return (+ <div+ className="flex flex-col gap-1.5 items-center justify-center"+ style={{ width: SYNC_WIDTH, transform: 'skewX(-12deg)' }}+ >+ {/* → green shimmer */}+ <div+ className="relative w-full h-px bg-border overflow-hidden"+ style={{ maskImage: tipMask, WebkitMaskImage: tipMask }}+ >+ <motion.div+ className="absolute inset-0"+ style={{+ background: 'linear-gradient(to right, transparent 0%, #3ecf8e 50%, transparent 100%)',+ }}+ animate={isHovered ? { x: ['-100%', '100%'] } : { x: '-100%' }}+ transition={shimmerTransition(0)}+ />+ </div>+ {/* ← purple shimmer */}+ <div+ className="relative w-full h-px bg-border overflow-hidden"+ style={{ maskImage: tipMask, WebkitMaskImage: tipMask }}+ >+ <motion.div+ className="absolute inset-0"+ style={{+ background: 'linear-gradient(to left, transparent 0%, #bda4ff 50%, transparent 100%)',+ }}+ animate={isHovered ? { x: ['100%', '-100%'] } : { x: '100%' }}+ transition={shimmerTransition(1.0)}+ />+ </div>+ </div>+ )+}++const ParityImage = ({ isHovered = false }: { isHovered?: boolean }) => (<div className="relative w-full h-full flex items-center justify-center text-sm"><Imagesrc="/images/product/functions/lines-gradient-light.svg"@@ -21,22 +71,67 @@ const ParityImage = () => (draggable={false}className="object-cover absolute z-0 inset-0 hidden dark:block"/>- <div className="relative z-10 p-4 font-mono bg-surface-200 border-2 border-dashed rounded-2xl justify-center items-center gap-1 flex">- <div className="py-2 px-4 bg-alternative-200 rounded-lg shadow-sm border flex-col justify-center items-center">- <div className="text-foreground uppercase tracking-wide">Dev</div>- </div>- <svg width="32" height="7" viewBox="0 0 32 7" fill="none" xmlns="http://www.w3.org/2000/svg">- <path- d="M27 5.74425C27 6.0204 27.3382 6.21566 27.5774 6.07759L31.4226 3.8575C31.6618 3.71943 31.6618 3.32891 31.4226 3.19084L27.5774 0.970752C27.3382 0.832681 27 1.02794 27 1.30409V5.74425ZM5 1.30409C5 1.02794 4.6618 0.832681 4.42265 0.970752L0.57735 3.19084C0.338204 3.32891 0.338204 3.71943 0.57735 3.8575L4.42265 6.07759C4.6618 6.21566 5 6.0204 5 5.74425V1.30409ZM27.5 3.02417H4.5V4.02417H27.5V3.02417Z"- fill="currentColor"- />- <path- d="M5 1.30409C5 1.02794 4.6618 0.832681 4.42265 0.970752L0.57735 3.19084C0.338204 3.32891 0.338204 3.71943 0.57735 3.8575L4.42265 6.07759C4.6618 6.21566 5 6.0204 5 5.74425V1.30409ZM27 5.74425C27 6.0204 27.3382 6.21566 27.5774 6.07759L31.4226 3.8575C31.6618 3.71943 31.6618 3.32891 31.4226 3.19084L27.5774 0.970752C27.3382 0.832681 27 1.02794 27 1.30409V5.74425ZM4.5 4.02417H27.5V3.02417H4.5V4.02417Z"- fill="currentColor"+ <div className="relative z-10 p-4 font-mono bg-surface-200 rounded-2xl justify-center items-center gap-3 flex">+ {/* Animated dashed border */}+ <svg+ className={cn(+ 'absolute inset-0 w-full h-full pointer-events-none overflow-visible transition-colors duration-200 text-border'+ )}+ >+ <motion.rect+ x="0"+ y="0"+ width="100%"+ height="100%"+ rx="16"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ strokeDasharray="6 4"+ animate={{ strokeDashoffset: isHovered ? [0, -10] : 0 }}+ transition={+ isHovered+ ? { duration: 0.4, repeat: Infinity, ease: 'linear' }+ : { duration: 0.4, ease: 'easeOut' }+ }/></svg>- <div className="py-2 px-4 bg-alternative-200 rounded-lg shadow-sm border flex-col justify-center items-center">+ {/* Dev badge — green border + shadow on hover */}+ <div+ className="py-2 px-4 bg-alternative-200 rounded-lg flex-col justify-center items-center transition-all duration-300"+ style={+ isHovered+ ? {+ border: '1px solid #3ecf8e',+ boxShadow: '0 0 12px 0 #3ecf8e40',+ }+ : {+ border: '1px solid hsl(var(--border-default))',+ boxShadow: 'none',+ }+ }+ >+ <div className="text-foreground uppercase tracking-wide">Dev</div>+ </div>++ <SyncLines isHovered={isHovered} />++ {/* Prod badge — purple border + shadow on hover */}+ <div+ className="py-2 px-4 bg-alternative-200 rounded-lg flex-col justify-center items-center transition-all duration-300"+ style={+ isHovered+ ? {+ border: '1px solid #bda4ff',+ boxShadow: '0 0 12px 0 #bda4ff40',+ }+ : {+ border: '1px solid hsl(var(--border-default))',+ boxShadow: 'none',+ }+ }+ ><div className="text-foreground uppercase tracking-wide">Prod</div></div></div>diff --git a/apps/www/components/Products/Functions/QueryLogs.tsx b/apps/www/components/Products/Functions/QueryLogs.tsxindex e5dae8bd884..b2e29407dfb 100644--- a/apps/www/components/Products/Functions/QueryLogs.tsx+++ b/apps/www/components/Products/Functions/QueryLogs.tsx@@ -55,6 +55,7 @@ const QueryLogs = ({ isActive, isInView }: { isActive?: boolean; isInView?: boolconst isPlaying = isActive && isInViewconst INTERVAL = 550 // in milliseconds+ const MAX_LOGS = 120const logs = [createLog(),@@ -72,10 +73,9 @@ const QueryLogs = ({ isActive, isInView }: { isActive?: boolean; isInView?: boolconst [activeLogs, setActiveLogs] = useState(logs)function createLog(offset?: number) {- const t = new Date()- t.setSeconds(t.getSeconds() - (offset ?? 0))+ const t = new Date(Date.now() - (offset ?? 0))const randomStatus = Math.random()- const s = randomStatus > 0.99 ? STATUS.ERROR : randomStatus > 0.5 ? STATUS.INFO : STATUS.LOG+ const s = randomStatus > 0.92 ? STATUS.ERROR : randomStatus > 0.5 ? STATUS.INFO : STATUS.LOGconst randomMessage = messages[s][getRandomNumber(0, messages[s].length - 1)]@@ -87,13 +87,20 @@ const QueryLogs = ({ isActive, isInView }: { isActive?: boolean; isInView?: bool}}+ useEffect(() => {+ if (isPlaying) {+ const newLog = createLog()+ setActiveLogs((prev) => [newLog, ...prev].slice(0, MAX_LOGS))+ }+ }, [isPlaying])+useInterval(() => {const skip = Math.random() > 0.6if (skip) returnconst newLog = createLog()- setActiveLogs([newLog, ...activeLogs])+ setActiveLogs((prev) => [newLog, ...prev].slice(0, MAX_LOGS))},isPlaying ? INTERVAL : null)@@ -105,9 +112,22 @@ const QueryLogs = ({ isActive, isInView }: { isActive?: boolean; isInView?: boolif (!mounted) return nullreturn (- <div className="absolute inset-0 bottom-8 overflow-hidden">+ <div className="absolute inset-0 overflow-hidden">+ <div+ className={cn(+ 'absolute z-20 pointer-events-none inset-0 bottom-auto h-32 transition-opacity duration-300',+ isPlaying ? 'opacity-100' : 'opacity-0'+ )}+ style={{+ background:+ 'linear-gradient(to bottom, hsl(var(--background-surface-75)) 0%, transparent 100%)',+ }}+ /><div- className="absolute z-20 pointer-events-none inset-0 top-auto h-32"+ className={cn(+ 'absolute z-20 pointer-events-none inset-0 top-auto h-32 transition-opacity duration-300',+ isPlaying ? 'opacity-100' : 'opacity-0'+ )}style={{background:'linear-gradient(to top, hsl(var(--background-surface-75)) 0%, transparent 100%)',@@ -120,7 +140,7 @@ const QueryLogs = ({ isActive, isInView }: { isActive?: boolean; isInView?: boolduration: 0.1,staggerChildren: 0.1,}}- className="relative z-10 w-full h-auto flex flex-col px-4 overflow-y-auto"+ className="relative z-10 w-full h-auto flex flex-col overflow-y-auto"><AnimatePresence>{activeLogs.map((log, i) => (@@ -133,13 +153,17 @@ const QueryLogs = ({ isActive, isInView }: { isActive?: boolean; isInView?: booly: 0,transition: { delay: 0.2 + i * 0.03, duration: 0.15 },}}- className="py-2 md:px-4 pointer-events-auto border-b hover:bg-selection/20 first:border-t w-full font-mono text-xs flex gap-4 lg:gap-5 items-center"+ className="h-9 px-4 md:px-6 pointer-events-auto border-b hover:bg-selection/20 w-full font-mono text-xs flex gap-4 lg:gap-5 items-center"><span className="shrink-0">{dayjs(log.timestamp).format('D MMM HH:mm:ss')}</span><spanclassName={cn('w-[50px] flex items-center gap-1',- log.status === 'ERROR' ? 'text-red-900!' : 'text-blue-900!'+ log.status === 'ERROR'+ ? 'text-destructive'+ : log.status === 'INFO'+ ? 'text-foreground-muted'+ : 'text-blue-900')}><span>diff --git a/apps/www/components/Products/Functions/RealtimeLogs.tsx b/apps/www/components/Products/Functions/RealtimeLogs.tsxindex 8edd8e3758d..9a14350070e 100644--- a/apps/www/components/Products/Functions/RealtimeLogs.tsx+++ b/apps/www/components/Products/Functions/RealtimeLogs.tsx@@ -15,6 +15,7 @@ const RealtimeLogs: FC<Props> = ({ isActive, isInView, className }) => {const isPlaying = isActive && isInViewconst INTERVAL = 550 // in milliseconds+ const MAX_LOGS = 120const logs = [createLog(),@@ -32,24 +33,34 @@ const RealtimeLogs: FC<Props> = ({ isActive, isInView, className }) => {const [activeLogs, setActiveLogs] = useState(logs)function createLog(offset?: number) {- const t = new Date()- t.setSeconds(t.getSeconds() - (offset ?? 0))+ const t = new Date(Date.now() - (offset ?? 0))++ const rand = Math.random()+ const status =+ rand > 0.92 ? 500 : rand > 0.85 ? 404 : rand > 0.8 ? 301 : rand > 0.75 ? 201 : 200return {- status: Math.random() > 0.995 ? 500 : 200,+ status,method: Math.random() > 0.5 ? 'GET' : 'POST',id: crypto.randomUUID(),timestamp: t,}}+ useEffect(() => {+ if (isPlaying) {+ const newLog = createLog()+ setActiveLogs((prev) => [newLog, ...prev].slice(0, MAX_LOGS))+ }+ }, [isPlaying])+useInterval(() => {const skip = Math.random() > 0.6if (skip) returnconst newLog = createLog()- setActiveLogs([newLog, ...activeLogs])+ setActiveLogs((prev) => [newLog, ...prev].slice(0, MAX_LOGS))},isPlaying ? INTERVAL : null)@@ -61,8 +72,19 @@ const RealtimeLogs: FC<Props> = ({ isActive, isInView, className }) => {if (!mounted) return nullreturn (- <div className={cn('absolute inset-0 bottom-8 overflow-hidden', className)}>- <div className="visual-overlay absolute z-20 pointer-events-none inset-0 top-auto h-32 bg-[linear-gradient(to_top,hsl(var(--background-surface-75))_0%,transparent_100%)]" />+ <div className={cn('absolute inset-0 overflow-hidden', className)}>+ <div+ className={cn(+ 'visual-overlay absolute z-20 pointer-events-none inset-0 bottom-auto h-32 bg-[linear-gradient(to_bottom,hsl(var(--background-surface-75))_0%,transparent_100%)] transition-opacity duration-300',+ isPlaying ? 'opacity-100' : 'opacity-0'+ )}+ />+ <div+ className={cn(+ 'visual-overlay absolute z-20 pointer-events-none inset-0 top-auto h-32 bg-[linear-gradient(to_top,hsl(var(--background-surface-75))_0%,transparent_100%)] transition-opacity duration-300',+ isPlaying ? 'opacity-100' : 'opacity-0'+ )}+ /><motion.ullayouttransition={{@@ -70,7 +92,7 @@ const RealtimeLogs: FC<Props> = ({ isActive, isInView, className }) => {duration: 0.1,staggerChildren: 0.2,}}- className="relative z-10 w-full h-auto flex flex-col px-4 overflow-y-auto"+ className="relative z-10 w-full h-auto flex flex-col overflow-y-auto"><AnimatePresence>{activeLogs.map((log, i) => (@@ -83,13 +105,30 @@ const RealtimeLogs: FC<Props> = ({ isActive, isInView, className }) => {y: 0,transition: { delay: 0.2 + i * 0.03, duration: 0.15 },}}- className="py-2 md:px-4 pointer-events-auto border-b hover:bg-selection/20 first:border-t w-full font-mono text-xs flex gap-4 items-center"+ className="h-9 px-4 md:px-6 pointer-events-auto border-b hover:bg-selection/20 w-full font-mono text-xs flex gap-4 items-center"><span className="shrink-0">{dayjs(log.timestamp).format('D MMM HH:mm:ss')}</span>- <span className="">- <Badge variant={log.status === 200 ? 'default' : 'warning'}>{log.status}</Badge>+ <span className="shrink-0">+ <Badge+ variant={+ log.status >= 500+ ? 'destructive'+ : log.status >= 400+ ? 'warning'+ : log.status >= 300+ ? 'default'+ : 'default'+ }+ className={+ log.status >= 300 && log.status < 400+ ? 'bg-blue-200/10 text-blue-900 border-blue-500'+ : undefined+ }+ >+ {log.status}+ </Badge></span>- <span className="w-10 truncate">{log.method}</span>+ <span className="w-12 shrink-0">{log.method}</span><span className="truncate">{log.id}</span></motion.li>))}diff --git a/apps/www/components/Products/ProductsNav.tsx b/apps/www/components/Products/ProductsNav.tsxindex ae533e46bf2..bcc4475cb70 100644--- a/apps/www/components/Products/ProductsNav.tsx+++ b/apps/www/components/Products/ProductsNav.tsx@@ -10,7 +10,7 @@ interface Props {function ProductsNav({ activePage }: Props) {return (- <nav className="relative z-30 hidden md:flex items-center bg-background w-full border-b">+ <nav className="relative z-30 flex items-center bg-background w-full border-b"><SectionContainer className="w-full py-0! flex gap-3 items-center">{Object.entries(products).map((obj: any) => {const product = obj[1]@@ -40,7 +40,9 @@ function ProductsNav({ activePage }: Props) {stroke="currentColor"/></svg>- <p>{isAuth ? 'Auth' : product.name}</p>+ <p className={product.name !== activePage ? 'hidden md:block' : ''}>+ {isAuth ? 'Auth' : product.name}+ </p></Link>)})}diff --git a/apps/www/data/Examples.ts b/apps/www/data/Examples.tsindex 7fda8a4dc10..49e429e18c4 100644--- a/apps/www/data/Examples.ts+++ b/apps/www/data/Examples.ts@@ -261,14 +261,6 @@ const Examples: Example[] = [description: 'Using OpenAI in Edge Functions.',repo_url: 'https://supabase.com/docs/guides/ai/examples/openai',},- // {- // type: 'example',- // tags: ['Supabase'],- // products: [PRODUCT_NAMES.FUNCTIONS],- // title: 'With supabase-js',- // description: 'Use the Supabase client inside your Edge Function.',- // repo_url: 'https://supabase.com/docs/guides/functions/auth',- // },{type: 'example',tags: ['Stripe'],diff --git a/apps/www/package.json b/apps/www/package.jsonindex 98e997a803f..73c53727667 100644--- a/apps/www/package.json+++ b/apps/www/package.json@@ -70,6 +70,7 @@"next-seo": "^6.5.0","next-themes": "catalog:","nuqs": "^2.8.1",+ "ogl": "^1.0.11","openai": "^4.75.1","parse-numeric-range": "^1.3.0","radix-ui": "catalog:",@@ -86,6 +87,7 @@"remark": "^15.0.1","remark-gfm": "^4.0.1","shared-data": "workspace:*",+ "shiki": "^4.2.0","swiper": "^12.1.2","typed.js": "^2.0.16","typescript": "catalog:",diff --git a/apps/www/pages/auth.tsx b/apps/www/pages/auth.tsxdeleted file mode 100644index 0d5edcbdaa4..00000000000--- a/apps/www/pages/auth.tsx+++ /dev/null@@ -1,289 +0,0 @@-import { useBreakpoint } from 'common'-import { ArrowUpRight, Briefcase, Eye, Link as IconLink, Shield } from 'lucide-react'-import { NextSeo } from 'next-seo'-import dynamic from 'next/dynamic'-import Head from 'next/head'-import NextImage from 'next/image'-import Link from 'next/link'-import { useRouter } from 'next/router'-import { PRODUCT_NAMES } from 'shared-data/products'-import { Button } from 'ui'-import { Image } from 'ui-patterns/Image'--import EventCallout from '@/components/EventCallout'-import DefaultLayout from '@/components/Layouts/Default'-import SectionContainer from '@/components/Layouts/SectionContainer'-import ProductsNav from '@/components/Products/ProductsNav'-import ProductHeader from '@/components/Sections/ProductHeader'-import AuthProviders from '@/data/auth.json'-import MainProducts from '@/data/MainProducts'-import ApiExamples from '@/data/products/auth/auth-api-examples'-import AuthSqlRulesExamples from '@/data/products/auth/auth-sql-rules-examples'-import { breadcrumbs } from '@/lib/breadcrumbs'-import { breadcrumbListSchema, serializeJsonLd, softwareApplicationSchema } from '@/lib/json-ld'--const SplitCodeBlockCarousel = dynamic(- () => import('~/components/Carousels/SplitCodeBlockCarousel')-)-const SingleQuote = dynamic(() => import('~/components/Sections/SingleQuote'))-const CTABanner = dynamic(() => import('~/components/CTABanner'))-const FeatureColumn = dynamic(() => import('~/components/FeatureColumn'))-const APISection = dynamic(() => import('~/components/Sections/APISection'))-const GithubExamples = dynamic(() => import('~/components/Sections/GithubExamples'))--// When updating page content, also update public/llms/auth.txt--function AuthPage() {- const isMobile = useBreakpoint(768)- const { basePath } = useRouter()-- const meta_title = 'Auth | Built-in user management'- const meta_description =- 'Authentication that you can afford that is built in to your supabase project.'-- return (- <>- <NextSeo- title={meta_title}- description={meta_description}- openGraph={{- title: meta_title,- description: meta_description,- url: `https://supabase.com/auth`,- images: [- {- url: `https://supabase.com${basePath}/images/product/auth/auth-og.jpg`,- },- ],- }}- />- <Head>- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(- softwareApplicationSchema({- name: 'Supabase Auth',- description: meta_description,- url: 'https://supabase.com/auth',- image: `https://supabase.com${basePath}/images/product/auth/auth-og.jpg`,- })- ),- }}- />- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(breadcrumbListSchema(breadcrumbs.auth)),- }}- />- </Head>- <DefaultLayout>- <ProductsNav activePage={PRODUCT_NAMES.AUTHENTICATION} />- <ProductHeader- callout={- <EventCallout- size={isMobile ? 'tiny' : 'small'}- className="mb-4 lg:mb-8 -mt-8 lg:-mt-10"- />- }- icon={MainProducts['authentication'].icon}- title={MainProducts['authentication'].name}- h1={[- <span key={'authentication-h1'}>- Open Source Auth- <br /> (with tons of integrations)- </span>,- ]}- subheader={[- 'Every Supabase project comes with a complete User Management system that works without any additional tools.',- "Including PostgreSQL's policy engine, for fine-grained access rules.",- ]}- image={[- <Image- src={{- light: `${basePath}/images/product/auth/header--light.png`,- dark: `${basePath}/images/product/auth/header--dark.png`,- }}- alt="auth header"- layout="responsive"- width="1372"- height="1074"- />,- ]}- documentation_url={'/docs/guides/auth'}- />-- <SectionContainer>- <div className="grid grid-cols-12">- <div className="col-span-12 mb-10 lg:col-span-3 lg:mb-0">- <div className="mb-4 mt-[-1.9rem]">- <div className="grid grid-flow-col grid-rows-2 gap-2 xl:w-64">- <div className="flex w-fit items-center">- <svg- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 32.58 31.77"- width={21}- height={21}- className="text-foreground-light"- >- <path- fill="currentColor"- d="M16.29,0a16.29,16.29,0,0,0-5.15,31.75c.82.15,1.11-.36,1.11-.79s0-1.41,0-2.77C7.7,29.18,6.74,26,6.74,26a4.36,4.36,0,0,0-1.81-2.39c-1.47-1,.12-1,.12-1a3.43,3.43,0,0,1,2.49,1.68,3.48,3.48,0,0,0,4.74,1.36,3.46,3.46,0,0,1,1-2.18c-3.62-.41-7.42-1.81-7.42-8a6.3,6.3,0,0,1,1.67-4.37,5.94,5.94,0,0,1,.16-4.31s1.37-.44,4.48,1.67a15.41,15.41,0,0,1,8.16,0c3.11-2.11,4.47-1.67,4.47-1.67A5.91,5.91,0,0,1,25,11.07a6.3,6.3,0,0,1,1.67,4.37c0,6.26-3.81,7.63-7.44,8a3.85,3.85,0,0,1,1.11,3c0,2.18,0,3.94,0,4.47s.29.94,1.12.78A16.29,16.29,0,0,0,16.29,0Z"- />- </svg>- </div>- {AuthProviders.map((auth, i) => {- return (- <div className="flex w-fit items-center text-foreground-light" key={i}>- <NextImage- src={`${basePath}/images/product/auth/${auth.name}-icon.svg`}- alt={`${auth.name} auth login icon`}- key={auth.name}- height={21}- width={21}- />- </div>- )- })}- </div>- </div>- <h4 className="h4">All the social providers</h4>- <p className="p text-base">- Enable social logins with the click of a button. Google, Facebook, GitHub, Azure- (Microsoft), Gitlab, Twitter, Discord, and many more.- </p>- </div>- <div className="col-span-12 mb-10 lg:col-span-3 lg:col-start-5 lg:mb-0">- <div className="p mb-4">- <IconLink />- </div>- <h4 className="h4">Fully integrated</h4>- <p className="p text-base">- Incredibly simple Auth, without a single external authentication service. Built-in- Authentication, Authorization, and User Management.- </p>- </div>- <div className="col-span-12 lg:col-span-3 lg:col-start-9">- <div className="p mb-4">- <Shield />- </div>- <h4 className="h4">Own your data</h4>- <p className="p text-base">- User data stored in your Supabase database so you never have to worry about 3rd- party privacy issues. Host your data in 16 different locations.- </p>- </div>- </div>- </SectionContainer>-- <SingleQuote- id="quote"- className="[&_q]:max-w-2xl"- quote={{- text: 'Supabase is not only super easy to get started, but also provides all the backend solutions we require as we continue to grow.',- author: 'Alfred Lua',- role: 'Cofounder of Pebblely',- link: '/customers/pebblely',- logo: (- <NextImage- draggable={false}- src="/images/blog/avatars/alfred-lua-pebblely.jpeg"- alt="Alfred Lua, Cofounder of Pebblely"- className="w-10 h-10 rounded-full overflow-hidden object-cover"- width={28}- height={28}- />- ),- }}- />-- <SectionContainer>- <APISection- title="Simple APIs"- // @ts-ignore- content={ApiExamples}- size="large"- text={[- <p key={0} className="text-base lg:text-lg">- APIs that you can understand. With powerful libraries that work on client and- server-side applications.- </p>,- ]}- footer={[- <div className="mt-8 grid grid-cols-12 md:gap-8 lg:gap-0 xl:gap-16" key={0}>- <div className="col-span-12 sm:col-span-6 lg:col-span-12 xl:col-span-4">- <FeatureColumn- icon={<Briefcase />}- title="Enterprise logins"- text="Support for SAML, Azure. More enterprise providers and SSO coming soon."- />- </div>- <div className="col-span-12 sm:col-span-6 lg:col-span-12 xl:col-span-4">- <FeatureColumn- icon={<Eye />}- title="Social login scopes"- text="Request additional user data permissions when using social logins."- />- </div>- </div>,- ]}- documentation_link={'/docs/guides/auth'}- />- </SectionContainer>-- <div className="relative">- <div className="section--masked">- <div className="section--bg-masked">- <div className="section--bg border-t border-b border-control"></div>- </div>- <div className="relative pt-12 pb-0">- <div className="overflow-x-hidden">- <SectionContainer className="mb-0 pb-8">- <GithubExamples />- </SectionContainer>- </div>- </div>- </div>- </div>-- <SectionContainer>- <div className="grid grid-cols-12 lg:mt-16 lg:gap-16">- <div className="col-span-12 mb-8 lg:col-span-5">- <h2 className="h3">User permissions without the middleware</h2>-- <p className="p text-base lg:text-lg">- Supabase Auth works without any additional servers. Build Authorization rules with- Postgres' Row Level Security, controlling who can create, edit and delete specific- rows in your database.- </p>- <p className="p">Policies can be written in SQL or using the dashboard online.</p>-- <Button- asChild- size="small"- variant="default"- className="mt-4"- icon={<ArrowUpRight />}- >- <Link href="/docs/guides/database/postgres/row-level-security">- Explore documentation- </Link>- </Button>- </div>- <div className="col-span-12 lg:col-span-6 lg:col-start-7">- <SplitCodeBlockCarousel- // @ts-ignore- content={AuthSqlRulesExamples}- />- </div>- </div>- </SectionContainer>-- <CTABanner />- </DefaultLayout>- </>- )-}--export default AuthPagediff --git a/apps/www/pages/database.tsx b/apps/www/pages/database.tsxdeleted file mode 100644index d2139076bf3..00000000000--- a/apps/www/pages/database.tsx+++ /dev/null@@ -1,410 +0,0 @@-// Import Swiper styles-import 'swiper/css'--import { ArrowUpRight, X } from 'lucide-react'-import { NextSeo } from 'next-seo'-import dynamic from 'next/dynamic'-import Head from 'next/head'-import NextImage from 'next/image'-import Link from 'next/link'-import { useRouter } from 'next/router'-import { useState } from 'react'-import { PRODUCT_NAMES } from 'shared-data/products'-import { Swiper, SwiperSlide } from 'swiper/react'-import { Badge, Button, Tabs } from 'ui'-import { Image } from 'ui-patterns/Image'-import { TweetCard } from 'ui-patterns/TweetCard'--import ProductsNav from '@/components/Products/ProductsNav'-import ProductHeader from '@/components/Sections/ProductHeader'-import MainProducts from '@/data/MainProducts'-import ApiExamplesData from '@/data/products/database/api-examples'-import ExtensionsExamplesData from '@/data/products/database/extensions-examples'-import HighlightsCards from '@/data/products/database/highlight-cards'-import { PipelinesVisual } from '@/data/products/database/pipelines-visual'-import SqlViewCarouselData from '@/data/products/database/sql-view-carousel.json'-import TableViewCarouselData from '@/data/products/database/table-view-carousel.json'-import { breadcrumbs } from '@/lib/breadcrumbs'-import { breadcrumbListSchema, serializeJsonLd, softwareApplicationSchema } from '@/lib/json-ld'--const NewFeatureCard = dynamic(() => import('~/components/NewFeatureCard'))-const ImageCarousel = dynamic(() => import('~/components/Carousels/ImageCarousel'))-const SplitCodeBlockCarousel = dynamic(- () => import('~/components/Carousels/SplitCodeBlockCarousel')-)-const FeatureColumn = dynamic(() => import('~/components/FeatureColumn'))-const SingleQuote = dynamic(() => import('~/components/Sections/SingleQuote'))-const DefaultLayout = dynamic(() => import('~/components/Layouts/Default'))-const SectionContainer = dynamic(() => import('~/components/Layouts/SectionContainer'))-const ProductIcon = dynamic(() => import('~/components/ProductIcon'))-const APISection = dynamic(() => import('~/components/Sections/APISection'))-const GithubExamples = dynamic(() => import('~/components/Sections/GithubExamples'))--// When updating page content, also update public/llms/database.txt--function Database() {- // base path for images- const { basePath } = useRouter()-- const [dashboardSwiper, setDashboardSwiper] = useState(undefined)- const [dashboardSwiperActiveIndex, setDashboardSwiperActiveIndex] = useState(0)-- function handleDashboardSwiperNav(e: number) {- setDashboardSwiperActiveIndex(e)- // @ts-ignore- dashboardSwiper.slideTo(e)- }-- const meta_title = 'Database | Open source SQL Database'- const meta_description =- 'With supabase’s APIs and easy to use dashboard, it makes designing relational databases easy.'-- return (- <>- <NextSeo- title={meta_title}- description={meta_description}- openGraph={{- title: meta_title,- description: meta_description,- url: `https://supabase.com/database`,- images: [- {- url: `https://supabase.com${basePath}/images/product/database/database-og.jpg`,- },- ],- }}- />- <Head>- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(- softwareApplicationSchema({- name: 'Supabase Database',- description: meta_description,- url: 'https://supabase.com/database',- image: `https://supabase.com${basePath}/images/product/database/database-og.jpg`,- })- ),- }}- />- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(breadcrumbListSchema(breadcrumbs.database)),- }}- />- </Head>- <DefaultLayout>- <ProductsNav activePage={PRODUCT_NAMES.DATABASE} />- <ProductHeader- icon={MainProducts['database'].icon}- title={MainProducts['database'].name}- h1={[- <span key={'database-h1'}>- It’s just Postgres- <br /> (without the hassle)- </span>,- ]}- subheader={[- 'Every Supabase project is a dedicated Postgres database, trusted by millions of developers.',- "Postgres is one of the world's most scalable databases.",- ]}- image={[- <Image- src={{- dark: `${basePath}/images/product/database/header--dark-2.png`,- light: `${basePath}/images/product/database/header--light-2.png`,- }}- alt="database header"- layout="responsive"- width="1680"- height="1116"- />,- ]}- documentation_url={'/docs/guides/database'}- />-- <SectionContainer>- <div className="grid grid-cols-12">- <div className="col-span-12 mb-10 lg:col-span-3 lg:mb-0">- <div className="p mb-4 flex items-center space-x-2">- <ProductIcon icon={MainProducts['database'].icon} />- <X />- <div className="flex w-fit items-center">- <NextImage- src={`${basePath}/images/product/database/postgresql-icon.svg`}- width={30}- height={30}- alt="Postgres icon"- />- </div>- </div>- <h4 className="h4">Just Postgres</h4>- <p className="p">Every Supabase project is a dedicated Postgres database.</p>- <p className="p text-sm">- 100% portable. Bring your existing Postgres database, or migrate away at any time.- </p>- </div>- <div className="col-span-12 mb-10 lg:col-span-3 lg:col-start-5 lg:mb-0">- <div className="p mb-4 flex items-center space-x-2">- <ProductIcon icon={MainProducts['database'].icon} />- <X />- <ProductIcon icon={MainProducts['authentication'].icon} />- </div>-- <h4 className="h4">Secure by default</h4>- <p className="p">Leveraging Postgres's proven Row Level Security.</p>- <p className="p text-sm">- Integrated with JWT authentication which controls exactly what your users can- access.- </p>- </div>- <div className="col-span-12 lg:col-span-3 lg:col-start-9">- <div className="p mb-4 flex items-center space-x-2">- <ProductIcon icon={MainProducts['database'].icon} />- <X />- <ProductIcon icon={'M13 10V3L4 14h7v7l9-11h-7z'} />- </div>-- <h4 className="h4">Realtime enabled</h4>- <p className="p">Data-change listeners over websockets.</p>- <p className="p text-sm">- Subscribe and react to database changes, milliseconds after they happen.- </p>- </div>- </div>- </SectionContainer>-- <SingleQuote- id="quote"- quote={{- text: 'You can have a really great product, but you need to want to work with the people behind it. With Supabase, we always felt very aligned.',- author: 'Howard Haynes',- role: 'CPO at Next Door Lending',- link: '/customers/next-door-lending',- logo: (- <NextImage- draggable={false}- src="/images/blog/avatars/howard-haynes.webp"- alt="Howard Haynes, CPO at Next Door Lending"- className="w-10 h-10 rounded-full overflow-hidden object-cover"- width={28}- height={28}- />- ),- }}- />-- <SectionContainer className="grid lg:grid-cols-2 gap-2 lg:gap-4">- <NewFeatureCard {...HighlightsCards.branching} />- <NewFeatureCard {...HighlightsCards.readReplicas} />- </SectionContainer>-- {/* <SectionContainer>÷ */}- <SectionContainer className="text-center md:pb-0 lg:pb-0">- <div className="grid grid-cols-12">- <div className="col-span-12 lg:col-span-8 lg:col-start-3">- <h2 className="h3">Easy to use dashboard</h2>-- <p className="p">- The simplicity of a Table Editor, or the power of a SQL editor. Your choice.- </p>- </div>- </div>- </SectionContainer>- <div className="grid">- <div className={'dashboard-tabs sbui-tabs--underline-alt'}>- <Tabs- size="xlarge"- activeId={dashboardSwiperActiveIndex.toString()}- onChange={(e: string) => handleDashboardSwiperNav(Number(e))}- type="underlined"- tabBarStyle={{- marginBottom: 0,- // borderBottom: '1px solid #dedede',- }}- // block- >- <Tabs.Panel id="0" label="Table editor">- <span></span>- </Tabs.Panel>- <Tabs.Panel id="1" label="SQL editor">- <span></span>- </Tabs.Panel>- </Tabs>- </div>- </div>-- <Swiper- // @ts-ignore- onSwiper={setDashboardSwiper}- style={{ overflow: 'hidden' }}- initialSlide={0}- spaceBetween={0}- slidesPerView={1}- speed={300}- allowTouchMove={false}- >- <div className="grid grid-cols-12">- <SwiperSlide key={0}>- <SectionContainer className="pt-16 pb-0">- <ImageCarousel- content={TableViewCarouselData}- footer={[- <TweetCard- handle="@Elsolo244"- key="@Elsolo244"- img_url={`${basePath}/images/twitter-profiles/v6citnk33y2wpeyzrq05_400x400.jpeg`}- quote="Where has @supabase been all my life? 😍"- />,- ]}- />- </SectionContainer>- </SwiperSlide>- <SwiperSlide key={1}>- <SectionContainer className="pt-16 pb-0">- <ImageCarousel- content={SqlViewCarouselData}- footer={[- <TweetCard- handle="@jim_bisenius"- key="@jim_bisenius"- img_url={`${basePath}/images/twitter-profiles/rLgwUZSB_400x400.jpg`}- quote="@MongoDB or @MySQL?!?! Please, let me introduce you to @supabase and the wonderful world of @Postgres before it's too late!!"- />,- ]}- />- </SectionContainer>- </SwiperSlide>- </div>- </Swiper>-- <SectionContainer>- <div className="grid grid-cols-12 lg:gap-16">- <div className="col-span-12 mb-8 lg:col-span-6 xl:col-span-5">- <h2 className="h2">Supabase Pipelines</h2>- <p className="p text-lg">Stream your Postgres data to external systems.</p>- <p className="p">- Automatically replicate your database changes to external data warehouses and- analytics platforms in near real time with managed replication pipelines.- </p>-- <div className="my-8">- <FeatureColumn- title="Offload analytics"- text="Keep Postgres focused on transactional workloads."- />- <FeatureColumn- title="Point and stream setup"- text="Configure in the Supabase Dashboard."- />- <FeatureColumn title="Open table formats" text="For long term flexibility." />- </div>-- <div className="mt-4 flex gap-2">- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/docs/guides/database/replication">Read the docs</Link>- </Button>- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/blog/introducing-supabase-pipelines">Read the blog post</Link>- </Button>- </div>- </div>- <div className="col-span-12 lg:col-span-6 lg:col-start-7">- {/* TODO: Add Pipelines illustration */}- <PipelinesVisual className="w-full" />- </div>- </div>- </SectionContainer>-- <SectionContainer className="-mb-48">- <APISection- // @ts-ignore- content={ApiExamplesData}- title="Never write an API again"- text={[- <p key={0}>- We introspect your database and provide instant APIs. Focus on building your- product, while Supabase handles the CRUD.- </p>,- ]}- footer={[- <div className="grid grid-cols-12" key={0}>- <div className="col-span-12 mt-0 flex flex-col 2xl:flex-row lg:col-span-6 xl:col-span-12 xl:mb-8 gap-1 xl:gap-2 xl:items-center">- <p className="text-foreground-light m-0">Available libraries:</p>- <div className="flex gap-1 xl:mb-0.5">- <Link href="/docs/reference/javascript/introduction" target="_blank">- <Badge>Javascript</Badge>- </Link>- <Link href="/docs/reference/dart/introduction" target="_blank">- <Badge>Flutter</Badge>- </Link>- <Link href="/docs/reference/python/introduction" target="_blank">- <Badge>Python</Badge>- </Link>- <Link href="/docs/reference/csharp/introduction" target="_blank">- <Badge>C#</Badge>- </Link>- <Link href="/docs/reference/kotlin/introduction" target="_blank">- <Badge>Kotlin</Badge>- </Link>- <Link href="/docs/reference/swift/introduction" target="_blank">- <Badge>Swift</Badge>- </Link>- </div>- </div>- </div>,- ]}- documentation_link={'/docs/guides/database'}- />- </SectionContainer>-- <div className="relative">- <div className="section--masked">- <div className="section--bg-masked">- <div className="section--bg border-t border-b border-control"></div>- </div>- <div className="relative pt-12 pb-0">- <div className="overflow-x-hidden">- <SectionContainer className="mb-0 pb-8 lg:pt-32">- <GithubExamples />- </SectionContainer>- </div>- </div>- </div>- </div>-- <SectionContainer>- <div className="grid grid-cols-12 lg:gap-16">- <div className="col-span-12 mb-8 lg:col-span-6 xl:col-span-5">- <h2 className="h3">Extend your database</h2>-- <p className="p">Supabase works natively with Postgres extensions.</p>- <p className="p">- Choose from a huge collection of Postgres extensions, enabled with a single click.- </p>-- <FeatureColumn- title="40+ preinstalled extensions"- text="We only show a few of the extensions supported by Supabase here, but we preinstall many more that you can use right away."- />- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/docs/guides/database">Explore documentation</Link>- </Button>- </div>- <div className="col-span-12 mt-8 lg:col-span-6 lg:col-start-7 lg:mt-0">- <SplitCodeBlockCarousel- // @ts-ignore- content={ExtensionsExamplesData}- />- </div>- </div>- </SectionContainer>- </DefaultLayout>- </>- )-}--export default Databasediff --git a/apps/www/pages/edge-functions.tsx b/apps/www/pages/edge-functions.tsxdeleted file mode 100644index 8e4acb96e70..00000000000--- a/apps/www/pages/edge-functions.tsx+++ /dev/null@@ -1,135 +0,0 @@-import DefaultLayout from '~/components/Layouts/Default'-import SectionContainer from '~/components/Layouts/SectionContainer'-import ProductsNav from '~/components/Products/ProductsNav'-import HighlightColumns from '~/components/Sections/HighlightColumns'-import ProductHeader from '~/components/Sections/ProductHeader2'-import page from '~/data/products/functions/page'-import { useBreakpoint } from 'common'-import { NextSeo } from 'next-seo'-import dynamic from 'next/dynamic'-import Head from 'next/head'-import Image from 'next/image'-import { useRouter } from 'next/router'-import React from 'react'-import { PRODUCT_NAMES, PRODUCT_SHORTNAMES } from 'shared-data/products'--import { breadcrumbs } from '@/lib/breadcrumbs'-import { breadcrumbListSchema, serializeJsonLd, softwareApplicationSchema } from '@/lib/json-ld'--const ExamplesCarousel = dynamic(() => import('~/components/Examples/ExamplesCarousel'))-const GlobalPresenceSection = dynamic(- () => import('~/components/Products/Functions/GlobalPresenceSection')-)-const SingleQuote = dynamic(() => import('~/components/Sections/SingleQuote'))-const LocalDXGrid = dynamic(() => import('~/components/Products/Functions/LocalDXGrid'))-const ProductsCta = dynamic(() => import('~/components/Sections/ProductsCta2'))-const TimedAccordionPanels = dynamic(() => import('~/components/Sections/TimedAccordionPanels'))-const TimedAccordionSection = dynamic(() => import('~/components/Sections/TimedAccordionSection'))--// When updating page content, also update public/llms/edge-functions.txt--function EdgeFunctions() {- const { basePath } = useRouter()- const isXs = useBreakpoint(640)- const pageData = page(isXs)-- return (- <>- <NextSeo- title={pageData.metaTitle}- description={pageData.metaDescription}- openGraph={{- title: pageData.metaTitle,- description: pageData.metaDescription,- url: `https://supabase.com/edge-functions`,- images: [- {- url: `https://supabase.com${basePath}/images/product/functions/functions-og.jpg`,- },- ],- }}- />- <Head>- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(- softwareApplicationSchema({- name: 'Supabase Edge Functions',- description: pageData.metaDescription,- url: 'https://supabase.com/edge-functions',- image: `https://supabase.com${basePath}/images/product/functions/functions-og.jpg`,- })- ),- }}- />- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(breadcrumbListSchema(breadcrumbs.edgeFunctions)),- }}- />- </Head>- <DefaultLayout>- <ProductsNav activePage={PRODUCT_NAMES.FUNCTIONS} />- <ProductHeader- {...pageData.heroSection}- footer={<HighlightColumns highlights={pageData.highlightsSection.highlights} />}- footerPosition="bottom"- />- <SingleQuote- id="quote"- className="pb-8! md:pb-12! [&_q]:max-w-2xl"- quote={{- text: "Supabase gave us the flexibility and scalability needed at every growth stage. It's rare to find a tool that works just as well for startups as it does for large-scale operations.",- author: 'Zeno Rocha',- role: 'CEO at Resend',- link: '/customers/resend',- logo: (- <Image- draggable={false}- src="/images/blog/avatars/zeno-rocha.png"- alt="Zeno Rocha, CEO at Resend"- className="w-10 h-10 rounded-full overflow-hidden object-cover"- width={28}- height={28}- />- ),- }}- />- <div className="overflow-hidden">- <SectionContainer className="flex flex-col gap-4 lg:gap-8 pb-0!" id="examples">- <ExamplesCarousel {...pageData.examplesSection} />- </SectionContainer>- </div>- <SectionContainer className="flex flex-col gap-4" id="developer-experience">- <div>- <h2 className="h2">{pageData.localDXsection.title}</h2>- <p className="text-foreground-lighter lg:w-1/2">{pageData.localDXsection.paragraph}</p>- </div>- <div className="mt-4 md:mt-8">- <LocalDXGrid />- </div>- </SectionContainer>- <SectionContainer className="flex flex-col gap-4 lg:gap-8" id="global-presence">- <GlobalPresenceSection {...pageData.globalPresenceSection} />- </SectionContainer>- <div className="overflow-hidden">- <SectionContainer className="flex flex-col gap-4 lg:gap-8" id="observability">- <h2 className="h2">{pageData.o11y.title}</h2>- <TimedAccordionPanels {...pageData.o11y} />- </SectionContainer>- </div>- <div className="overflow-hidden">- <SectionContainer className="flex flex-col gap-4 lg:gap-8" id="integrates-with-supabase">- <h2 className="h2">{pageData.integratesWithSupabase.title}</h2>- <TimedAccordionSection tabs={pageData.integratesWithSupabase.useCases} />- </SectionContainer>- </div>- <ProductsCta currentProduct={PRODUCT_SHORTNAMES.FUNCTIONS} className="pt-0! lg:pt-16!" />- </DefaultLayout>- </>- )-}--export default EdgeFunctionsdiff --git a/apps/www/pages/realtime.tsx b/apps/www/pages/realtime.tsxdeleted file mode 100644index 4e8bff1bc7d..00000000000--- a/apps/www/pages/realtime.tsx+++ /dev/null@@ -1,271 +0,0 @@-import 'swiper/css'--import CTABanner from '~/components/CTABanner'-import DefaultLayout from '~/components/Layouts/Default'-import SectionContainer from '~/components/Layouts/SectionContainer'-import ProductsNav from '~/components/Products/ProductsNav'-import RealtimeShowcase from '~/components/Realtime/realtime-showcase'-import APISection from '~/components/Sections/APISection'-import ProductHeader from '~/components/Sections/ProductHeader'-import MainProducts from '~/data/MainProducts'-import RealtimeStyles from '~/styles/realtime.module.css'-import ApiExamples from 'data/products/realtime/api-examples'-import { Grid, Layers, Menu } from 'lucide-react'-import { NextSeo } from 'next-seo'-import dynamic from 'next/dynamic'-import Head from 'next/head'-import Image from 'next/image'-import Link from 'next/link'-import { useRouter } from 'next/router'-import { PRODUCT_NAMES } from 'shared-data/products'-import { Button } from 'ui'--import { breadcrumbs } from '@/lib/breadcrumbs'-import { breadcrumbListSchema, serializeJsonLd, softwareApplicationSchema } from '@/lib/json-ld'--const SingleQuote = dynamic(() => import('~/components/Sections/SingleQuote'))--// When updating page content, also update public/llms/realtime.txt--const Cursor = ({ className = '', color = 'none' }) => {- return (- <svg- xmlns="http://www.w3.org/2000/svg"- fill={color}- viewBox="0 0 24 24"- aria-hidden="true"- className={`h-10 w-10 stroke-foreground ${className}`}- >- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="1.5"- d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"- />- </svg>- )-}--function RealtimePage() {- // base path for images- const { basePath } = useRouter()- const meta_title = 'Realtime | Sync your data in real time'- const meta_description =- 'Listens to changes in a PostgreSQL Database and broadcasts them over WebSockets'-- return (- <>- <NextSeo- title={meta_title}- description={meta_description}- openGraph={{- title: meta_title,- description: meta_description,- url: `https://supabase.com/realtime`,- images: [- {- url: `https://supabase.com${basePath}/images/realtime/og.jpg`,- },- ],- }}- />- <Head>- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(- softwareApplicationSchema({- name: 'Supabase Realtime',- description: meta_description,- url: 'https://supabase.com/realtime',- image: `https://supabase.com${basePath}/images/realtime/og.jpg`,- })- ),- }}- />- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(breadcrumbListSchema(breadcrumbs.realtime)),- }}- />- </Head>- <DefaultLayout>- <ProductsNav activePage={PRODUCT_NAMES.REALTIME} />- <ProductHeader- icon={MainProducts['realtime']?.icon}- title={MainProducts['realtime']?.name}- h1={[<span key={'authentication-h1'}>Build modern web and mobile applications</span>]}- subheader={['Sync client state globally over WebSockets in Realtime']}- image={[- <div className="bg-surface-100 border-default relative flex h-[372px] w-[560px] items-center justify-center overflow-hidden rounded-sm border drop-shadow-md">- <div- className={[- 'border-brand-300 relative h-12 w-48 bg-brand',- `flex items-center justify-center ${RealtimeStyles['shape']}`,- ].join(' ')}- >- <p- className={`text-foreground text-[18px] font-medium ${RealtimeStyles['button-text']}`}- >- Start a project- </p>- </div>- <Cursor- color="var(--color-yellow-900)"- className={`${RealtimeStyles['cursor-one']} absolute top-[220px] right-[130px]`}- />- <Cursor- color="var(--color-indigo-900)"- className={`${RealtimeStyles['cursor-two']} absolute top-[180px] right-[280px]`}- />- <div- className={[- 'border-foreground absolute bottom-[40px] left-[175px] flex h-10 w-20',- 'items-center justify-center space-x-2 rounded-full border-[3px] bg-indigo-900',- `${RealtimeStyles['cursor-two-comment']}`,- ].join(' ')}- >- <p className="text-lg">🤔</p>- </div>- <Cursor- color="var(--color-tomato-900)"- className={`${RealtimeStyles['cursor-three']} absolute top-[170px] right-[180px]`}- />- <div- className={[- 'border-foreground absolute top-[72px] left-[320px] flex h-10 w-20',- 'items-center justify-center space-x-2 rounded-full border-[3px] bg-tomato-900',- `${RealtimeStyles['cursor-three-comment']}`,- ].join(' ')}- >- <p className="text-lg">😄</p>- </div>- <div className="bg-background border-default absolute top-0 flex h-9 w-full items-center justify-between border-b">- <div className="flex items-center">- <Menu className="text-foreground mx-3" strokeWidth={1} size={16} />- <Grid className="text-foreground mx-3" strokeWidth={1} size={15} />- <Layers className="text-foreground mx-3" strokeWidth={1} size={15} />- </div>- <div className="mx-3 flex items-center">- <div className="border-foreground bg-tomato-900 relative -right-4 h-5 w-5 rounded-full border" />- <div className="border-foreground bg-yellow-900 relative -right-2 z-2 h-5 w-5 rounded-full border" />- <div className="border-foreground bg-indigo-900 z-3 h-5 w-5 rounded-full border" />- </div>- </div>- </div>,- ]}- documentation_url={'/docs/guides/realtime/broadcast'}- />-- <SectionContainer>- <div className="grid grid-cols-12">- <div className="prose col-span-12 mb-10 lg:col-span-3 lg:mb-0">- <div className="p mb-4">- <img- src="/images/realtime/icons/database-changes.svg"- alt="realtime broadcast"- className="-mb-4 w-9"- />- </div>- <h3>Database changes</h3>- <p>- Listen to changes in the Database inserts, updates, and deletes and other changes.- </p>- <div className="not-prose mt-3">- <Button asChild variant="default">- <Link href="/docs/guides/realtime/postgres-changes">View docs</Link>- </Button>- </div>- </div>- <div className="prose col-span-12 mb-10 lg:col-span-3 lg:col-start-5 lg:mb-0">- <div className="p mb-4">- <img- src="/images/realtime/icons/presence.svg"- alt="realtime broadcast"- className="-mb-4 w-9"- />- </div>- <h3>Presence</h3>- <p>Store and synchronize online user state consistently across clients.</p>- <div className="not-prose mt-3">- <Button asChild variant="default">- <Link href="/docs/guides/realtime/presence">View docs</Link>- </Button>- </div>- </div>- <div className="prose col-span-12 lg:col-span-3 lg:col-start-9">- <div className="p mb-4">- <img- src="/images/realtime/icons/broadcast.svg"- alt="realtime broadcast"- className="-mb-4 w-9"- />- </div>- <h3>Broadcast</h3>- <p>Send any data to any client subscribed to the same Channel.</p>- <div className="not-prose mt-3">- <Button asChild variant="default">- <Link href="/docs/guides/realtime/broadcast">View docs</Link>- </Button>- </div>- </div>- </div>- </SectionContainer>-- <SingleQuote- id="quote"- className="pb-8! md:pb-12!"- quote={{- text: 'Supabase takes out the mental effort from our back-end infrastructure so we can focus on our customers needs.',- author: 'Aaron Sullivan',- role: 'Principal Software Engineer Epsilon3',- link: '/customers/epsilon3',- logo: (- <Image- draggable={false}- src="/images/blog/avatars/aaron-epsilon3.png"- alt="Aaron Sullivan, Principal Software Engineer Epsilon3"- className="w-10 h-10 rounded-full overflow-hidden object-cover"- width={28}- height={28}- />- ),- }}- />-- <SectionContainer className="pb-0! mb-0!">- <div className="mb-12 prose">- <h3>What you can build with Realtime</h3>- <p className="text-foreground-light mt-0">- Build any kind of Realtime application with ease, including any of these scenarios.- </p>- </div>- <RealtimeShowcase />- </SectionContainer>- <SectionContainer>- <APISection- title="Simple and convenient APIs"- // @ts-ignore- content={ApiExamples}- size="large"- text={[- <p key={0}>- <p className="text-base lg:text-lg">- APIs that you can understand. With powerful libraries that work on client and- server-side applications.- </p>- </p>,- ]}- // [TODO] Point to the correct docs URL- documentation_link={'/docs/guides/realtime/broadcast'}- />- </SectionContainer>-- <CTABanner />- </DefaultLayout>- </>- )-}--export default RealtimePagediff --git a/apps/www/pages/storage.tsx b/apps/www/pages/storage.tsxdeleted file mode 100644index f55b78e815a..00000000000--- a/apps/www/pages/storage.tsx+++ /dev/null@@ -1,391 +0,0 @@-import { ArrowUpRight, Shuffle, Wifi, X } from 'lucide-react'-import { NextSeo } from 'next-seo'-import dynamic from 'next/dynamic'-import Head from 'next/head'-import Link from 'next/link'-import { useRouter } from 'next/router'-import { PRODUCT_NAMES } from 'shared-data/products'-import { Button } from 'ui'-import { Image } from 'ui-patterns/Image'--import ImageCarousel from '@/components/Carousels/ImageCarousel'-import FeatureColumn from '@/components/FeatureColumn'-import DefaultLayout from '@/components/Layouts/Default'-import SectionContainer from '@/components/Layouts/SectionContainer'-import ProductIcon from '@/components/ProductIcon'-import ProductsNav from '@/components/Products/ProductsNav'-import ProductHeader from '@/components/Sections/ProductHeader'-import Solutions from '@/data/MainProducts'-import ApiExamples from '@/data/products/storage/api-examples'-import DashboardViewData from '@/data/products/storage/dashboard-carousel.json'-import StoragePermissionsData from '@/data/products/storage/permissions-examples'-import { breadcrumbs } from '@/lib/breadcrumbs'-import { breadcrumbListSchema, serializeJsonLd, softwareApplicationSchema } from '@/lib/json-ld'--const APISection = dynamic(() => import('~/components/Sections/APISection'))-const SingleQuote = dynamic(() => import('~/components/Sections/SingleQuote'))-const ExampleCard = dynamic(() => import('~/components/ExampleCard'))-const SplitCodeBlockCarousel = dynamic(- () => import('~/components/Carousels/SplitCodeBlockCarousel')-)-const CTABanner = dynamic(() => import('~/components/CTABanner'))--// When updating page content, also update public/llms/storage.txt--function StoragePage() {- // base path for images- const { basePath } = useRouter()-- const meta_title = 'Storage | Store any digital content'- const meta_description =- 'An open source S3 Compatible Object Store with unlimited scalability, for any file type.'-- return (- <>- <NextSeo- title={meta_title}- description={meta_description}- openGraph={{- title: meta_title,- description: meta_description,- url: `https://supabase.com/storage`,- images: [- {- url: `https://supabase.com${basePath}/images/product/storage/storage-og.jpg`,- },- ],- }}- />- <Head>- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(- softwareApplicationSchema({- name: 'Supabase Storage',- description: meta_description,- url: 'https://supabase.com/storage',- image: `https://supabase.com${basePath}/images/product/storage/storage-og.jpg`,- })- ),- }}- />- <script- type="application/ld+json"- dangerouslySetInnerHTML={{- __html: serializeJsonLd(breadcrumbListSchema(breadcrumbs.storage)),- }}- />- </Head>- <DefaultLayout>- <ProductsNav activePage={PRODUCT_NAMES.STORAGE} />- <ProductHeader- icon={Solutions['storage'].icon}- title={Solutions['storage'].name}- h1={[- <span key={0}>- Store and serve- <br /> any type of digital content- </span>,- ]}- subheader={[- <>- An open source <b>S3 Compatible</b> Object Store, with unlimited scalability, for any- file type.- </>,- 'With custom policies and permissions that are familiar and easy to implement.',- ]}- image={[- <Image- src={{- light: `${basePath}/images/product/storage/header--light.png`,- dark: `${basePath}/images/product/storage/header--dark.png`,- }}- alt="storage header"- layout="responsive"- width="1386"- height="1067"- />,- ]}- documentation_url={'/docs/guides/storage'}- />-- <SectionContainer>- <div className="grid grid-cols-12">- <div className="col-span-12 mb-10 lg:col-span-3 lg:mb-0">- <div className="p mb-4 flex items-center space-x-2">- <ProductIcon icon={Solutions['storage'].icon} />- <X />- <ProductIcon icon={Solutions['authentication'].icon} />- <X />- <ProductIcon icon={Solutions['database'].icon} />- </div>-- <h4 className="h4">Interoperable</h4>- <p className="p">- Integrates well with the rest of Supabase ecosystem, including Auth and Postgres.- </p>- </div>- <div className="col-span-12 mb-10 lg:col-span-3 lg:col-start-5 lg:mb-0">- <div className="mb-4 flex items-center space-x-2">- <ProductIcon- icon={- 'M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'- }- />- </div>- <h4 className="h4">Lightning fast</h4>- <p className="p">- Thin API server layer that leverages Postgres' permissions and performance.- </p>- </div>- <div className="col-span-12 lg:col-span-3 lg:col-start-9">- <div className="mb-4 flex items-center space-x-2">- <ProductIcon- icon={- 'M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z'- }- />- </div>- <h4 className="h4">Multiple Bucket Types</h4>-- <p className="p">- Choose the right storage models for your application: Files, Analytics, or Vectors.- </p>- </div>- </div>- </SectionContainer>-- <SingleQuote- id="quote"- className="[&_q]:max-w-3xl"- quote={{- text: "Supabase is great because it has everything. I don't need a different solution for authentication, a different solution for database, or a different solution for storage.",- author: 'Yasser Elsaid',- role: 'Founder of Chatbase',- link: '/customers/chatbase',- logo: (- <Image- draggable={false}- src="/images/blog/avatars/yasser-elsaid-chatbase.jpeg"- alt="Yasser Elsaid, Founder of Chatbase"- className="max-w-10 w-10 h-10 rounded-full overflow-hidden object-cover"- width={28}- height={28}- />- ),- }}- />-- <SectionContainer className="pt-16">- <div className="mb-16 block">- <h2 className="h3">Sleek dashboard for managing your media</h2>- <p className="p text-lg">- A complete Object Explorer so that any of your team can use.- </p>- <p className="p">- Drag and drop uploading, moving objects, and multiple object selection. As easy as- working on your desktop.- </p>- </div>- <ImageCarousel- // @ts-ignore- content={DashboardViewData}- footer={- <>- <span key="check-out" className="p mb-4 block">- Check out our example app- </span>- <ExampleCard- key="example"- type={'example'}- products={['database', 'auth', 'storage']}- title={'Profile management example'}- description={- 'Update a user account with public profile information, including uploading a profile image.'- }- author={'supabase'}- author_url={'https://github.com/supabase'}- author_img={'https://avatars.githubusercontent.com/u/54469796'}- repo_name={'nextjs-user-management'}- repo_url={- 'https://github.com/supabase/supabase/tree/master/examples/user-management/nextjs-user-management'- }- vercel_deploy_url={- 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fuser-management%2Fnextjs-user-management&project-name=supabase-nextjs-user-management&repository-name=supabase-nextjs-user-management&integration-ids=oac_VqOgBHqhEoFTPzGkPd7L0iH6&external-id=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fuser-management%2Fnextjs-user-management'- }- demo_url={''}- />- </>- }- />- </SectionContainer>-- <SectionContainer>- <div className="mb-12">- <h2 className="h3">Bucket types for every application</h2>- <p className="p text-lg">- Store, serve, or analyze data the way your app needs. Supabase Storage supports three- purpose-built bucket types so you can pick the right tools for the job without adding- extra systems.- </p>- </div>- <div className="grid grid-cols-12 gap-8">- <div className="col-span-12 lg:col-span-4">- <h4 className="h4">Files buckets</h4>- <p className="p">- Ideal for everyday assets and user content. Store images, videos, documents, PDFs,- archives, and more, then serve them fast from a global CDN with fine-grained access- controls.- </p>- <Button- asChild- size="small"- variant="default"- className="mt-4"- icon={<ArrowUpRight />}- >- <Link href="/docs/guides/storage">Read the docs</Link>- </Button>- </div>- <div className="col-span-12 lg:col-span-4">- <h4 className="h4">Analytics buckets</h4>- <p className="p">- Built for large-scale analytical workloads on open table formats such as Apache- Iceberg. Keep historical or time-series data, logs, or ETL outputs in a format that- is efficient to query, partition, and transform, and optionally expose via Postgres.- </p>- <div className="mt-4 flex gap-2">- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/docs/guides/storage/analytics/introduction">Read the docs</Link>- </Button>- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/blog/introducing-analytics-buckets">Read the blog post</Link>- </Button>- </div>- </div>- <div className="col-span-12 lg:col-span-4">- <h4 className="h4">Vector buckets</h4>- <p className="p">- Designed for AI and ML use cases that rely on semantic search or similarity- matching. Store and index vector embeddings with support for multiple distance- metrics, metadata filtering, and fast similarity queries for RAG systems, AI-powered- search, and more.- </p>- <div className="mt-4 flex gap-2">- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/docs/guides/storage/vector/introduction">Read the docs</Link>- </Button>- <Button asChild size="small" variant="default" icon={<ArrowUpRight />}>- <Link href="/blog/vector-buckets">Read the blog post</Link>- </Button>- </div>- </div>- </div>- </SectionContainer>-- <SectionContainer className="pt-0">- <APISection- title="Simple and convenient APIs"- // @ts-ignore- content={ApiExamples}- text={[- <p key={0}>Built from the ground up for interoperable authentication.</p>,- <p key={1}>Fast and easy to implement using our powerful library clients.</p>,- ]}- footer={[- <div className="my-8 grid grid-cols-12 gap-8 lg:gap-0 xl:gap-16" key={0}>- <div className="col-span-6 lg:col-span-12 lg:mb-8 xl:col-span-4 xl:mb-0">- <FeatureColumn- icon={<Wifi />}- title="CDN"- text="Serve from over 285 cities globally to reduce latency."- />- <Button- asChild- size="small"- variant="default"- className="mt-4"- icon={<ArrowUpRight />}- >- <Link href="/docs/guides/storage/cdn/fundamentals">Explore docs</Link>- </Button>- </div>- <div className="col-span-6 lg:col-span-12 xl:col-span-4">- <FeatureColumn- icon={<Shuffle />}- title="Image Optimizations and Transformations"- text="Resize and compress your media files on the fly."- />- <Button- asChild- size="small"- variant="default"- className="mt-4"- icon={<ArrowUpRight />}- >- <Link href="/docs/guides/storage/serving/image-transformations">- Explore docs- </Link>- </Button>- </div>- </div>,- ]}- />- </SectionContainer>-- <div className="relative">- <div className="section--masked">- <div className="section--bg-masked">- <div className="section--bg border-t border-control"></div>- </div>- <div className="relative pt-12 pb-0">- <div className="overflow-x-hidden">- <SectionContainer>- <div className="grid grid-cols-12 lg:gap-16">- <div className="col-span-12 mb-8 lg:col-span-5">- <h2 className="h3">- Integrates natively <br />- with Supabase Auth- </h2>-- <p className="p">- Using Postgres Row Level Security to create Object access rules.- </p>- <p className="p">- Storage Authorization is built around Postgres so that you can use any- combination of SQL, Postgres functions, and even your own metadata to write- policies.- </p>-- <Button- asChild- size="small"- variant="default"- className="mt-4"- icon={<ArrowUpRight />}- >- <Link href="/docs/reference/javascript/storage-createbucket">- Explore documentation- </Link>- </Button>- </div>- <div className="col-span-12 lg:col-span-6 lg:col-start-7">- <SplitCodeBlockCarousel- // @ts-ignore- content={StoragePermissionsData}- />- </div>- </div>- </SectionContainer>- </div>- </div>- </div>- </div>- <CTABanner />- </DefaultLayout>- </>- )-}--export default StoragePagediff --git a/apps/www/public/images/logos/frameworks/expo.svg b/apps/www/public/images/logos/frameworks/expo.svgindex 92185f60265..07df455e596 100644--- a/apps/www/public/images/logos/frameworks/expo.svg+++ b/apps/www/public/images/logos/frameworks/expo.svg@@ -1 +1,3 @@-<svg xmlns="http://www.w3.org/2000/svg" width="61" height="61" fill="none" viewBox="0 0 61 61"><path fill="#7e7e7e" d="M45.5 25.727a3.35 3.35 0 0 0-1.31-1.08 3.42 3.42 0 0 0-3.303.233 3.3 3.3 0 0 0-1.137 1.254 2.915 2.915 0 0 0 .579 3.32 4.97 4.97 0 0 0 3.292-.92 4.8 4.8 0 0 0 1.878-2.807m-9.995-12.813-2.14-1.151-9.317 5.083.743.394 1.413.727 2.557-1.393 6.746-3.684zm.863-.351a.33.33 0 0 1 .236.22l3.121 9.026a.296.296 0 0 1-.148.393 5.96 5.96 0 0 0-2.654 2.882 5.8 5.8 0 0 0-.259 3.877 6.26 6.26 0 0 0 2.591 3.405 6.48 6.48 0 0 0 4.214.993.4.4 0 0 1 .387.234l3.224 9.265a.37.37 0 0 1-.149.406l-9.91 5.68a.4.4 0 0 1-.148.029.4.4 0 0 1-.268-.044l-3.477-2.14a.34.34 0 0 1-.147-.145l-6.792-15.307-10.342 5.768a.49.49 0 0 1-.402.014l-2.35-1.311a.333.333 0 0 1-.148-.437l10.047-18.69a.36.36 0 0 1 .163-.145l10.017-5.477a.39.39 0 0 1 .356 0l2.84 1.504zm-12.423 5.022-.487-.247-9.685 18.077 1.767.975 8.352-10.71a.4.4 0 0 1 .341-.146.42.42 0 0 1 .297.218l9.094 20.539 2.43 1.47-9.761-27.977-.415-1.165-1.946-1.049.015.015zm14.978 10.779a3.63 3.63 0 0 1 .177-2.428c.339-.77.931-1.403 1.68-1.797a4.17 4.17 0 0 1 4.815.585 3.635 3.635 0 0 1 .108 5.21l-.108.106a4.11 4.11 0 0 1-2.793 1.1 4.12 4.12 0 0 1-2.8-1.085 3.97 3.97 0 0 1-1.079-1.691"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" viewBox="0 0 256 231">+ <path d="M121 85c2-3 5-4 7-4 1 0 5 1 7 4 16 22 43 67 63 101l26 40c7 8 18 3 24-6s8-15 8-22c0-4-88-168-97-182-9-13-11-16-26-16h-11c-14 0-16 3-25 16C88 30 0 194 0 198c0 7 2 13 8 22s17 14 24 6l26-40c20-34 47-79 63-101Z" fill="#000020"/>+</svg>diff --git a/apps/www/public/images/logos/frameworks/flutter.svg b/apps/www/public/images/logos/frameworks/flutter.svgindex 181658b999b..8bb3af7c2fa 100644--- a/apps/www/public/images/logos/frameworks/flutter.svg+++ b/apps/www/public/images/logos/frameworks/flutter.svg@@ -1 +1,12 @@-<svg xmlns="http://www.w3.org/2000/svg" width="62" height="61" fill="none" viewBox="0 0 62 61"><path fill="#7e7e7e" d="m46.507 10.383-12.156.013L14.75 29.997l6.047 6.055 5.316-5.285zM34.7 28.465c-.173-.008-.35-.016-.462.131L23.786 39.048l6.003 5.967-.007.007 4.297 4.3q.042.038.085.082c.117.117.243.243.425.203q2.977-.006 5.955-.004 2.977.003 5.956-.002L35.933 39.023l10.563-10.556-11.59-.003c-.064.008-.135.005-.206.001"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" viewBox="0 0 256 317">+ <defs>+ <linearGradient x1="4%" y1="27%" x2="75.9%" y2="52.9%" id="a">+ <stop offset="0%"/>+ <stop stop-opacity="0" offset="100%"/>+ </linearGradient>+ </defs>+ <path fill="#47C5FB" d="M158 0 0 158l49 48L255 0zM157 145l-85 85 49 50 49-49 85-86z"/>+ <path fill="#00569E" d="m121 280 37 37h97l-85-86z"/>+ <path fill="#00B5F8" d="m72 230 48-48 50 49-49 49z"/>+ <path fill-opacity=".8" fill="url(#a)" d="m121 280 41-14 4-31z"/>+</svg>diff --git a/apps/www/public/images/logos/frameworks/langchain.svg b/apps/www/public/images/logos/frameworks/langchain.svgnew file mode 100644index 00000000000..6db6e034ee8--- /dev/null+++ b/apps/www/public/images/logos/frameworks/langchain.svg@@ -0,0 +1,5 @@+<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">+<rect width="100" height="100" rx="20" fill="#161F34"/>+<path d="M54.2612 54.2583L63.1942 45.3253C67.8979 40.6215 67.8979 32.9952 63.1942 28.2914C58.4904 23.5877 50.8641 23.5877 46.1603 28.2914L37.2273 37.2244" stroke="#7FC8FF" stroke-width="12.0389"/>+<path d="M45.7427 45.7412L36.8098 54.6742C32.106 59.3779 32.106 67.0042 36.8098 71.708C41.5135 76.4118 49.1398 76.4118 53.8436 71.708L62.7766 62.775" stroke="#7FC8FF" stroke-width="12.0389"/>+</svg>diff --git a/apps/www/public/images/logos/frameworks/nestjs.svg b/apps/www/public/images/logos/frameworks/nestjs.svgnew file mode 100644index 00000000000..e2c24e250eb--- /dev/null+++ b/apps/www/public/images/logos/frameworks/nestjs.svg@@ -0,0 +1 @@+<svg viewBox="0 0 264.6 255.6" xmlns="http://www.w3.org/2000/svg"><path d="M153.3 4.2c-1.8 0-3.5.4-5 1 3.3 2.1 5.1 5 6 8.3 0 .5.2.8.3 1.3l.1 1.1c.3 5.7-1.5 6.4-2.7 9.8-1.9 4.3-1.4 9 .9 12.7.2.5.4 1 .8 1.4-2.5-16.3 11.1-18.8 13.7-23.9.2-4.4-3.5-7.4-6.4-9.5a14.3 14.3 0 0 0-7.7-2.2zM174 8c-.3 1.5 0 1.1-.1 1.9l-.2 1.7-.4 1.5-.5 1.6-.8 1.5-.5.7-.4.6c-.3.5-.6 1-1 1.3-.3.4-.6.9-1 1.2l-1.3 1c-1.4 1.1-3 1.9-4.3 2.9-.5.3-1 .5-1.3 1-.5.2-.9.6-1.3 1l-1.1 1.2-1 1.3-.9 1.3-.7 1.5-.5 1.5a21 21 0 0 0-.5 1.6l-.1.9-.1.7-.1 1.7v1.1l.3 1.6c0 .6.1 1 .3 1.6l.5 1.5.4 1-14.8-5.8-7.5-2-4-1a120 120 0 0 0-11.8-1.7h-.4A115.5 115.5 0 0 0 87 34.9l-3 .6c-2 .3-3.9.8-5.7 1.2l-3 .8-2.7 1.2-2.2 1-.3.1-1.8 1-.5.1-2 1-1.2.7-.6.3-1.7 1-1.6 1-1.3.9-.1.1-1.3 1H58l-1 .8-.4.3-1 .8c0 .2-.1.2-.2.3l-1.2 1v.2c-.5.3-.9.7-1.2 1.1l-.2.1-1 1c0 .2-.3.3-.4.5l-1 1.1-.4.3-1.4 1.6-.2.2a38.1 38.1 0 0 1-7 6 48.9 48.9 0 0 1-12.1 6c-2.7.5-5.5 1.6-7.9 1.8l-1.6.2-1.6.4-1.6.6-1.5.7-1.4.9c-.5.3-1 .7-1.3 1.1-.5.3-1 .8-1.3 1.2l-1.1 1.3-1 1.4-.9 1.5-.7 1.7-.6 1.7-.3 1.5v.2L6 86.2v2.1a6.9 6.9 0 0 0 .7 2.4l.7 1.2.8 1.2a17.1 17.1 0 0 0 2.4 2c1.5 1.4 1.9 1.9 3.9 2.9l1 .5h.2v.4a13.3 13.3 0 0 0 1 3.1l.5 1.2.1.3a28.3 28.3 0 0 0 1.8 2.8l1 1.2 1.3 1.1h.1a14.2 14.2 0 0 0 5.4 3l.3.1.8.2c-.2 3.5-.3 6.8.3 8 .5 1.2 3.4-2.7 6.2-7.2-.4 4.4-.6 9.7 0 11.2.7 1.6 4.6-3.4 8-9a74.7 74.7 0 0 1 92 65.8c-.8-7-9.4-10.8-13.4-9.9-2 4.8-5.2 11-10.5 14.8.4-4.3.2-8.7-.7-13-1.4 6-4.2 11.5-8 16.3a18 18 0 0 1-15.5-7l-.5-.8-.5-1.4-.4-1.3V176c0-.5.1-1 .3-1.4 0-.4.2-.9.4-1.3l.8-1.4c1-3 1-5.6-1-7l-1.1-.7-.9-.3-.5-.2-1.4-.3a5 5 0 0 0-1.3-.2l-1.4-.1h-1l-1.4.2-1.4.3-1.3.4-1.3.6-1.3.7c-15 9.8-6 32.8 4.2 39.5-3.8.7-7.8 1.5-8.9 2.3l-.1.2a60.9 60.9 0 0 0 19.2 7.4 61.5 61.5 0 0 0 72.6-51.3l.4 1.7c.2 1.2.5 2.4.6 3.7l.2 1.7v.3l.2 1.6.1 2.2v5.4l-.1.8v1.5c-.2.2-.2.4-.2.5 0 .6 0 1-.2 1.5v.6c0 .7-.2 1.2-.3 1.9v.1l-.4 1.8v.2c0 .6-.2 1.2-.4 1.8v.2l-.5 1.8v.2l-.5 1.8v.1l-.6 2-.7 1.8-.8 1.9-.7 1.9c-.4.5-.6 1.2-1 1.8l-.1.4s0 .2-.2.2a61.2 61.2 0 0 1-18.1 21.7l-1.6 1.1c0 .2-.3.2-.4.4l-1.4 1 .2.3 2.7-.4h.1a137.7 137.7 0 0 0 6.5-1.2l.9-.2 1.3-.3 1.2-.3c6.4-1.5 12.7-3.7 18.7-6.2-10.2 14-24 25.3-40.1 32.8a103.2 103.2 0 0 0 83.1-52.6c-2.7 15-8.6 29.1-17.4 41.5a101.7 101.7 0 0 0 44.5-69.2c2.2 10.2 2.8 20.7 1.8 31.1 46.7-65 4-132.5-14-150.3l-.1-.3v.1l-.1-.1-.2 2.3a87 87 0 0 1-.6 4.3l-1.1 4.3a53.7 53.7 0 0 1-3.5 8 44 44 0 0 1-9.9 12l-1.5 1.4a36 36 0 0 1-7.4 4.7l-4 1.8a45.5 45.5 0 0 1-8.6 2.3l-4.4.6a49.7 49.7 0 0 1-11.9-.8l-4.3-1.1a48 48 0 0 0 20.7-6.8l3.6-2.6 3.3-2.9 3-3.2c1-1.1 1.9-2.3 2.7-3.5.2-.1.3-.4.4-.6l1.9-3.1a44.5 44.5 0 0 0 3.5-8c.4-1.4.8-2.9 1-4.3.3-1.5.6-2.9.7-4.3l.3-4.4-.1-3.1-.6-4.3c-.2-1.5-.5-3-1-4.4-.4-1.3-.8-2.7-1.4-4.1-.5-1.4-1.1-2.7-1.8-4l-2.2-3.8a71.3 71.3 0 0 0-5.5-6.9 40.4 40.4 0 0 0-12-8.6C178 9.3 176 8.6 174 8z" fill="#e0234e" fill-rule="evenodd"/></svg>\ No newline at end of filediff --git a/apps/www/public/images/logos/frameworks/nextjs.svg b/apps/www/public/images/logos/frameworks/nextjs.svgindex 6537c80cf9b..a9a4d2381c4 100644--- a/apps/www/public/images/logos/frameworks/nextjs.svg+++ b/apps/www/public/images/logos/frameworks/nextjs.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="61" height="62" fill="none" viewBox="0 0 61 62"><path fill="#7e7e7e" fill-rule="evenodd" d="M42.315 48.68a21.44 21.44 0 0 1-11.923 3.597c-11.896 0-21.54-9.644-21.54-21.54 0-11.897 9.644-21.542 21.54-21.542 11.897 0 21.541 9.645 21.541 21.541 0 6.42-2.809 12.185-7.264 16.131l-5.114-6.587V21.828h-2.971v14.625L25.23 21.828h-3.75v17.82h3V25.636z" clip-rule="evenodd"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180"><mask height="180" id="mask0" maskUnits="userSpaceOnUse" width="180" x="0" y="0" style="mask-type: alpha;"><circle cx="90" cy="90" fill="black" r="90"/></mask><g mask="url(#mask0)"><circle cx="90" cy="90" data-circle="true" fill="black" r="90"/><path d="M149.508 157.52L69.142 54H54V125.97H66.1136V69.3836L139.999 164.845C143.333 162.614 146.509 160.165 149.508 157.52Z" fill="url(#paint0)"/><rect fill="url(#paint1)" height="72" width="12" x="115" y="54"/></g><defs><linearGradient gradientUnits="userSpaceOnUse" id="paint0" x1="109" x2="144.5" y1="116.5" y2="160.5"><stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="paint1" x1="121" x2="120.799" y1="54" y2="106.875"><stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient></defs></svg>diff --git a/apps/www/public/images/logos/frameworks/openai.svg b/apps/www/public/images/logos/frameworks/openai.svgnew file mode 100644index 00000000000..0b36b8a5745--- /dev/null+++ b/apps/www/public/images/logos/frameworks/openai.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="256" height="260" preserveAspectRatio="xMidYMid" viewBox="0 0 256 260"><path d="M239.184 106.203a64.716 64.716 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.716 64.716 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.665 64.665 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.767 64.767 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483Zm-97.56 136.338a48.397 48.397 0 0 1-31.105-11.255l1.535-.87 51.67-29.825a8.595 8.595 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601Zm-104.466-44.61a48.345 48.345 0 0 1-5.781-32.589l1.534.921 51.722 29.826a8.339 8.339 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803ZM23.549 85.38a48.499 48.499 0 0 1 25.58-21.333v61.39a8.288 8.288 0 0 0 4.195 7.316l62.874 36.272-21.845 12.636a.819.819 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466 41.695-63.08-36.63L161.73 77.86a.819.819 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.544 8.544 0 0 0-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.716.716 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391v.205ZM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87-51.67 29.825a8.595 8.595 0 0 0-4.246 7.367l-.051 72.697Zm11.868-25.58 28.138-16.217 28.188 16.218v32.434l-28.086 16.218-28.188-16.218-.052-32.434Z"/></svg>diff --git a/apps/www/public/images/logos/frameworks/stripe.svg b/apps/www/public/images/logos/frameworks/stripe.svgnew file mode 100644index 00000000000..feb03cc3e91--- /dev/null+++ b/apps/www/public/images/logos/frameworks/stripe.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="76.57" height="32" viewBox="0 0 512 214"><path fill="#635BFF" d="M512 110.08c0-36.409-17.636-65.138-51.342-65.138c-33.85 0-54.33 28.73-54.33 64.854c0 42.808 24.179 64.426 58.88 64.426c16.925 0 29.725-3.84 39.396-9.244v-28.445c-9.67 4.836-20.764 7.823-34.844 7.823c-13.796 0-26.027-4.836-27.591-21.618h69.547c0-1.85.284-9.245.284-12.658m-70.258-13.511c0-16.071 9.814-22.756 18.774-22.756c8.675 0 17.92 6.685 17.92 22.756zm-90.31-51.627c-13.939 0-22.899 6.542-27.876 11.094l-1.85-8.818h-31.288v165.83l35.555-7.537l.143-40.249c5.12 3.698 12.657 8.96 25.173 8.96c25.458 0 48.64-20.48 48.64-65.564c-.142-41.245-23.609-63.716-48.498-63.716m-8.534 97.991c-8.391 0-13.37-2.986-16.782-6.684l-.143-52.765c3.698-4.124 8.818-6.968 16.925-6.968c12.942 0 21.902 14.506 21.902 33.137c0 19.058-8.818 33.28-21.902 33.28M241.493 36.551l35.698-7.68V0l-35.698 7.538zm0 10.809h35.698v124.444h-35.698zm-38.257 10.524L200.96 47.36h-30.72v124.444h35.556V87.467c8.39-10.951 22.613-8.96 27.022-7.396V47.36c-4.551-1.707-21.191-4.836-29.582 10.524m-71.112-41.386l-34.702 7.395l-.142 113.92c0 21.05 15.787 36.551 36.836 36.551c11.662 0 20.195-2.133 24.888-4.693V140.8c-4.55 1.849-27.022 8.391-27.022-12.658V77.653h27.022V47.36h-27.022zM35.982 83.484c0-5.546 4.551-7.68 12.09-7.68c10.808 0 24.461 3.272 35.27 9.103V51.484c-11.804-4.693-23.466-6.542-35.27-6.542C19.2 44.942 0 60.018 0 85.192c0 39.252 54.044 32.995 54.044 49.92c0 6.541-5.688 8.675-13.653 8.675c-11.804 0-26.88-4.836-38.827-11.378v33.849c13.227 5.689 26.596 8.106 38.827 8.106c29.582 0 49.92-14.648 49.92-40.106c-.142-42.382-54.329-34.845-54.329-50.774"/></svg>diff --git a/apps/www/public/images/logos/frameworks/vercel.svg b/apps/www/public/images/logos/frameworks/vercel.svgnew file mode 100644index 00000000000..611c021de97--- /dev/null+++ b/apps/www/public/images/logos/frameworks/vercel.svg@@ -0,0 +1 @@+<svg viewBox="0 0 256 222" width="256" height="222" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><path fill="#000" d="m128 0 128 221.705H0z"/></svg>\ No newline at end of filediff --git a/apps/www/public/images/logos/hugging-face-icon.svg b/apps/www/public/images/logos/hugging-face-icon.svgnew file mode 100644index 00000000000..116c4498fe4--- /dev/null+++ b/apps/www/public/images/logos/hugging-face-icon.svg@@ -0,0 +1,35 @@+<svg width="95" height="88" viewBox="0 0 95 88" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">+ <defs>+ <path d="M13,14.7890193 C22.8284801,14.7890193 26,6.02605902 26,1.5261751 C26,-0.812484109 24.4279133,-0.0763570998 21.9099482,1.17020987 C19.5830216,2.32219957 16.4482998,3.91011313 13,3.91011313 C5.82029825,3.91011313 0,-2.97370882 0,1.5261751 C0,6.02605902 3.17151989,14.7890193 13,14.7890193 Z" id="path-1"/>+ </defs>+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">+ <g>+ <g>+ <g>+ <g>+ <g>+ <path d="M93.7930402,70.08 C94.5430402,72.24 94.3630402,74.54 93.3630402,76.54 C92.6430402,78 91.6130402,79.13 90.3530402,80.14 C88.8330402,81.34 86.9430402,82.36 84.6630402,83.34 C81.9430402,84.5 78.6230402,85.59 77.1030402,85.99 C73.2130402,87 69.4730402,87.64 65.6830402,87.67 C60.2630402,87.72 55.5930402,86.44 52.2730402,83.17 C50.5530402,83.38 48.8130402,83.5 47.0630402,83.5 C45.4030402,83.5 43.7630402,83.4 42.1330402,83.2 C38.8030402,86.45 34.1530402,87.72 28.7530402,87.67 C24.9630402,87.64 21.2230402,87 17.3230402,85.99 C15.8130402,85.59 12.4930402,84.5 9.77304019,83.34 C7.49304019,82.36 5.60304019,81.34 4.09304019,80.14 C2.82304019,79.13 1.79304019,78 1.07304019,76.54 C0.0830401858,74.54 -0.106959814,72.24 0.653040186,70.08 C-0.0469598142,68.43 -0.226959814,66.54 0.323040186,64.45 C0.573040186,63.5 0.983040186,62.62 1.50304019,61.84 C1.39304019,61.43 1.30304019,61.01 1.24304019,60.55 C0.863040186,57.81 1.81304019,55.31 3.60304019,53.37 C4.48304019,52.4 5.43304019,51.73 6.42304019,51.3 C5.69304019,48.2 5.31304019,45.01 5.31304019,41.75 C5.31304019,18.69 24.0030402,0 47.0630402,0 C54.9830402,0 62.3930402,2.2 68.7130402,6.04 C69.8530402,6.74 70.9730402,7.49 72.0430402,8.29 C72.5730402,8.69 73.1030402,9.1 73.6130402,9.53 C74.1330402,9.95 74.6430402,10.39 75.1330402,10.84 C76.6130402,12.19 78.0030402,13.64 79.2730402,15.19 C79.7030402,15.7 80.1130402,16.23 80.5130402,16.77 C81.3230402,17.84 82.0730402,18.95 82.7630402,20.1 C83.8130402,21.82 84.7330402,23.62 85.5330402,25.49 C86.0630402,26.74 86.5230402,28.02 86.9330402,29.33 C87.5430402,31.29 88.0130402,33.31 88.3330402,35.39 C88.4330402,36.08 88.5230402,36.78 88.5930402,37.48 C88.7330402,38.88 88.8130402,40.3 88.8130402,41.75 C88.8130402,44.97 88.4330402,48.13 87.7230402,51.18 C88.8230402,51.61 89.8630402,52.31 90.8330402,53.37 C92.6230402,55.31 93.5730402,57.82 93.1930402,60.56 C93.1330402,61.01 93.0430402,61.43 92.9330402,61.84 C93.4530402,62.62 93.8630402,63.5 94.1130402,64.45 C94.6630402,66.54 94.4830402,68.43 93.7930402,70.08" fill="#FFFFFF" fill-rule="nonzero"/>+ <circle fill="#FFD21E" fill-rule="nonzero" cx="46.75" cy="41.75" r="34.75"/>+ <path d="M81.5,41.75 C81.5,22.5581049 65.9418951,7 46.75,7 C27.5581049,7 12,22.5581049 12,41.75 C12,60.9418951 27.5581049,76.5 46.75,76.5 C65.9418951,76.5 81.5,60.9418951 81.5,41.75 Z M8,41.75 C8,20.3489659 25.3489659,3 46.75,3 C68.1510341,3 85.5,20.3489659 85.5,41.75 C85.5,63.1510341 68.1510341,80.5 46.75,80.5 C25.3489659,80.5 8,63.1510341 8,41.75 Z" fill="#FFAC03" fill-rule="nonzero"/>+ <path d="M57.1723547,31.7151181 C58.0863134,32.7107502 57.3040427,35.2620959 58.7620957,35.2620959 C61.5235194,35.2620959 63.7620957,33.0235196 63.7620957,30.2620959 C63.7620957,27.5006721 61.5235194,25.2620959 58.7620957,25.2620959 C56.0006719,25.2620959 53.7620957,27.5006721 53.7620957,30.2620959 C53.7620957,31.5654666 56.3553563,30.8251108 57.1723547,31.7151181 Z" fill="#3A3B45" fill-rule="nonzero" transform="translate(58.762096, 30.262096) rotate(-28.000000) translate(-58.762096, -30.262096)"/>+ <path d="M32.1723553,31.7151181 C33.086314,32.7107502 32.3040433,35.2620959 33.7620963,35.2620959 C36.52352,35.2620959 38.7620963,33.0235196 38.7620963,30.2620959 C38.7620963,27.5006721 36.52352,25.2620959 33.7620963,25.2620959 C31.0006725,25.2620959 28.7620963,27.5006721 28.7620963,30.2620959 C28.7620963,31.5654666 31.3553569,30.8251108 32.1723553,31.7151181 Z" fill="#3A3B45" fill-rule="nonzero" transform="translate(33.762096, 30.262096) scale(-1, 1) rotate(-28.000000) translate(-33.762096, -30.262096)"/>+ <g transform="translate(33.500000, 41.500000)">+ <g fill-rule="nonzero" fill="#3A3B45">+ <path d="M13,14.7890193 C22.8284801,14.7890193 26,6.02605902 26,1.5261751 C26,-0.812484109 24.4279133,-0.0763570998 21.9099482,1.17020987 C19.5830216,2.32219957 16.4482998,3.91011313 13,3.91011313 C5.82029825,3.91011313 0,-2.97370882 0,1.5261751 C0,6.02605902 3.17151989,14.7890193 13,14.7890193 Z"/>+ </g>+ <g>+ <mask id="mask-2" fill="white">+ <use href="#path-1"/>+ </mask>+ <path d="M13.25,25 C18.0399291,25 21.9229338,21.1169953 21.9229338,16.3270662 C21.9229338,12.5962324 19.5672252,9.41560375 16.2620987,8.19147116 C16.1404592,8.14641904 16.0175337,8.10401696 15.8933923,8.06433503 C15.0599892,7.79793679 14.1717882,10.6623144 13.25,10.6623144 C12.3886883,10.6623144 11.5567012,7.77968641 10.7713426,8.01349068 C7.18916268,9.07991937 4.57706621,12.3984489 4.57706621,16.3270662 C4.57706621,21.1169953 8.46007093,25 13.25,25 Z" fill="#EF4E4E" fill-rule="nonzero" mask="url(#mask-2)"/>+ </g>+ </g>+ <circle fill="#FFD21E" fill-rule="nonzero" style="mix-blend-mode: multiply;" cx="70.25" cy="33.75" r="3.25"/>+ <circle fill="#FFD21E" fill-rule="nonzero" style="mix-blend-mode: multiply;" cx="23.75" cy="33.75" r="3.25"/>+ </g>+ </g>+ </g>+ </g>+ </g>+ </g>+</svg>diff --git a/apps/www/public/images/logos/resend-icon.svg b/apps/www/public/images/logos/resend-icon.svgnew file mode 100644index 00000000000..9e5fc7ca39a--- /dev/null+++ b/apps/www/public/images/logos/resend-icon.svg@@ -0,0 +1,3 @@+<svg width="1800" height="1800" viewBox="0 0 1800 1800" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M1000.46 450C1174.77 450 1278.43 553.669 1278.43 691.282C1278.43 828.896 1174.77 932.563 1000.46 932.563H912.382L1350 1350H1040.82L707.794 1033.48C683.944 1011.47 672.936 985.781 672.935 963.765C672.935 932.572 694.959 905.049 737.161 893.122L908.712 847.244C973.85 829.812 1018.81 779.353 1018.81 713.298C1018.8 632.567 952.745 585.78 871.095 585.78H450V450H1000.46Z" fill="currentColor"/>+</svg>diff --git a/apps/www/public/images/logos/resend-wordmark.svg b/apps/www/public/images/logos/resend-wordmark.svgnew file mode 100644index 00000000000..08ac60f13d1--- /dev/null+++ b/apps/www/public/images/logos/resend-wordmark.svg@@ -0,0 +1,3 @@+<svg width="1978" height="420" viewBox="0 0 1978 420" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M543.803 118.321C633.178 118.321 698.215 180.419 693.6 293.286H475.948C484.076 324.654 505.791 351.608 549.257 351.608C573.594 351.608 595.833 344.895 612.617 323.916H687.726L686.467 330.629C673.459 388.112 608.001 420 549.257 420C456.106 420 393.585 357.062 393.585 269.37C393.585 181.678 456.106 118.321 543.803 118.321ZM1173.62 118.321C1263.42 118.321 1328.04 180.419 1323.84 293.286H1106.13C1114.16 324.654 1135.72 351.608 1179.5 351.608C1203.84 351.608 1226.07 344.895 1242.44 323.916H1317.97L1316.71 330.629C1303.7 388.111 1238.24 420 1179.5 420C1086.35 420 1023.83 357.063 1023.83 269.37C1023.83 181.678 1086.35 118.321 1173.62 118.321ZM1978 411.609H1896.6L1900.79 370.91C1889.46 395.246 1852.96 419.162 1807.22 419.162C1731.69 419.162 1670.43 361.26 1670.43 269.791C1670.43 178.322 1730.85 120.42 1807.22 120.42C1848.76 120.42 1874.36 133.847 1897.02 156.924V0H1978V411.609ZM853.47 116.644C919.767 116.644 978.091 140.559 994.875 199.301L996.554 205.595H913.892C896.268 183.777 872.771 180.839 853.47 180.839C835.427 180.839 806.894 185.455 806.894 203.077C806.894 219.441 825.776 224.895 842.141 226.993L889.975 232.028C965.922 238.742 999.491 268.532 999.491 326.854C999.491 393.986 932.774 419.161 866.896 419.161C801.019 419.161 732.624 389.79 719.616 330.21L718.357 323.916H803.117C814.866 357.483 868.994 354.965 866.896 354.965C898.786 354.965 918.508 345.315 918.508 329.79C918.508 319.72 915.15 307.972 882.422 303.776L832.489 298.741C766.612 294.126 726.75 259.3 726.75 207.272C726.75 143.496 787.173 116.644 853.47 116.644ZM251.761 0C331.485 0 378.9 47.4126 378.9 110.35C378.9 173.287 331.485 220.7 251.761 220.7H211.479L411.629 411.609H270.224L117.908 266.854C106.999 256.784 101.963 245.036 101.963 234.966C101.963 220.7 112.034 208.113 131.335 202.658L209.801 181.679C239.592 173.707 260.153 150.63 260.153 120.42C260.153 83.4968 229.941 62.0977 192.597 62.0977H0V0H251.761ZM1520.63 118.74C1591.97 118.74 1641.9 170.768 1641.9 245.034V411.608H1560.5V258.88C1560.5 216.922 1538.26 191.747 1498.81 191.747C1459.37 191.747 1433.78 217.761 1433.78 258.88V411.608H1354.05V124.614H1435.04L1431.26 170.349C1443.01 147.272 1479.51 118.74 1520.63 118.74ZM1826.52 191.749C1777.43 191.749 1751.42 228.252 1751.42 269.791C1751.42 314.266 1780.79 348.252 1826.52 348.252C1870.58 348.252 1899.11 313.847 1899.11 269.791C1899.11 225.735 1871.42 191.749 1826.52 191.749ZM543.803 183.355C504.138 183.355 481.475 207.041 474.442 238.74H611.728C610.893 235.09 609.818 231.188 608.421 226.992C598.35 198.461 574.853 183.356 543.803 183.355ZM1173.62 183.355C1134.3 183.356 1111.7 207.041 1104.68 238.74H1241.97C1241.13 235.09 1240.06 231.188 1238.66 226.992C1228.59 198.461 1205.09 183.355 1173.62 183.355Z" fill="currentColor"/>+</svg>diff --git a/apps/www/public/images/product/database/sql-view/export-csv-light.png b/apps/www/public/images/product/database/sql-view/export-csv-light.pngnew file mode 100644index 00000000000..897b967fc53Binary files /dev/null and b/apps/www/public/images/product/database/sql-view/export-csv-light.png differdiff --git a/apps/www/public/images/product/database/sql-view/export.png b/apps/www/public/images/product/database/sql-view/export.pngindex 7c5fab5b48d..9c9d872789c 100644Binary files a/apps/www/public/images/product/database/sql-view/export.png and b/apps/www/public/images/product/database/sql-view/export.png differdiff --git a/apps/www/public/images/product/database/sql-view/favorites-light.png b/apps/www/public/images/product/database/sql-view/favorites-light.pngnew file mode 100644index 00000000000..a92a3c2c78aBinary files /dev/null and b/apps/www/public/images/product/database/sql-view/favorites-light.png differdiff --git a/apps/www/public/images/product/database/sql-view/favorites.png b/apps/www/public/images/product/database/sql-view/favorites.pngindex 399a87e5af8..cb83266d3e5 100644Binary files a/apps/www/public/images/product/database/sql-view/favorites.png and b/apps/www/public/images/product/database/sql-view/favorites.png differdiff --git a/apps/www/public/images/product/database/sql-view/manaco-editor.png b/apps/www/public/images/product/database/sql-view/manaco-editor.pngdeleted file mode 100644index 872602127a9..00000000000Binary files a/apps/www/public/images/product/database/sql-view/manaco-editor.png and /dev/null differdiff --git a/apps/www/public/images/product/database/sql-view/monaco-editor-light.png b/apps/www/public/images/product/database/sql-view/monaco-editor-light.pngnew file mode 100644index 00000000000..f3b52d50800Binary files /dev/null and b/apps/www/public/images/product/database/sql-view/monaco-editor-light.png differdiff --git a/apps/www/public/images/product/database/sql-view/monaco-editor.png b/apps/www/public/images/product/database/sql-view/monaco-editor.pngnew file mode 100644index 00000000000..f6a9345f69bBinary files /dev/null and b/apps/www/public/images/product/database/sql-view/monaco-editor.png differdiff --git a/apps/www/public/images/product/database/sql-view/sql-editor-light.png b/apps/www/public/images/product/database/sql-view/sql-editor-light.pngnew file mode 100644index 00000000000..6a14ed33630Binary files /dev/null and b/apps/www/public/images/product/database/sql-view/sql-editor-light.png differdiff --git a/apps/www/public/images/product/database/sql-view/sql-editor.png b/apps/www/public/images/product/database/sql-view/sql-editor.pngindex d8c72f0041b..c811ffa51ec 100644Binary files a/apps/www/public/images/product/database/sql-view/sql-editor.png and b/apps/www/public/images/product/database/sql-view/sql-editor.png differdiff --git a/apps/www/public/images/product/database/table-view/create-table-light.png b/apps/www/public/images/product/database/table-view/create-table-light.pngnew file mode 100644index 00000000000..673bd66e347Binary files /dev/null and b/apps/www/public/images/product/database/table-view/create-table-light.png differdiff --git a/apps/www/public/images/product/database/table-view/create-table.png b/apps/www/public/images/product/database/table-view/create-table.pngdeleted file mode 100644index a049a42bba9..00000000000Binary files a/apps/www/public/images/product/database/table-view/create-table.png and /dev/null differdiff --git a/apps/www/public/images/product/database/table-view/create-tables.png b/apps/www/public/images/product/database/table-view/create-tables.pngnew file mode 100644index 00000000000..feac6147a3aBinary files /dev/null and b/apps/www/public/images/product/database/table-view/create-tables.png differdiff --git a/apps/www/public/images/product/database/table-view/export-csv-light.png b/apps/www/public/images/product/database/table-view/export-csv-light.pngnew file mode 100644index 00000000000..897b967fc53Binary files /dev/null and b/apps/www/public/images/product/database/table-view/export-csv-light.png differdiff --git a/apps/www/public/images/product/database/table-view/export-csv.png b/apps/www/public/images/product/database/table-view/export-csv.pngnew file mode 100644index 00000000000..1f3ad7f76e4Binary files /dev/null and b/apps/www/public/images/product/database/table-view/export-csv.png differdiff --git a/apps/www/public/images/product/database/table-view/export.png b/apps/www/public/images/product/database/table-view/export.pngdeleted file mode 100644index cbeb1b3688a..00000000000Binary files a/apps/www/public/images/product/database/table-view/export.png and /dev/null differdiff --git a/apps/www/public/images/product/database/table-view/foreign-keys-light.png b/apps/www/public/images/product/database/table-view/foreign-keys-light.pngnew file mode 100644index 00000000000..493077f3738Binary files /dev/null and b/apps/www/public/images/product/database/table-view/foreign-keys-light.png differdiff --git a/apps/www/public/images/product/database/table-view/foreign-keys.png b/apps/www/public/images/product/database/table-view/foreign-keys.pngindex cef5ec28c4e..908641929c4 100644Binary files a/apps/www/public/images/product/database/table-view/foreign-keys.png and b/apps/www/public/images/product/database/table-view/foreign-keys.png differdiff --git a/apps/www/public/images/product/database/table-view/spreadsheet-interface.png b/apps/www/public/images/product/database/table-view/spreadsheet-interface.pngdeleted file mode 100644index d89ac57f8ae..00000000000Binary files a/apps/www/public/images/product/database/table-view/spreadsheet-interface.png and /dev/null differdiff --git a/apps/www/public/images/product/database/table-view/spreadsheet.png b/apps/www/public/images/product/database/table-view/spreadsheet.pngnew file mode 100644index 00000000000..fec4c5fa231Binary files /dev/null and b/apps/www/public/images/product/database/table-view/spreadsheet.png differdiff --git a/apps/www/public/images/product/database/table-view/table-editor-light.png b/apps/www/public/images/product/database/table-view/table-editor-light.pngnew file mode 100644index 00000000000..4a5c405db63Binary files /dev/null and b/apps/www/public/images/product/database/table-view/table-editor-light.png differdiff --git a/apps/www/styles/globals.css b/apps/www/styles/globals.cssindex 530de50d6f1..81857aa2199 100644--- a/apps/www/styles/globals.css+++ b/apps/www/styles/globals.css@@ -13,7 +13,7 @@@source './../../../packages/marketing/src/**/*.{tsx,ts,js}';@utility section-container {- @apply mx-auto max-w-7xl px-6 lg:px-12 xl:px-24;+ @apply w-full mx-auto max-w-7xl px-6 lg:px-12 xl:px-24;}@theme {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 64e5be660a1..296b761612d 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1798,6 +1798,9 @@ importers:nuqs:specifier: ^2.8.1version: 2.8.1(@tanstack/[email protected]([email protected]([email protected]))([email protected]))([email protected](@babel/[email protected]([email protected]))(@opentelemetry/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected])+ ogl:+ specifier: ^1.0.11+ version: 1.0.11openai:specifier: ^4.75.1@@ -1846,6 +1849,9 @@ importers:shared-data:specifier: workspace:*version: link:../../packages/shared-data+ shiki:+ specifier: ^4.2.0+ version: 4.2.0swiper:specifier: ^12.1.2version: 12.1.2@@ -7252,6 +7258,10 @@ packages:resolution: {integrity: sha512-vWvqi9JNgz1dRL9Nvog5wtx7RuNkf7MEPl2mU/cyUUxJeH1CAr3t+81h8zO8zs7DK6cKLMoU9TvukWIDjP4Lzg==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-Hc87Ab1Ld/vEbZRCbwx344I5v+4RU8CVToUTRkqXL1+TjbuOp9U5Xa0M23V4GEWHxVn+yO5otb+HkQVm3ptWQQ==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-Ty7xv32XCp8u0eQt8rItpMs6rU9Ki6LJ1dQOW3V/56PKDcpvfHPnYFbsx5FFUP2Yim34m/UkazidamMNVR4vKg==}@@ -7259,6 +7269,10 @@ packages:resolution: {integrity: sha512-DJK9NiwtGYqMuKCRO4Ip0FKNDQpmaiS+K5bFjJ7DWFn4zHueDWgaUG8kAofkrnXF6zPPYYQY7J5FYVW9MbZyBg==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-fjETeq1k5ffyXqRgS6+3hpvqseLalp1kjNfRbXpUgWR8FpZ1CmQfiNHovc5lncYjt/Vg5JK/WJEmLahjwMa0og==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-O42rBGr4UDSlhT2ZFMxqM7QzIU+IcpoTMzb3W7AlziI1ZF7R8eS2M0yt5Ry35nnnTX/LTLXFPUjRFCIW+Operg==}@@ -7266,6 +7280,10 @@ packages:resolution: {integrity: sha512-oCWdCTDch3J8Kc0OZJ98KuUPC02O1VqIE3W/e2uvrHqTxYRR21RGEJMtchrgrxhsoJJCzmIciKsqG+q/yD+Cxg==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-hTorK1dffPkpbMUk6Z+828PgRo7d07HbnizoP0hNPFjhxMHctj0Px/qoHeGMYafc6ju+u9iMldN4JbVzNQM++g==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-672c3WAETDYHwrRP0yLy3W1QYB89Hbpj+pO4KhxK6FzIrDI2FoEXNiNCut6BQmEApYLfuYfpgOZaqbY+E9b8wQ==}@@ -7273,10 +7291,18 @@ packages:resolution: {integrity: sha512-v/mluaybWdnGJR4GqAR6zh8qAZohW9k+cGYT28Y7M8+jLbC0l4yG085O1A+WkseHTn+awd+P3UBymb2+MXFc8w==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-bwrVRlJ0wUhZxAbVdvBbv2TTC9yLsh4C/IO5Ofz0T8MQntgDvyVnkbjw9vi50r1kx7RCIJdnJnjZAwmAsXFLZQ==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-ns0hHZc5eWZuvuIEJz2pTx3Qecz0aRVYumVQJ8JgWY2tq/dH8WxdcVM49Fc2NsHEILNIT6vfdW9MF26RANWiTA==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-NOq+DtUkVBJtZMVXL5A0vI0Xk8nvDYaXetFHSJFlOqjDZIVhIPRYFdGkSoElDqNuegikcc3A76SNUa8dTqtAYA==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-Vxw1Nm1/Od8jyA7QuAenaV78BG2nSr3/gCGdBkLpfLscddCkzkL36Q5b67SrLLfvAJTOUzW39x4FHVCFriPVgg==}@@ -7284,6 +7310,10 @@ packages:resolution: {integrity: sha512-FW41C/D6j/yKQkzVdjrRPiJCtgeDaYRJFEyCKFCINuRJRj9WcmubhP4KQHPZ4+9eT87jruSrYPyoblNRyDFzvA==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-RX8IHYeLv8Cu2W6ruc3RxUqWn0IYCqSrMBzi/uRGAmfyDNOnNO5BF/Px7o97n4XTpmFTo5GbRaazuOWj+2ak2w==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-qGfHe1ECiqfE2STPWvfogIj/9Q0SK+MCRJdoITkW7AmFuB7DmbFnBT2US84+zklJOB51MzNO8RUXZiauWssJlQ==}@@ -7294,6 +7324,10 @@ packages:resolution: {integrity: sha512-EaygPEn57+jJ76mw+nTLvIpJMAcMPokFbrF8lufsZP7Ukk+ToJYEcswN1G0e49nUZAq7aCQtoeW219A8HK1ZOw==}engines: {node: '>=20'}+ '@shikijs/[email protected]':+ resolution: {integrity: sha512-VT/MKtlpOhEPZloSH3Pb9WCZEBDoQVMa9jedp5UAwmJOar1DVc9DRODAxmYPW9M93IK4ryuqRejFfmlvlVDemw==}+ engines: {node: '>=20'}+'@shikijs/[email protected]':resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}@@ -14079,6 +14113,9 @@ packages:resolution: {integrity: sha512-zpYTCs2byOuft65vI3z43Dd6iSdFbOZZLb9/d21aCpx2rGastVU9dOCv0lu4ykc1Ur1anAYjDi3SUvR0vq50JA==}+ resolution: {integrity: sha512-kUpC154AFfxi16pmZUK4jk3J+8zxwTWGPo03EoYA8QPbzikHoaC82n6pNTbd+oEaJonaE8aPWBlX7ad9zrqLsA==}+resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==}@@ -14116,12 +14153,18 @@ packages:resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==}+ resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==}+resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==}resolution: {integrity: sha512-3VhUGN3w2eYxnTzHn+ikMI+fp/96KoRSVK9/kMTcFqj1NRDh2IhQCKvYxDnWePKRXY/AqH+Fuiyb7VHSzBjHfA==}+ resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==}+resolution: {integrity: sha512-+GE7ywhtS6MctbfcO+vZzqIxcFzucZCwmawcwCVo89DxQDakV1JFfFViTXG4A90UzTAsU4tQteGmwDtwOlOXLw==}engines: {node: '>= 14.17.0'}@@ -15259,6 +15302,9 @@ packages:resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==}+ resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==}+resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==}hasBin: true@@ -15743,6 +15789,10 @@ packages:resolution: {integrity: sha512-EkAEhDTN5WhpoQFXFw79OHIrSAfHhlImeCdSyg4u4XvrpxKEmdo/9x/HWSowujAnUrFsGOwWiE58a6GVentMnQ==}engines: {node: '>=20'}+ resolution: {integrity: sha512-hjNax6o/ylDy9lefQEaSDtzaT3iVNtZ3WmpQnbuQNoG4xvnSKf2kSKbihZVO4JRG1TTMejs7CmNRYlWgAL66pQ==}+ engines: {node: '>=20'}+resolution: {integrity: sha512-Z0KixSIlGPpijKgcH6oCMCbltPImvaKy0sGH8AkLRXw1KyzpKtaCTizP2xen+hNDqVF4xxgvA0KXSb9o4Q6hnA==}engines: {node: '>=18'}@@ -22849,6 +22899,14 @@ snapshots:'@types/hast': 3.0.4hast-util-to-html: 9.0.5+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/primitive': 4.2.0+ '@shikijs/types': 4.2.0+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4+ hast-util-to-html: 9.0.5+'@shikijs/[email protected]':dependencies:'@shikijs/types': 3.13.0@@ -22861,6 +22919,12 @@ snapshots:'@shikijs/vscode-textmate': 10.0.2oniguruma-to-es: 4.3.4+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 4.2.0+ '@shikijs/vscode-textmate': 10.0.2+ oniguruma-to-es: 4.3.6+'@shikijs/[email protected]':dependencies:'@shikijs/types': 3.13.0@@ -22871,6 +22935,11 @@ snapshots:'@shikijs/types': 4.0.1'@shikijs/vscode-textmate': 10.0.2+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 4.2.0+ '@shikijs/vscode-textmate': 10.0.2+'@shikijs/[email protected]':dependencies:'@shikijs/types': 3.13.0@@ -22879,12 +22948,22 @@ snapshots:dependencies:'@shikijs/types': 4.0.1+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 4.2.0+'@shikijs/[email protected]':dependencies:'@shikijs/types': 4.0.1'@shikijs/vscode-textmate': 10.0.2'@types/hast': 3.0.4+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 4.2.0+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4+'@shikijs/[email protected]':dependencies:'@shikijs/types': 3.13.0@@ -22893,6 +22972,10 @@ snapshots:dependencies:'@shikijs/types': 4.0.1+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 4.2.0+'@shikijs/[email protected]':dependencies:shiki: 1.6.0@@ -22907,6 +22990,11 @@ snapshots:'@shikijs/vscode-textmate': 10.0.2'@types/hast': 3.0.4+ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4+'@shikijs/[email protected]': {}'@shuding/[email protected]':@@ -23963,7 +24051,7 @@ snapshots:srvx: 0.11.16tinyglobby: 0.2.17ufo: 1.6.4- vitefu: 1.1.1([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ vitefu: 1.1.1([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))xmlbuilder2: 4.0.3zod: 4.4.3optionalDependencies:@@ -23996,7 +24084,7 @@ snapshots:srvx: 0.11.16tinyglobby: 0.2.17ufo: 1.6.4- vitefu: 1.1.1([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ vitefu: 1.1.1([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))xmlbuilder2: 4.0.3zod: 4.4.3optionalDependencies:@@ -31403,6 +31491,8 @@ snapshots:+ [email protected]: {}+@@ -31435,6 +31525,8 @@ snapshots:+ [email protected]: {}+dependencies:oniguruma-parser: 0.12.1@@ -31447,6 +31539,12 @@ snapshots:regex: 6.0.1regex-recursion: 6.0.2+ dependencies:+ oniguruma-parser: 0.12.2+ regex: 6.1.0+ regex-recursion: 6.0.2+@@ -32755,6 +32853,10 @@ snapshots:dependencies:regex-utilities: 2.3.0+ dependencies:+ regex-utilities: 2.3.0+@@ -33488,6 +33590,17 @@ snapshots:'@shikijs/vscode-textmate': 10.0.2'@types/hast': 3.0.4+ dependencies:+ '@shikijs/core': 4.2.0+ '@shikijs/engine-javascript': 4.2.0+ '@shikijs/engine-oniguruma': 4.2.0+ '@shikijs/langs': 4.2.0+ '@shikijs/themes': 4.2.0+ '@shikijs/types': 4.2.0+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4+dependencies:minimist: 1.2.8@@ -34917,7 +35030,7 @@ snapshots:tsx: 4.22.4yaml: 2.9.0- [email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):+ [email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):optionalDependencies:vite: 8.0.16(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])