Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Cleanup duplicate nav constants

Terry Suttonfcd431a3963d
diff --git a/apps/docs/components/Navigation/NavBar.tsx b/apps/docs/components/Navigation/NavBar.tsx
deleted file mode 100644
index eb7ee10434f..00000000000
--- a/apps/docs/components/Navigation/NavBar.tsx
+++ /dev/null
@@ -1,207 +0,0 @@
-import { useTheme } from 'common/Providers'
-import Image from 'next/image'
-import Link from 'next/link'
-import { useRouter } from 'next/router'
-import { FC, useEffect, useState } from 'react'
-import { IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Listbox, SearchButton } from 'ui'
-import { REFERENCES } from './Navigation.constants'
-
-import { getPageType } from '~/lib/helpers'
-
-const NavBar: FC = () => {
- const { isDarkMode, toggleTheme } = useTheme()
- const [mounted, setMounted] = useState(false)
- const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
-
- const { asPath, push } = useRouter()
- const pathSegments = asPath.split('/')
-
- const library = pathSegments.length >= 3 ? pathSegments[2] : undefined
- const libraryMeta = REFERENCES?.[library] ?? undefined
- const versions = libraryMeta?.versions ?? []
-
- const version = versions.includes(pathSegments[pathSegments.indexOf(library) + 1])
- ? pathSegments[pathSegments.indexOf(library) + 1]
- : versions[0]
-
- const pageType = getPageType(asPath)
-
- useEffect(() => {
- setMounted(true)
- }, [isDarkMode])
-
- const pageLinks = [
- { text: 'Guides', key: 'docs', link: '/' },
- { text: 'Reference', key: 'reference', link: '/reference' },
- ]
-
- const onSelectVersion = (version: string) => {
- // [Joshen] Ideally we use <Link> but this works for now
- if (!library) return
- if (version === versions[0]) {
- push(`/reference/${library}`)
- } else {
- push(`/reference/${library}/${version}`)
- }
- }
-
- // [Joshen] Kaizen: Use UI library's SidePanel for this
- const toggleMobileMenu = () => {
- setMobileMenuOpen(!mobileMenuOpen)
- const sidebar = document.querySelector('.sidebar-menu-container')
- const contentPane = document.querySelector('.main-content-pane')
-
- sidebar.classList.toggle('hidden')
- contentPane.classList.toggle('hidden')
- }
-
- return (
- <nav
- className={[
- 'sticky top-0 z-10 flex items-center justify-between',
- 'h-[60px] border-b bg-white px-4 backdrop-blur backdrop-filter',
- 'dark:border-scale-400 dark:bg-scale-200',
- ].join(' ')}
- >
- <div className="flex items-center">
- <button className="mr-4 block stroke-2 lg:hidden" onClick={toggleMobileMenu}>
- <IconMenu className="text-scale-1100" />
- </button>
- {mounted && (
- <Link href="/">
- <a className="flex items-center">
- <Image
- className="cursor-pointer"
- src={isDarkMode ? '/docs/supabase-dark.svg' : '/docs/supabase-light.svg'}
- width={124}
- height={24}
- alt="Supabase Logo"
- />
- </a>
- </Link>
- )}
- <nav className="ml-8 hidden lg:flex">
- <ul className="hidden space-x-8 lg:flex">
- {pageLinks.map((p) => (
- <li key={`${p.text}-${p.link}`}>
- <Link href={p.link}>
- <a
- className={`text-sm ${
- pageType.includes(p.key) ? 'text-brand-900' : 'text-scale-1100'
- }`}
- >
- {p.text}
- </a>
- </Link>
- </li>
- ))}
- </ul>
- </nav>
- {versions.length > 0 && (
- <div className="ml-8">
- <Listbox
- size="small"
- defaultValue={version}
- style={{ width: '70px' }}
- onChange={onSelectVersion}
- >
- {versions.map((version) => (
- <Listbox.Option key={version} label={version} value={version}>
- {version}
- </Listbox.Option>
- ))}
- </Listbox>
- </div>
- )}
- </div>
-
- <div className="flex items-center space-x-4">
- <div className="hidden items-center md:flex">
- <ul className="flex items-center">
- <li className="px-4">
- <a
- href="https://app.supabase.com"
- className="text-scale-1100 text-sm"
- target="_blank"
- rel="noreferrer noopener"
- >
- Dashboard
- </a>
- </li>
- <li className="px-4">
- <a
- href="https://github.com/supabase/supabase"
- target="_blank"
- rel="noreferrer noopener"
- >
- <div
- className="h-4 w-4 !bg-no-repeat !bg-center"
- style={{
- background: isDarkMode
- ? "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E\") 50% no-repeat"
- : "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E\")",
- }}
- />
- </a>
- </li>
- <li className="px-4">
- <a
- href="https://discord.supabase.com"
- rel="noreferrer noopener"
- target="_blank"
- className="text-scale-1100"
- >
- <div
- className="h-4 w-4 !bg-no-repeat !bg-center"
- style={{
- background: isDarkMode
- ? "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 71 55' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M60.105 4.898A58.55 58.55 0 0 0 45.653.415a.22.22 0 0 0-.233.11 40.784 40.784 0 0 0-1.8 3.697c-5.456-.817-10.886-.817-16.23 0-.485-1.164-1.201-2.587-1.828-3.697a.228.228 0 0 0-.233-.11 58.386 58.386 0 0 0-14.451 4.483.207.207 0 0 0-.095.082C1.578 18.73-.944 32.144.293 45.39a.244.244 0 0 0 .093.167c6.073 4.46 11.955 7.167 17.729 8.962a.23.23 0 0 0 .249-.082 42.08 42.08 0 0 0 3.627-5.9.225.225 0 0 0-.123-.312 38.772 38.772 0 0 1-5.539-2.64.228.228 0 0 1-.022-.378c.372-.279.744-.569 1.1-.862a.22.22 0 0 1 .23-.03c11.619 5.304 24.198 5.304 35.68 0a.219.219 0 0 1 .233.027c.356.293.728.586 1.103.865a.228.228 0 0 1-.02.378 36.384 36.384 0 0 1-5.54 2.637.227.227 0 0 0-.121.315 47.249 47.249 0 0 0 3.624 5.897.225.225 0 0 0 .249.084c5.801-1.794 11.684-4.502 17.757-8.961a.228.228 0 0 0 .092-.164c1.48-15.315-2.48-28.618-10.497-40.412a.18.18 0 0 0-.093-.084Zm-36.38 32.427c-3.497 0-6.38-3.211-6.38-7.156 0-3.944 2.827-7.156 6.38-7.156 3.583 0 6.438 3.24 6.382 7.156 0 3.945-2.827 7.156-6.381 7.156Zm23.593 0c-3.498 0-6.38-3.211-6.38-7.156 0-3.944 2.826-7.156 6.38-7.156 3.582 0 6.437 3.24 6.38 7.156 0 3.945-2.798 7.156-6.38 7.156Z' fill='%23fff'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h71v55H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\") 50% no-repeat"
- : "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 71 55' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M60.105 4.898A58.55 58.55 0 0 0 45.653.415a.22.22 0 0 0-.233.11 40.784 40.784 0 0 0-1.8 3.697c-5.456-.817-10.886-.817-16.23 0-.485-1.164-1.201-2.587-1.828-3.697a.228.228 0 0 0-.233-.11 58.386 58.386 0 0 0-14.451 4.483.207.207 0 0 0-.095.082C1.578 18.73-.944 32.144.293 45.39a.244.244 0 0 0 .093.167c6.073 4.46 11.955 7.167 17.729 8.962a.23.23 0 0 0 .249-.082 42.08 42.08 0 0 0 3.627-5.9.225.225 0 0 0-.123-.312 38.772 38.772 0 0 1-5.539-2.64.228.228 0 0 1-.022-.378c.372-.279.744-.569 1.1-.862a.22.22 0 0 1 .23-.03c11.619 5.304 24.198 5.304 35.68 0a.219.219 0 0 1 .233.027c.356.293.728.586 1.103.865a.228.228 0 0 1-.02.378 36.384 36.384 0 0 1-5.54 2.637.227.227 0 0 0-.121.315 47.249 47.249 0 0 0 3.624 5.897.225.225 0 0 0 .249.084c5.801-1.794 11.684-4.502 17.757-8.961a.228.228 0 0 0 .092-.164c1.48-15.315-2.48-28.618-10.497-40.412a.18.18 0 0 0-.093-.084Zm-36.38 32.427c-3.497 0-6.38-3.211-6.38-7.156 0-3.944 2.827-7.156 6.38-7.156 3.583 0 6.438 3.24 6.382 7.156 0 3.945-2.827 7.156-6.381 7.156Zm23.593 0c-3.498 0-6.38-3.211-6.38-7.156 0-3.944 2.826-7.156 6.38-7.156 3.582 0 6.437 3.24 6.38 7.156 0 3.945-2.798 7.156-6.38 7.156Z' fill='%2323272A'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h71v55H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\")",
- }}
- />
- </a>
- </li>
- <li className="px-4">
- <a href="https://twitter.com/supabase" target="_blank" rel="noreferrer noopener">
- <div
- className="h-4 w-4 !bg-no-repeat !bg-center"
- style={{
- background: isDarkMode
- ? "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 335 276' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M302 70A195 195 0 0 1 3 245a142 142 0 0 0 97-30 70 70 0 0 1-58-47 70 70 0 0 0 31-2 70 70 0 0 1-57-66 70 70 0 0 0 28 5 70 70 0 0 1-18-90 195 195 0 0 0 141 72 67 67 0 0 1 116-62 117 117 0 0 0 43-17 65 65 0 0 1-31 38 117 117 0 0 0 39-11 65 65 0 0 1-32 35'/%3E%3C/svg%3E\") 50% no-repeat"
- : "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 335 276' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M302 70A195 195 0 0 1 3 245a142 142 0 0 0 97-30 70 70 0 0 1-58-47 70 70 0 0 0 31-2 70 70 0 0 1-57-66 70 70 0 0 0 28 5 70 70 0 0 1-18-90 195 195 0 0 0 141 72 67 67 0 0 1 116-62 117 117 0 0 0 43-17 65 65 0 0 1-31 38 117 117 0 0 0 39-11 65 65 0 0 1-32 35'/%3E%3C/svg%3E\")",
- }}
- />
- </a>
- </li>
- <li className="px-4">
- <div className="cursor-pointer" onClick={() => toggleTheme()}>
- {isDarkMode ? (
- <IconMoon size={18} strokeWidth={2} className="text-scale-1200" />
- ) : (
- <IconSun size={18} strokeWidth={2} className="text-scale-1200" />
- )}
- </div>
- </li>
- </ul>
- </div>
- <SearchButton>
- <div className="flex items-center justify-between space-x-6 bg-scale-300 border border-scale-700 pl-3 pr-1.5 py-1.5 rounded">
- <div className="flex items-center space-x-2">
- <IconSearch className="text-scale-1100" size={18} strokeWidth={2} />
- <p className="text-scale-800 text-sm">Search</p>
- </div>
- <div className="flex items-center space-x-1">
- <div className="hidden text-scale-1200 md:flex items-center justify-center h-6 w-6 rounded bg-scale-500">
- <IconCommand size={12} strokeWidth={1.5} />
- </div>
- <div className="hidden text-xs text-scale-1200 md:flex items-center justify-center h-6 w-6 rounded bg-scale-500">
- K
- </div>
- </div>
- </div>
- </SearchButton>
- </div>
- </nav>
- )
-}
-export default NavBar
diff --git a/apps/docs/components/Navigation/Navigation.constants.ts b/apps/docs/components/Navigation/Navigation.constants.ts
deleted file mode 100644
index f3b9ee85430..00000000000
--- a/apps/docs/components/Navigation/Navigation.constants.ts
+++ /dev/null
@@ -1,431 +0,0 @@
-// [Terry] Also need to look at getPageType() in ./lib/helpers
-// to set a menu to a page
-import SupabaseJsV1Nav from 'data/nav/supabase-js/v1'
-import SupabaseJsV2Nav from 'data/nav/supabase-js/v2'
-import SupabaseDartV0Nav from 'data/nav/supabase-dart/v0'
-import SupabaseDartV1Nav from 'data/nav/supabase-dart/v1'
-import SupabaseCLINav from 'data/nav/supabase-cli'
-import SupabaseAPINav from 'data/nav/supabase-api'
-import AuthServerNav from 'data/nav/auth-server'
-import RealtimeServerNav from 'data/nav/realtime-server'
-import StorageServerNav from 'data/nav/storage-server'
-
-import { NavMenu, References } from './Navigation.types'
-
-export const REFERENCES: References = {
- javascript: {
- name: 'supabase-js',
- library: 'supabase-js',
- versions: ['v2', 'v1'],
- icon: '/docs/img/icons/javascript-icon.svg',
- },
- dart: {
- name: 'Flutter',
- library: 'supabase-dart',
- versions: ['v1', 'v0'],
- icon: '/docs/img/icons/flutter-icon.svg',
- },
- cli: {
- name: 'CLI',
- library: undefined,
- versions: [],
- icon: '/docs/img/icons/cli-icon.svg',
- },
- api: {
- name: 'API',
- library: undefined,
- versions: [],
- icon: '/docs/img/icons/api-icon.svg',
- },
-}
-
-export const menuItems: NavMenu = {
- docs: [
- {
- label: 'Overview',
- items: [
- { name: 'Introduction', url: '/', items: [] },
- { name: 'Features', url: '/features', items: [] },
- { name: 'Architecture', url: '/architecture', items: [] },
- ],
- },
- {
- label: 'Quickstarts',
- items: [
- { name: 'Angular', url: '/guides/with-angular', items: [] },
- { name: 'Expo', url: '/guides/with-expo', items: [] },
- { name: 'Flutter', url: '/guides/with-flutter', items: [] },
- { name: 'Ionic Angular', url: '/guides/with-ionic-angular', items: [] },
- { name: 'Ionic React', url: '/guides/with-ionic-react', items: [] },
- { name: 'Ionic Vue', url: '/guides/with-ionic-vue', items: [] },
- { name: 'Next.js', url: '/guides/with-nextjs', items: [] },
- { name: 'Nuxt 3', url: '/guides/with-nuxt-3', items: [] },
- { name: 'React', url: '/guides/with-react', items: [] },
- { name: 'RedwoodJS', url: '/guides/with-redwoodjs', items: [] },
- { name: 'SolidJS', url: '/guides/with-solidjs', items: [] },
- { name: 'Svelte', url: '/guides/with-svelte', items: [] },
- { name: 'SvelteKit', url: '/guides/with-sveltekit', items: [] },
- { name: 'Vue 3', url: '/guides/with-vue-3', items: [] },
- ],
- },
- {
- label: 'CLI',
- items: [
- { name: 'Overview', url: '/guides/cli', items: [] },
- { name: 'Local Development', url: '/guides/cli/local-development', items: [] },
- { name: 'Managing Environments', url: '/guides/cli/managing-environments', items: [] },
- ],
- },
- {
- label: 'Auth',
- items: [
- { name: 'Overview', url: '/guides/auth', items: [] },
- { name: 'Quickstarts', url: '/guides/auth/quickstarts/react', items: [] },
- {
- name: 'Authentication',
- url: undefined,
- items: [
- { name: 'Login with Email', url: '/guides/auth/auth-email', items: [] },
- { name: 'Login with Magic Link', url: '/guides/auth/auth-magic-link', items: [] },
- { name: 'Login with Apple', url: '/guides/auth/auth-apple', items: [] },
- { name: 'Login with Azure', url: '/guides/auth/auth-azure', items: [] },
- { name: 'Login with Bitbucket', url: '/guides/auth/auth-bitbucket', items: [] },
- { name: 'Login with Discord', url: '/guides/auth/auth-discord', items: [] },
- { name: 'Login with Facebook', url: '/guides/auth/auth-facebook', items: [] },
- { name: 'Login with Github', url: '/guides/auth/auth-github', items: [] },
- { name: 'Login with Gitlab', url: '/guides/auth/auth-gitlab', items: [] },
- { name: 'Login with Google', url: '/guides/auth/auth-google', items: [] },
- { name: 'Login with Keycloak', url: '/guides/auth/auth-keycloak', items: [] },
- { name: 'Login with LinkedIn', url: '/guides/auth/auth-linkedin', items: [] },
- { name: 'Login with Notion', url: '/guides/auth/auth-notion', items: [] },
- { name: 'Login with Slack', url: '/guides/auth/auth-slack', items: [] },
- { name: 'Login with Spotify', url: '/guides/auth/auth-spotify', items: [] },
- { name: 'Login with Twitch', url: '/guides/auth/auth-twitch', items: [] },
- { name: 'Login with Twitter', url: '/guides/auth/auth-twitter', items: [] },
- { name: 'Login with WorkOS', url: '/guides/auth/auth-workos', items: [] },
- { name: 'Login with Zoom', url: '/guides/auth/auth-zoom', items: [] },
- { name: 'Phone Auth with Twilio', url: '/guides/auth/auth-twilio', items: [] },
- { name: 'Phone Auth with Vonage', url: '/guides/auth/auth-vonage', items: [] },
- {
- name: 'Phone Auth with MessageBird',
- url: '/guides/auth/auth-messagebird',
- items: [],
- },
- ],
- },
- {
- name: 'Authorization',
- url: undefined,
- items: [
- { name: 'Row Level Security', url: '/guides/auth/row-level-security', items: [] },
- { name: 'Managing User Data', url: '/guides/auth/managing-user-data', items: [] },
- { name: 'Enable Captcha Protection', url: '/guides/auth/auth-captcha', items: [] },
- { name: 'Server-side Rendering', url: '/guides/auth/server-side-rendering', items: [] },
- { name: 'Multi-Factor Authentication', url: '/guides/auth/auth-mfa', items: [] },
- ],
- },
- {
- name: 'Auth Helpers',
- url: undefined,
- items: [
- { name: 'Overview', url: '/guides/auth/auth-helpers', items: [] },
- { name: 'Auth UI', url: '/guides/auth/auth-helpers/auth-ui', items: [] },
- { name: 'Next.js (pages)', url: '/guides/auth/auth-helpers/nextjs', items: [] },
- {
- name: 'Next.js (app)',
- url: '/guides/auth/auth-helpers/nextjs-server-components',
- items: [],
- },
- { name: 'SvelteKit', url: '/guides/auth/auth-helpers/sveltekit', items: [] },
- { name: 'Remix', url: '/guides/auth/auth-helpers/remix', items: [] },
- ],
- },
- {
- name: 'Deep Dive',
- url: undefined,
- items: [
- {
- name: 'Part One: JWTs',
- url: '/learn/auth-deep-dive/auth-deep-dive-jwts',
- items: [],
- },
- {
- name: 'Part Two: Row Level Security',
- url: '/learn/auth-deep-dive/auth-row-level-security',
- items: [],
- },
- { name: 'Part Three: Policies', url: '/learn/auth-deep-dive/auth-policies', items: [] },
- { name: 'Part Four: GoTrue', url: '/learn/auth-deep-dive/auth-gotrue', items: [] },
- {
- name: 'Part Five: Google OAuth',
- url: '/learn/auth-deep-dive/auth-google-oauth',
- items: [],
- },
- ],
- },
- ],
- },
- {
- label: 'Database',
- items: [
- { name: 'Overview', url: '/guides/database', items: [] },
- { name: 'Database Connections', url: '/guides/database/connecting-to-postgres', items: [] },
- { name: 'Tables and Data', url: '/guides/database/tables', items: [] },
- { name: 'Database Functions', url: '/guides/database/functions', items: [] },
- { name: 'Database Webhooks', url: '/guides/database/webhooks', items: [] },
- { name: 'Full Text Search', url: '/guides/database/full-text-search', items: [] },
- { name: 'Database Testing', url: '/guides/database/testing', items: [] },
- {
- name: 'Extensions',
- url: undefined,
- items: [
- { name: 'Overview', url: '/guides/database/extensions', items: [] },
- { name: 'http: RESTful Client', url: '/guides/database/extensions/http', items: [] },
- {
- name: 'pg_cron: Job Scheduling',
- url: '/guides/database/extensions/pgcron',
- items: [],
- },
- {
- name: 'pg_net: Async Networking',
- url: '/guides/database/extensions/pgnet',
- items: [],
- },
- { name: 'pgTAP: Unit Testing', url: '/guides/database/extensions/pgtap', items: [] },
- {
- name: 'plv8: Javascript Language',
- url: '/guides/database/extensions/plv8',
- items: [],
- },
- {
- name: 'PostGIS: Geo queries',
- url: '/guides/database/extensions/postgis',
- items: [],
- },
- {
- name: 'uuid-ossp: Unique Identifiers',
- url: '/guides/database/extensions/uuid-ossp',
- items: [],
- },
- ],
- },
- {
- name: 'Configuration',
- url: undefined,
- items: [
- { name: 'Timeouts', url: '/guides/database/timeouts', items: [] },
- { name: 'Replication', url: '/guides/database/replication', items: [] },
- { name: 'Passwords', url: '/guides/database/managing-passwords', items: [] },
- { name: 'Timezones', url: '/guides/database/managing-timezones', items: [] },
- ],
- },
- ],
- },
- {
- label: 'Serverless APIs',
- items: [
- { name: 'Overview', url: '/guides/api', items: [] },
- { name: 'Generating Types', url: '/guides/api/generating-types', items: [] },
- ],
- },
- {
- label: 'Edge Functions',
- items: [
- { name: 'Overview', url: '/guides/functions', items: [] },
- { name: 'Quickstart', url: '/guides/functions/quickstart', items: [] },
- { name: 'Auth', url: '/guides/functions/auth', items: [] },
- { name: 'Best Practices', url: '/guides/functions/best-practices', items: [] },
- { name: 'CI/CD Workflow', url: '/guides/functions/cicd-workflow', items: [] },
- ],
- },
- {
- label: 'Realtime',
- items: [
- {
- name: 'Overview',
- url: '/guides/realtime',
- items: [],
- },
- {
- name: 'Quickstart',
- url: '/guides/realtime/quickstart',
- items: [],
- },
- {
- name: 'Features',
- url: undefined,
- items: [
- { name: 'Channels', url: '/guides/realtime/channels', items: [] },
- {
- name: 'Extensions',
- url: '/guides/realtime/extensions',
- items: [
- { name: 'Broadcast', url: '/guides/realtime/broadcast', items: [] },
- { name: 'Presence', url: '/guides/realtime/presence', items: [] },
- { name: 'Postgres Changes', url: '/guides/realtime/postgres-changes', items: [] },
- ],
- },
- ],
- },
- {
- name: 'Guides',
- url: undefined,
- items: [
- {
- name: 'Subscribing to Database Changes',
- url: '/guides/realtime/subscribing-to-database-changes',
- items: [],
- },
- {
- name: 'Bring Your Own Database',
- url: '/guides/realtime/bring-your-own-database',
- items: [],
- },
- {
- name: 'Using Realtime with Next.js',
- url: '/guides/realtime/realtime-with-nextjs',
- items: [],
- },
- ],
- },
- {
- name: 'Deep dive',
- url: undefined,
- items: [
- { name: 'Rate Limits', url: '/guides/realtime/rate-limits', items: [] },
- { name: 'Architecture', url: '/guides/realtime/architecture', items: [] },
- { name: 'Protocol', url: '/guides/realtime/protocol', items: [] },
- ],
- },
- ],
- },
- {
- label: 'Storage',
- items: [
- { name: 'Overview', url: '/guides/storage', items: [] },
- { name: 'Quickstart', url: '/guides/storage/quickstart', items: [] },
- { name: 'Access Control', url: '/guides/storage/access-control', items: [] },
- { name: 'CDN', url: '/guides/storage/cdn', items: [] },
- { name: 'Image Transformations', url: '/guides/storage/image-transformations', items: [] },
- ],
- },
- {
- label: 'Platform',
- items: [
- { name: 'Overview', url: '/guides/platform', items: [] },
- { name: 'Compute Add-ons', url: '/guides/platform/compute-add-ons', items: [] },
- { name: 'Custom Domains', url: '/guides/platform/custom-domains', items: [] },
- { name: 'Database Usage', url: '/guides/platform/database-usage', items: [] },
- { name: 'HTTP Status Codes', url: '/guides/platform/http-status-codes', items: [] },
- { name: 'Logging', url: '/guides/platform/logs', items: [] },
- { name: 'Metrics', url: '/guides/platform/metrics', items: [] },
- {
- name: 'Migrating and upgrading',
- url: '/guides/platform/migrating-and-upgrading-projects',
- items: [],
- },
- { name: 'Network Restrictions', url: '/guides/platform/network-restrictions', items: [] },
- { name: 'Performance Tuning', url: '/guides/platform/performance', items: [] },
- { name: 'Permissions', url: '/guides/platform/permissions', items: [] },
- { name: 'Production Readiness', url: '/guides/platform/going-into-prod', items: [] },
- { name: 'SSL Enforcement', url: '/guides/platform/ssl-enforcement', items: [] },
- { name: 'Troubleshooting', url: '/guides/platform/troubleshooting', items: [] },
- ],
- },
- {
- label: 'Self Hosting',
- items: [
- { name: 'Overview', url: '/guides/hosting/overview', items: [] },
- { name: 'Docker', url: '/guides/hosting/docker', items: [] },
- ],
- },
- {
- label: 'Migrate to Supabase',
- items: [
- { name: 'Firebase Auth', url: '/guides/migrations/firebase-auth', items: [] },
- { name: 'Firestore Data', url: '/guides/migrations/firestore-data', items: [] },
- { name: 'Firebase Storage', url: '/guides/migrations/firebase-storage', items: [] },
- { name: 'Heroku', url: '/guides/migrations/heroku', items: [] },
- ],
- },
- {
- label: 'Integrations',
- items: [
- { name: 'Supabase Marketplace', url: '/guides/integrations/integrations', items: [] },
- {
- name: 'Auth',
- url: undefined,
- items: [
- { name: 'Auth0', url: '/guides/integrations/auth0', items: [] },
- { name: 'Authsignal', url: '/guides/integrations/authsignal', items: [] },
- { name: 'Clerk', url: '/guides/integrations/clerk', items: [] },
- { name: 'keyri', url: '/guides/integrations/keyri', items: [] },
- { name: 'Picket', url: '/guides/integrations/picket', items: [] },
- { name: 'Stytch', url: '/guides/integrations/stytch', items: [] },
- { name: 'SuperTokens', url: '/guides/integrations/supertokens', items: [] },
- ],
- },
- {
- name: 'Caching / Offline-first',
- url: undefined,
- items: [{ name: 'Polyscale', url: '/guides/integrations/polyscale', items: [] }],
- },
- {
- name: 'Developer Tools',
- url: undefined,
- items: [
- { name: 'Estuary', url: '/guides/integrations/estuary', items: [] },
- { name: 'pgMustard', url: '/guides/integrations/pgmustard', items: [] },
- { name: 'Prisma', url: '/guides/integrations/prisma', items: [] },
- { name: 'Sequin', url: '/guides/integrations/sequin', items: [] },
- { name: 'Snaplet', url: '/guides/integrations/snaplet', items: [] },
- { name: 'Vercel', url: '/guides/integrations/vercel', items: [] },
- { name: 'Zuplo', url: '/guides/integrations/zuplo', items: [] },
- ],
- },
- {
- name: 'Low-code',
- url: undefined,
- items: [
- { name: 'Appsmith', url: '/guides/integrations/appsmith', items: [] },
- { name: 'DhiWise', url: '/guides/integrations/dhiwise', items: [] },
- { name: 'Directus', url: '/guides/integrations/directus', items: [] },
- { name: 'Draftbit', url: '/guides/integrations/draftbit', items: [] },
- { name: 'Plasmic', url: '/guides/integrations/plasmic', items: [] },
- { name: 'WeWeb', url: '/guides/integrations/weweb', items: [] },
- { name: 'ILLA', url: '/guides/integrations/illa', items: [] },
- ],
- },
- ],
- },
- ],
- reference: [
- {
- label: 'Official',
- items: [
- { name: 'Reference Documentation', url: '/reference', items: [] },
- { name: 'Supabase JavaScript Library', url: '/reference/javascript', items: [] },
- { name: 'Supabase Flutter Library', url: '/reference/dart', items: [] },
- { name: 'Supabase CLI', url: '/reference/cli', items: [] },
- { name: 'Management API', url: '/reference/api', items: [] },
- ],
- },
- {
- label: 'Self-hosting',
- items: [
- { name: 'Auth Server', url: '/reference/auth', items: [] },
- { name: 'Realtime Server', url: '/reference/realtime', items: [] },
- { name: 'Storage Server', url: '/reference/storage', items: [] },
- ],
- },
- ],
- 'reference/javascript': SupabaseJsV2Nav,
- 'reference/javascript/v1': SupabaseJsV1Nav,
- 'reference/dart': SupabaseDartV1Nav,
- 'reference/dart/v0': SupabaseDartV0Nav,
- 'reference/cli': SupabaseCLINav,
- 'reference/api': SupabaseAPINav,
- 'reference/auth': AuthServerNav,
- 'reference/realtime': RealtimeServerNav,
- 'reference/storage': StorageServerNav,
-}
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 3cfece03ebd..c4739ffc3ab 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -1,13 +1,4 @@
-// import SupabaseJsV1Nav from 'data/nav/supabase-js/v1'
-// import SupabaseJsV2Nav from 'data/nav/supabase-js/v2'
-// import SupabaseDartV0Nav from 'data/nav/supabase-dart/v0'
-// import SupabaseDartV1Nav from 'data/nav/supabase-dart/v1'
-// import SupabaseCLINav from 'data/nav/supabase-cli'
-// import SupabaseAPINav from 'data/nav/supabase-api'
-// import AuthServerNav from 'data/nav/auth-server'
-// import StorageServerNav from 'data/nav/storage-server'
-
-import { NavMenu, References } from '../Navigation.types'
+import { References } from '../Navigation.types'
export const REFERENCES: References = {
javascript: {
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx
index 285c63bcf09..22a7d049827 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx
@@ -4,7 +4,6 @@ import Link from 'next/link'
import { useRouter } from 'next/router'
import React from 'react'
import { IconChevronLeft } from '~/../../packages/ui'
-import * as NavItems from './NavigationMenu.constants'
import * as Accordion from '@radix-ui/react-accordion'
const HeaderImage = React.memo(function HeaderImage(props: any) {
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
index 270269d5085..3ade00aad45 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
@@ -13,9 +13,7 @@ import {
Listbox,
SearchButton,
} from 'ui'
-import { REFERENCES } from '~/components/Navigation/Navigation.constants'
-
-import { getPageType } from '~/lib/helpers'
+import { REFERENCES } from './NavigationMenu.constants'
const TopNavBar: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
@@ -33,17 +31,10 @@ const TopNavBar: FC = () => {
? pathSegments[pathSegments.indexOf(library) + 1]
: versions[0]
- const pageType = getPageType(asPath)
-
useEffect(() => {
setMounted(true)
}, [isDarkMode])
- const pageLinks = [
- { text: 'Guides', key: 'docs', link: '/' },
- { text: 'Reference', key: 'reference', link: '/reference' },
- ]
-
const onSelectVersion = (version: string) => {
// [Joshen] Ideally we use <Link> but this works for now
if (!library) return
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
index cb2fb196c8b..6a56ee7d544 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
@@ -4,9 +4,9 @@ import Link from 'next/link'
import { useRouter } from 'next/router'
import { FC, useEffect, useState } from 'react'
import { Button, IconCommand, IconGitHub, IconMoon, IconSearch, IconSun, SearchButton } from 'ui'
-import { REFERENCES } from '~/components/Navigation/Navigation.constants'
import { getPageType } from '~/lib/helpers'
+import { REFERENCES } from './NavigationMenu.constants'
const TopNavBarRef: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
diff --git a/apps/docs/components/Navigation/SideBar.tsx b/apps/docs/components/Navigation/SideBar.tsx
index d6ffa3473b9..d679b7c7414 100644
--- a/apps/docs/components/Navigation/SideBar.tsx
+++ b/apps/docs/components/Navigation/SideBar.tsx
@@ -2,7 +2,8 @@ import Link from 'next/link'
import Image from 'next/image'
import { useRouter } from 'next/router'
import { IconChevronRight, IconArrowLeft } from '~/../../packages/ui'
-import { REFERENCES } from './Navigation.constants'
+import { REFERENCES } from './NavigationMenu/NavigationMenu.constants'
+
import { NavMenuGroup, NavMenuSection } from './Navigation.types'
import * as Accordion from '@radix-ui/react-accordion'
diff --git a/apps/docs/lib/docs.ts b/apps/docs/lib/docs.ts
index daa0f83d6bd..2ae4f8dfe80 100644
--- a/apps/docs/lib/docs.ts
+++ b/apps/docs/lib/docs.ts
@@ -2,7 +2,7 @@ import fs from 'fs'
import { join } from 'path'
import matter from 'gray-matter'
import nonGeneratedReferencePages from 'data/nonGeneratedReferencePages'
-import { REFERENCES } from 'components/Navigation/Navigation.constants'
+import { REFERENCES } from '~/components/Navigation/NavigationMenu/NavigationMenu.constants'
const docsDirectory = process.cwd()