From eb0a124ee17f04a198bdc817c091e47e992fd282 Mon Sep 17 00:00:00 2001 From: Greg Richardson Date: Tue, 21 Mar 2023 13:13:04 -0600 Subject: [PATCH 01/12] chore(docs): adds redirect from root to /docs --- apps/docs/next.config.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 777b2e2224a..b3c71cae82e 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -80,6 +80,16 @@ const nextConfig = { }, ] }, + async redirects() { + return [ + { + source: '/', + destination: '/docs', + basePath: false, + permanent: false, + }, + ] + }, } // next.config.js From 1b755c97133c076d4fc6b47b3b97d82441c4933e Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Thu, 23 Mar 2023 12:26:11 +0800 Subject: [PATCH 02/12] move guides and fix accordion issue --- .../NavigationMenu/NavigationMenu.constants.ts | 10 +++++++--- .../Navigation/NavigationMenu/NavigationMenu.tsx | 6 +++++- .../NavigationMenu/NavigationMenuGuideList.tsx | 14 +++++++++----- .../NavigationMenuGuideListItems.tsx | 4 +--- .../guides/realtime/{ => extensions}/broadcast.mdx | 0 .../realtime/{ => extensions}/postgres-changes.mdx | 0 .../guides/realtime/{ => extensions}/presence.mdx | 0 7 files changed, 22 insertions(+), 12 deletions(-) rename apps/docs/pages/guides/realtime/{ => extensions}/broadcast.mdx (100%) rename apps/docs/pages/guides/realtime/{ => extensions}/postgres-changes.mdx (100%) rename apps/docs/pages/guides/realtime/{ => extensions}/presence.mdx (100%) diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index f677f5ebc76..240e34fdf32 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -621,9 +621,13 @@ export const realtime = { 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: 'Broadcast', url: '/guides/realtime/extensions/broadcast', items: [] }, + { name: 'Presence', url: '/guides/realtime/extensions/presence', items: [] }, + { + name: 'Postgres Changes', + url: '/guides/realtime/extensions/postgres-changes', + items: [], + }, ], }, ], diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx index 13b70ac1e2e..e585077975f 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx @@ -205,7 +205,11 @@ const NavigationMenu = () => { - + diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx index c08f6d9f061..28c235ca641 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx @@ -2,15 +2,19 @@ import * as Accordion from '@radix-ui/react-accordion' import { useRouter } from 'next/router' import React from 'react' import NavigationMenuGuideListItems from './NavigationMenuGuideListItems' +import * as NavItems from './NavigationMenu.constants' interface Props { id: string active: boolean collapsible?: boolean + value?: string[] } -const NavigationMenuGuideList: React.FC = ({ id, active, collapsible = true }) => { +const NavigationMenuGuideList: React.FC = ({ id, active, value }) => { const router = useRouter() + const menu = NavItems[id] + // get url const url = router.asPath @@ -27,10 +31,10 @@ const NavigationMenuGuideList: React.FC = ({ id, active, collapsible = tr return ( = ({ id, active, collapsible = tr !active ? 'opacity-0 invisible absolute h-0 overflow-hidden' : '', ].join(' ')} > - + ) } diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx index ee9bbf30f38..169d6a8f326 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideListItems.tsx @@ -143,9 +143,7 @@ const ContentLink = React.memo(function ContentLink(props: any) { }) const Content = (props) => { - const { id } = props - - const menu = NavItems[id] + const { menu, id } = props return (
    diff --git a/apps/docs/pages/guides/realtime/broadcast.mdx b/apps/docs/pages/guides/realtime/extensions/broadcast.mdx similarity index 100% rename from apps/docs/pages/guides/realtime/broadcast.mdx rename to apps/docs/pages/guides/realtime/extensions/broadcast.mdx diff --git a/apps/docs/pages/guides/realtime/postgres-changes.mdx b/apps/docs/pages/guides/realtime/extensions/postgres-changes.mdx similarity index 100% rename from apps/docs/pages/guides/realtime/postgres-changes.mdx rename to apps/docs/pages/guides/realtime/extensions/postgres-changes.mdx diff --git a/apps/docs/pages/guides/realtime/presence.mdx b/apps/docs/pages/guides/realtime/extensions/presence.mdx similarity index 100% rename from apps/docs/pages/guides/realtime/presence.mdx rename to apps/docs/pages/guides/realtime/extensions/presence.mdx From 14cc97de027444d58f7186f78b9fff04dd954c33 Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Thu, 23 Mar 2023 12:54:45 +0800 Subject: [PATCH 03/12] Update redirects.js --- apps/www/lib/redirects.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/www/lib/redirects.js b/apps/www/lib/redirects.js index 05e8c945236..fa1f28415f4 100644 --- a/apps/www/lib/redirects.js +++ b/apps/www/lib/redirects.js @@ -1877,4 +1877,19 @@ module.exports = [ source: '/docs/guides/resources/postgres/which-version-of-postgres', destination: '/docs/guides/database/postgres/which-version-of-postgres', }, + { + permanent: true, + source: '/docs/guides/realtime/broadcast', + destination: '/docs/guides/realtime/extensions/broadcast', + }, + { + permanent: true, + source: '/docs/guides/realtime/presence', + destination: '/docs/guides/realtime/extensions/presence', + }, + { + permanent: true, + source: '/docs/guides/realtime/postgres-changes', + destination: '/docs/guides/realtime/extensions/postgres-changes', + }, ] From ccec09fe72e71c28ea5d44681e6330e2aafd2e10 Mon Sep 17 00:00:00 2001 From: Ollie Halliday <22655069+Hallidayo@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:33:59 +0000 Subject: [PATCH 04/12] dart update codeblocks showing --- spec/supabase_dart_v0.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/supabase_dart_v0.yml b/spec/supabase_dart_v0.yml index 73f1ed2c9fd..9248299d3ce 100644 --- a/spec/supabase_dart_v0.yml +++ b/spec/supabase_dart_v0.yml @@ -539,15 +539,16 @@ functions: ``` - id: update - title: 'Modify data: update()' description: | Performs an UPDATE on the table. + title: 'Modify data: update()' notes: | - `update()` should always be combined with [Filters](/docs/reference/dart/using-filters) to target the item(s) you wish to update. examples: - - name: Updating your data + - id: updating-your-data + name: Updating your data isSpotlight: true - dart: | + code: | ```dart final res = await supabase .from('cities') @@ -555,13 +556,14 @@ functions: .match({ 'name': 'Auckland' }) .execute(); ``` - - name: Updating JSON data + - id: updating-json-data + name: Updating JSON data description: | Postgres offers a [number of operators](https://www.postgresql.org/docs/current/functions-json.html) for working with JSON data. Right now it is only possible to update an entire JSON document, but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys. - dart: | + code: | ```dart final res = await supabase .from('users') From ac6364990180be4916f7088799870c3a735fbe6e Mon Sep 17 00:00:00 2001 From: thorwebdev Date: Fri, 24 Mar 2023 15:56:41 +0800 Subject: [PATCH 05/12] feat: Edge Functions docs refactor. --- .../Navigation/NavigationMenu/HomeMenu.tsx | 2 +- .../NavigationMenu.constants.ts | 401 ++++++++---------- .../guides/{auth/overview.mdx => auth.mdx} | 0 apps/docs/pages/guides/functions/auth.mdx | 2 +- .../pages/guides/functions/cicd-workflow.mdx | 2 +- .../{examples => }/connect-to-postgres.mdx | 2 +- apps/docs/pages/guides/functions/cors.mdx | 2 +- .../examples/cloudflare-turnstile.mdx | 2 +- .../guides/functions/examples/discord-bot.mdx | 2 +- .../guides/functions/examples/openai.mdx | 2 +- .../functions/examples/rate-limiting.mdx | 25 ++ .../guides/functions/examples/screenshots.mdx | 23 + .../functions/examples/telegram-bot.mdx | 2 +- .../functions/examples/upstash-redis.mdx | 11 +- .../guides/functions/global-deployments.mdx | 49 +++ .../pages/guides/functions/import-maps.mdx | 4 +- .../guides/functions/local-development.mdx | 2 +- .../guides/functions/schedule-functions.mdx | 2 +- apps/docs/pages/guides/functions/secrets.mdx | 2 +- .../{examples => }/storage-caching.mdx | 4 +- .../guides/functions/typescript-support.mdx | 54 +++ 21 files changed, 350 insertions(+), 245 deletions(-) rename apps/docs/pages/guides/{auth/overview.mdx => auth.mdx} (100%) rename apps/docs/pages/guides/functions/{examples => }/connect-to-postgres.mdx (97%) create mode 100644 apps/docs/pages/guides/functions/examples/rate-limiting.mdx create mode 100644 apps/docs/pages/guides/functions/examples/screenshots.mdx create mode 100644 apps/docs/pages/guides/functions/global-deployments.mdx rename apps/docs/pages/guides/functions/{examples => }/storage-caching.mdx (90%) create mode 100644 apps/docs/pages/guides/functions/typescript-support.mdx diff --git a/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx index 36f01bf6830..a202f5d5548 100644 --- a/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx @@ -30,7 +30,7 @@ const home = [ { label: 'Auth', icon: '/img/icons/menu/auth', - href: '/guides/auth/overview', + href: '/guides/auth', level: 'auth', }, { diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 240e34fdf32..366153f7b8e 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -46,17 +46,17 @@ export const gettingstarted = { icon: 'getting-started', title: 'Getting Started', items: [ - { name: 'Features', url: '/guides/getting-started/features', items: [] }, - { name: 'Architecture', url: '/guides/getting-started/architecture', items: [] }, + { name: 'Features', url: '/guides/getting-started/features' }, + { name: 'Architecture', url: '/guides/getting-started/architecture' }, { name: 'Framework Quickstarts', items: [ - { name: 'React', url: '/guides/getting-started/quickstarts/reactjs', items: [] }, - { name: 'NextJS', url: '/guides/getting-started/quickstarts/nextjs', items: [] }, - { name: 'Flutter', url: '/guides/getting-started/quickstarts/flutter', items: [] }, - { name: 'SvelteKit', url: '/guides/getting-started/quickstarts/sveltekit', items: [] }, - { name: 'SolidJS', url: '/guides/getting-started/quickstarts/solidjs', items: [] }, - { name: 'Vue', url: '/guides/getting-started/quickstarts/vue', items: [] }, + { name: 'React', url: '/guides/getting-started/quickstarts/reactjs' }, + { name: 'NextJS', url: '/guides/getting-started/quickstarts/nextjs' }, + { name: 'Flutter', url: '/guides/getting-started/quickstarts/flutter' }, + { name: 'SvelteKit', url: '/guides/getting-started/quickstarts/sveltekit' }, + { name: 'SolidJS', url: '/guides/getting-started/quickstarts/solidjs' }, + { name: 'Vue', url: '/guides/getting-started/quickstarts/vue' }, ], }, { @@ -65,47 +65,38 @@ export const gettingstarted = { { name: 'NextJS', url: '/guides/getting-started/tutorials/with-nextjs', - items: [], }, { name: 'React', url: '/guides/getting-started/tutorials/with-react', - items: [], }, { name: 'Vue 3', url: '/guides/getting-started/tutorials/with-vue-3', - items: [], }, { name: 'Nuxt 3', url: '/guides/getting-started/tutorials/with-nuxt-3', - items: [], }, { name: 'Angular', url: '/guides/getting-started/tutorials/with-angular', - items: [], }, { name: 'RedwoodJS', url: '/guides/getting-started/tutorials/with-redwoodjs', - items: [], }, { name: 'SolidJS', url: '/guides/getting-started/tutorials/with-solidjs', - items: [], }, { name: 'Svelte', url: '/guides/getting-started/tutorials/with-svelte', - items: [], }, { name: 'SvelteKit', url: '/guides/getting-started/tutorials/with-sveltekit', - items: [], }, ], }, @@ -115,28 +106,23 @@ export const gettingstarted = { { name: 'Flutter', url: '/guides/getting-started/tutorials/with-flutter', - items: [], }, { name: 'Expo', url: '/guides/getting-started/tutorials/with-expo', - items: [], }, { name: 'Ionic React', url: '/guides/getting-started/tutorials/with-ionic-react', - items: [], }, { name: 'Ionic Vue', url: '/guides/getting-started/tutorials/with-ionic-vue', - items: [], }, { name: 'Ionic Angular', url: '/guides/getting-started/tutorials/with-ionic-angular', - items: [], }, ], }, @@ -146,9 +132,9 @@ export const gettingstarted = { export const cli = { 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: [] }, + { name: 'Overview', url: '/guides/cli' }, + { name: 'Local Development', url: '/guides/cli/local-development' }, + { name: 'Managing Environments', url: '/guides/cli/managing-environments' }, ], } @@ -157,104 +143,87 @@ export const SocialLoginItems = [ name: 'Google', icon: '/docs/img/icons/google-icon', url: '/guides/auth/social-login/auth-google', - items: [], }, { name: 'Facebook', icon: '/docs/img/icons/facebook-icon', url: '/guides/auth/social-login/auth-facebook', - items: [], }, { name: 'Apple', icon: '/docs/img/icons/apple-icon', url: '/guides/auth/social-login/auth-apple', - items: [], }, { name: 'Azure', icon: '/docs/img/icons/microsoft-icon', url: '/guides/auth/social-login/auth-azure', - items: [], }, { name: 'Twitter', icon: '/docs/img/icons/twitter-icon', url: '/guides/auth/social-login/auth-twitter', - items: [], }, { name: 'GitHub', icon: '/docs/img/icons/github-icon', url: '/guides/auth/social-login/auth-github', - items: [], isDarkMode: true, }, { name: 'Gitlab', icon: '/docs/img/icons/gitlab-icon', url: '/guides/auth/social-login/auth-gitlab', - items: [], }, { name: 'Bitbucket', icon: '/docs/img/icons/bitbucket-icon', url: '/guides/auth/social-login/auth-bitbucket', - items: [], }, { name: 'Discord', icon: '/docs/img/icons/discord-icon', url: '/guides/auth/social-login/auth-discord', - items: [], }, { name: 'Keycloak', icon: '/docs/img/icons/keycloak-icon', url: '/guides/auth/social-login/auth-keycloak', - items: [], }, { name: 'LinkedIn', icon: '/docs/img/icons/linkedin-icon', url: '/guides/auth/social-login/auth-linkedin', - items: [], }, { name: 'Notion', icon: '/docs/img/icons/notion-icon', url: '/guides/auth/social-login/auth-notion', - items: [], }, { name: 'Slack', icon: '/docs/img/icons/slack-icon', url: '/guides/auth/social-login/auth-slack', - items: [], }, { name: 'Spotify', icon: '/docs/img/icons/spotify-icon', url: '/guides/auth/social-login/auth-spotify', - items: [], }, { name: 'Twitch', icon: '/docs/img/icons/twitch-icon', url: '/guides/auth/social-login/auth-twitch', - items: [], }, { name: 'WorkOS', icon: '/docs/img/icons/workos-icon', url: '/guides/auth/social-login/auth-workos', - items: [], }, { name: 'Zoom', icon: '/docs/img/icons/zoom-icon', url: '/guides/auth/social-login/auth-zoom', - items: [], }, ] @@ -264,14 +233,12 @@ export const PhoneLoginsItems = [ icon: '/docs/img/icons/messagebird-icon', linkDescription: 'Communication between businesses and their customers — across any channel.', url: '/guides/auth/phone-login/messagebird', - items: [], }, { name: 'Twilio SMS Login', icon: '/docs/img/icons/twilio-icon', url: '/guides/auth/phone-login/twilio', linkDescription: 'Customer engagement platform used by hundreds of thousands of businesses.', - items: [], }, { name: 'Vonage SMS Login', @@ -279,7 +246,6 @@ export const PhoneLoginsItems = [ url: '/guides/auth/phone-login/vonage', linkDescription: 'Vonage is a communication platform as a service (CPaaS) provider for consumers and businesses.', - items: [], isDarkMode: true, }, ] @@ -290,14 +256,14 @@ export const auth = { items: [ { name: 'Overview', - url: '/guides/auth/overview', + url: '/guides/auth', }, { name: 'Authentication', url: undefined, items: [ - { name: 'Email Login', url: '/guides/auth/auth-email', items: [] }, - { name: 'Magic Link Login', url: '/guides/auth/auth-magic-link', items: [] }, + { name: 'Email Login', url: '/guides/auth/auth-email' }, + { name: 'Magic Link Login', url: '/guides/auth/auth-magic-link' }, { name: 'Phone Login', url: '/guides/auth/phone-login', @@ -315,38 +281,36 @@ export const auth = { { name: 'SAML 2.0 (Beta)', url: '/guides/auth/sso/auth-sso-saml', - items: [], }, ], }, - { name: 'Email Templates', url: '/guides/auth/auth-email-templates', items: [] }, + { name: 'Email Templates', url: '/guides/auth/auth-email-templates' }, ], }, { name: 'Authorization', url: undefined, items: [ - { name: 'Enable Captcha Protection', url: '/guides/auth/auth-captcha', items: [] }, - { name: 'Managing User Data', url: '/guides/auth/managing-user-data', items: [] }, - { name: 'Multi-Factor Authentication', url: '/guides/auth/auth-mfa', items: [] }, - { name: 'Row Level Security', url: '/guides/auth/row-level-security', items: [] }, - { name: 'Server-side Rendering', url: '/guides/auth/server-side-rendering', items: [] }, + { name: 'Enable Captcha Protection', url: '/guides/auth/auth-captcha' }, + { name: 'Managing User Data', url: '/guides/auth/managing-user-data' }, + { name: 'Multi-Factor Authentication', url: '/guides/auth/auth-mfa' }, + { name: 'Row Level Security', url: '/guides/auth/row-level-security' }, + { name: 'Server-side Rendering', url: '/guides/auth/server-side-rendering' }, ], }, { 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', url: '/guides/auth/auth-helpers/nextjs', items: [] }, + { name: 'Overview', url: '/guides/auth/auth-helpers' }, + { name: 'Auth UI', url: '/guides/auth/auth-helpers/auth-ui' }, + { name: 'Next.js', url: '/guides/auth/auth-helpers/nextjs' }, { name: 'Next.js Server Components', url: '/guides/auth/auth-helpers/nextjs-server-components', - items: [], }, - { name: 'Remix', url: '/guides/auth/auth-helpers/remix', items: [] }, - { name: 'SvelteKit', url: '/guides/auth/auth-helpers/sveltekit', items: [] }, + { name: 'Remix', url: '/guides/auth/auth-helpers/remix' }, + { name: 'SvelteKit', url: '/guides/auth/auth-helpers/sveltekit' }, ], }, { @@ -356,19 +320,16 @@ export const auth = { { 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 Three: Policies', url: '/learn/auth-deep-dive/auth-policies' }, + { name: 'Part Four: GoTrue', url: '/learn/auth-deep-dive/auth-gotrue' }, { name: 'Part Five: Google OAuth', url: '/learn/auth-deep-dive/auth-google-oauth', - items: [], }, ], }, @@ -380,146 +341,122 @@ export const database = { label: 'Database', 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: 'Database Connections', url: '/guides/database/connecting-to-postgres' }, + { name: 'Tables and Data', url: '/guides/database/tables' }, + { name: 'Database Functions', url: '/guides/database/functions' }, + { name: 'Database Webhooks', url: '/guides/database/webhooks' }, + { name: 'Full Text Search', url: '/guides/database/full-text-search' }, + { name: 'Database Testing', url: '/guides/database/testing' }, { name: 'Serverless APIs', url: undefined, items: [ - { name: 'Overview', url: '/guides/database/api', items: [] }, - { name: 'Generating Types', url: '/guides/database/api/generating-types', items: [] }, + { name: 'Overview', url: '/guides/database/api' }, + { name: 'Generating Types', url: '/guides/database/api/generating-types' }, ], }, { name: 'Extensions', url: undefined, items: [ - { name: 'Overview', url: '/guides/database/extensions', items: [] }, + { name: 'Overview', url: '/guides/database/extensions' }, { name: 'HypoPG: Hypothetical indexes', url: '/guides/database/extensions/hypopg', - items: [], }, { name: 'plv8: Javascript Language', url: '/guides/database/extensions/plv8', - items: [], }, - { name: 'http: RESTful Client', url: '/guides/database/extensions/http', items: [] }, + { name: 'http: RESTful Client', url: '/guides/database/extensions/http' }, { name: 'PGAudit: Postgres Auditing', url: '/guides/database/extensions/pgaudit', - items: [], }, { name: 'pgjwt: JSON Web Tokens', url: '/guides/database/extensions/pgjwt', - items: [], }, { name: 'PGroonga: Multilingual Full Text Search', url: '/guides/database/extensions/pgroonga', - items: [], }, { name: 'pgRouting: Geospatial Routing', url: '/guides/database/extensions/pgrouting', - items: [], }, { name: 'pg_cron: Job Scheduling', url: '/guides/database/extensions/pgcron', - items: [], }, { name: 'pg_graphql: GraphQL Support', url: '/guides/database/extensions/pg_graphql', - items: [], }, { name: 'pg_hashids: Short UIDs', url: '/guides/database/extensions/pg_hashids', - items: [], }, { name: 'pg_jsonschema: JSON Schema Validation', url: '/guides/database/extensions/pg_jsonschema', - items: [], }, { name: 'pg_net: Async Networking', url: '/guides/database/extensions/pgnet', - items: [], }, { name: 'pg_plan_filter: Restrict Total Cost', url: '/guides/database/extensions/pg_plan_filter', - items: [], }, { name: 'pg_stat_monitor: Extended Query Performance Monitoring', url: '/guides/database/extensions/pg_stat_monitor', - items: [], }, { name: 'pgvector: Embeddings and vector similarity', url: '/guides/database/extensions/pgvector', - items: [], }, { name: 'pg_stat_statements: SQL Planning and Execution Statistics', url: '/guides/database/extensions/pg_stat_statements', - items: [], }, { name: 'pg_repack: Storage Optimization', url: '/guides/database/extensions/pgrepack', - items: [], }, { name: 'PostGIS: Geo queries', url: '/guides/database/extensions/postgis', - items: [], }, { name: 'pg-safeupdate: Required Where Clauses', url: '/guides/database/extensions/pg-safeupdate', - items: [], }, { name: 'pgsodium: Encryption Features', url: '/guides/database/extensions/pgsodium', - items: [], }, - { name: 'pgTAP: Unit Testing', url: '/guides/database/extensions/pgtap', items: [] }, + { name: 'pgTAP: Unit Testing', url: '/guides/database/extensions/pgtap' }, { name: 'plpgsql_check: PL/pgSQL Linter', url: '/guides/database/extensions/plpgsql_check', - items: [], }, { name: 'timescaledb: Time-series data', url: '/guides/database/extensions/timescaledb', - items: [], }, { name: 'uuid-ossp: Unique Identifiers', url: '/guides/database/extensions/uuid-ossp', - items: [], }, { name: 'RUM: inverted index for full-text search', url: '/guides/database/extensions/rum', - items: [], }, { name: 'wrappers: 3rd Party Integrations', url: '/guides/database/extensions/wrappers', - items: [], }, ], }, @@ -549,10 +486,10 @@ export const database = { 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: [] }, + { name: 'Timeouts', url: '/guides/database/timeouts' }, + { name: 'Replication', url: '/guides/database/replication' }, + { name: 'Passwords', url: '/guides/database/managing-passwords' }, + { name: 'Timezones', url: '/guides/database/managing-timezones' }, ], }, ], @@ -563,37 +500,63 @@ export const functions = { label: 'Edge Functions', url: '/guides/functions', items: [ - { name: 'Quickstart', url: '/guides/functions/quickstart', items: [] }, - { name: 'Auth', url: '/guides/functions/auth', items: [] }, - { name: 'CI/CD Workflow', url: '/guides/functions/cicd-workflow', items: [] }, - { name: 'CORS', url: '/guides/functions/cors', items: [] }, - { name: 'Debugging', url: '/guides/functions/debugging', items: [] }, - { name: 'Import Maps', url: '/guides/functions/import-maps', items: [] }, - { name: 'Local Development', url: '/guides/functions/local-development', items: [] }, - { name: 'Managing Secrets', url: '/guides/functions/secrets', items: [] }, - { name: 'Schedule Functions', url: '/guides/functions/schedule-functions', items: [] }, + { + name: 'Overview', + url: '/guides/functions', + }, + { + name: 'Quickstart', + url: '/guides/functions/quickstart', + }, + { + name: 'Features', + url: undefined, + items: [ + { name: 'TypeScript Support', url: '/guides/functions/typescript-support' }, + { name: 'Debugging Edge Functions', url: '/guides/functions/debugging' }, + { name: 'Managing packages using Import Maps', url: '/guides/functions/import-maps' }, + { name: 'Globally Distributed Deployments', url: '/guides/functions/global-deployments' }, + ], + }, + { + name: 'Guides', + url: undefined, + items: [ + { name: 'Developing Functions locally', url: '/guides/functions/local-development' }, + { name: 'Deploying with Git', url: '/guides/functions/cicd-workflow' }, + { name: 'Managing Secrets and Environment Variables', url: '/guides/functions/secrets' }, + { name: 'Integrating With Supabase Auth', url: '/guides/functions/auth' }, + { + name: 'Integrating with Supabase Storage', + url: '/guides/functions/storage-caching', + }, + { name: 'CORS support for Invoking from the browser', url: '/guides/functions/cors' }, + { name: 'Scheduling Functions', url: '/guides/functions/schedule-functions' }, + { + name: 'Connecting directly to Postgres', + url: '/guides/functions/connect-to-postgres', + }, + ], + }, { name: 'Examples', url: '/guides/functions/examples', items: [ + { name: 'Generating OpenAI GPT3 completions', url: '/guides/functions/examples/openai' }, + { name: 'Generating OG images ', url: '/guides/functions/examples/og-image' }, { - name: 'Cloudflare Turnstile', + name: 'CAPTCHA support with Cloudflare Turnstile', url: '/guides/functions/examples/cloudflare-turnstile', - items: [], }, + { name: 'Building a Discord Bot', url: '/guides/functions/examples/discord-bot' }, + { name: 'Building a Telegram Bot', url: '/guides/functions/examples/telegram-bot' }, + { name: 'Handling Stripe Webhooks ', url: '/guides/functions/examples/stripe-webhooks' }, + { name: 'Integrating with Upstash Redis', url: '/guides/functions/examples/upstash-redis' }, + { name: 'Rate Limiting Edge Functions', url: '/guides/functions/examples/rate-limiting' }, { - name: 'Connect to Postgres', - url: '/guides/functions/examples/connect-to-postgres', - items: [], + name: 'Taking Screenshots with Puppeteer', + url: '/guides/functions/examples/screenshots', }, - { name: 'Discord Bot', url: '/guides/functions/examples/discord-bot', items: [] }, - { name: 'GitHub Actions', url: '/guides/functions/examples/github-actions', items: [] }, - { name: 'OG Image', url: '/guides/functions/examples/og-image', items: [] }, - { name: 'OpenAI', url: '/guides/functions/examples/openai', items: [] }, - { name: 'Storage Caching', url: '/guides/functions/examples/storage-caching', items: [] }, - { name: 'Stripe Webhooks', url: '/guides/functions/examples/stripe-webhooks', items: [] }, - { name: 'Telegram Bot', url: '/guides/functions/examples/telegram-bot', items: [] }, - { name: 'Upstash Redis', url: '/guides/functions/examples/upstash-redis', items: [] }, ], }, ], @@ -616,17 +579,16 @@ export const realtime = { name: 'Features', url: undefined, items: [ - { name: 'Channels', url: '/guides/realtime/channels', items: [] }, + { name: 'Channels', url: '/guides/realtime/channels' }, { name: 'Extensions', url: '/guides/realtime/extensions', items: [ - { name: 'Broadcast', url: '/guides/realtime/extensions/broadcast', items: [] }, - { name: 'Presence', url: '/guides/realtime/extensions/presence', items: [] }, + { name: 'Broadcast', url: '/guides/realtime/extensions/broadcast' }, + { name: 'Presence', url: '/guides/realtime/extensions/presence' }, { name: 'Postgres Changes', url: '/guides/realtime/extensions/postgres-changes', - items: [], }, ], }, @@ -639,12 +601,10 @@ export const realtime = { { name: 'Subscribing to Database Changes', url: '/guides/realtime/subscribing-to-database-changes', - items: [], }, { name: 'Using Realtime with Next.js', url: '/guides/realtime/realtime-with-nextjs', - items: [], }, ], }, @@ -652,9 +612,9 @@ export const realtime = { 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: [] }, + { name: 'Rate Limits', url: '/guides/realtime/rate-limits' }, + { name: 'Architecture', url: '/guides/realtime/architecture' }, + { name: 'Protocol', url: '/guides/realtime/protocol' }, ], }, ], @@ -665,11 +625,11 @@ export const storage = { label: 'Storage', url: '/guides/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: [] }, + { name: 'Overview', url: '/guides/storage' }, + { name: 'Quickstart', url: '/guides/storage/quickstart' }, + { name: 'Access Control', url: '/guides/storage/access-control' }, + { name: 'CDN', url: '/guides/storage/cdn' }, + { name: 'Image Transformations', url: '/guides/storage/image-transformations' }, ], } @@ -678,15 +638,15 @@ export const supabase_cli = { title: 'Supabase CLI', url: '/guides/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: [] }, + { name: 'Overview', url: '/guides/cli' }, + { name: 'Local Development', url: '/guides/cli/local-development' }, + { name: 'Managing Environments', url: '/guides/cli/managing-environments' }, { name: 'Reference', url: undefined, items: [ - { name: 'Commands', url: '/reference/cli/introduction', items: [] }, - { name: 'Configuration', url: '/reference/cli/config', items: [] }, + { name: 'Commands', url: '/reference/cli/introduction' }, + { name: 'Configuration', url: '/reference/cli/config' }, ], }, ], @@ -701,35 +661,34 @@ export const platform = { name: 'Add-ons', url: undefined, items: [ - { name: 'Compute Add-ons', url: '/guides/platform/compute-add-ons', items: [] }, - { name: 'Custom Domains', url: '/guides/platform/custom-domains', items: [] }, - { name: 'Database Backups', url: '/guides/platform/backups', items: [] }, + { name: 'Compute Add-ons', url: '/guides/platform/compute-add-ons' }, + { name: 'Custom Domains', url: '/guides/platform/custom-domains' }, + { name: 'Database Backups', url: '/guides/platform/backups' }, ], }, { name: 'Platform Management', url: undefined, items: [ - { name: 'Access Control', url: '/guides/platform/access-control', items: [] }, - { name: 'Database Size', url: '/guides/platform/database-size', 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: 'Access Control', url: '/guides/platform/access-control' }, + { name: 'Database Size', url: '/guides/platform/database-size' }, + { name: 'HTTP Status Codes', url: '/guides/platform/http-status-codes' }, + { name: 'Logging', url: '/guides/platform/logs' }, + { name: 'Metrics', url: '/guides/platform/metrics' }, { 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: 'SSL Enforcement', url: '/guides/platform/ssl-enforcement', items: [] }, + { name: 'Network Restrictions', url: '/guides/platform/network-restrictions' }, + { name: 'Performance Tuning', url: '/guides/platform/performance' }, + { name: 'Permissions', url: '/guides/platform/permissions' }, + { name: 'SSL Enforcement', url: '/guides/platform/ssl-enforcement' }, ], }, { name: 'Billing', url: undefined, - items: [{ name: 'Spend cap', url: '/guides/platform/spend-cap', items: [] }], + items: [{ name: 'Spend cap', url: '/guides/platform/spend-cap' }], }, { name: 'Single sign-on', @@ -738,21 +697,19 @@ export const platform = { { name: 'Enable SSO for your organization', url: '/guides/platform/sso', - items: [], }, - { name: 'SSO with Azure AD', url: '/guides/platform/sso/azure', items: [] }, + { name: 'SSO with Azure AD', url: '/guides/platform/sso/azure' }, { name: 'SSO with Google Workspace', url: '/guides/platform/sso/gsuite', - items: [], }, - { name: 'SSO with Okta', url: '/guides/platform/sso/okta', items: [] }, + { name: 'SSO with Okta', url: '/guides/platform/sso/okta' }, ], }, { name: 'Go-live Checklist', url: undefined, - items: [{ name: 'Production Readiness', url: '/guides/platform/going-into-prod', items: [] }], + items: [{ name: 'Production Readiness', url: '/guides/platform/going-into-prod' }], }, { name: 'Troubleshooting', @@ -761,7 +718,6 @@ export const platform = { { name: 'HTTP and Project Issues', url: '/guides/platform/troubleshooting', - items: [], }, ], }, @@ -773,8 +729,8 @@ export const resources = { label: 'Resources', url: '/guides/resources', items: [ - { name: 'Examples', url: '/guides/resources/examples', items: [] }, - { name: 'Glossary', url: '/guides/resources/glossary', items: [] }, + { name: 'Examples', url: '/guides/resources/examples' }, + { name: 'Glossary', url: '/guides/resources/glossary' }, { name: 'Migrate to Supabase', url: '/guides/resources/migrating-to-supabase', @@ -782,27 +738,22 @@ export const resources = { { name: 'Firebase Auth', url: '/guides/resources/migrating-to-supabase/firebase-auth', - items: [], }, { name: 'Firestore Data', url: '/guides/resources/migrating-to-supabase/firestore-data', - items: [], }, { name: 'Firebase Storage', url: '/guides/resources/migrating-to-supabase/firebase-storage', - items: [], }, { name: 'Heroku', url: '/guides/resources/migrating-to-supabase/heroku', - items: [], }, { name: 'Render', url: '/guides/resources/migrating-to-supabase/render', - items: [], }, ], }, @@ -814,27 +765,27 @@ export const self_hosting = { icon: 'resources', url: '/guides/self-hosting', items: [ - { name: 'Overview', url: '/guides/self-hosting', items: [] }, - { name: 'Self-Hosting with Docker', url: '/guides/self-hosting/docker', items: [] }, + { name: 'Overview', url: '/guides/self-hosting' }, + { name: 'Self-Hosting with Docker', url: '/guides/self-hosting/docker' }, { name: 'Auth Server', items: [ - { name: 'Reference', url: '/reference/self-hosting-auth/introduction', items: [] }, - { name: 'Configuration', url: '/guides/self-hosting/auth/config', items: [] }, + { name: 'Reference', url: '/reference/self-hosting-auth/introduction' }, + { name: 'Configuration', url: '/guides/self-hosting/auth/config' }, ], }, { name: 'Storage Server', items: [ - { name: 'Reference', url: '/reference/self-hosting-storage/introduction', items: [] }, - { name: 'Configuration', url: '/guides/self-hosting/storage/config', items: [] }, + { name: 'Reference', url: '/reference/self-hosting-storage/introduction' }, + { name: 'Configuration', url: '/guides/self-hosting/storage/config' }, ], }, { name: 'Realtime Server', items: [ - { name: 'Reference', url: '/reference/self-hosting-realtime/introduction', items: [] }, - { name: 'Configuration', url: '/guides/self-hosting/realtime/config', items: [] }, + { name: 'Reference', url: '/reference/self-hosting-realtime/introduction' }, + { name: 'Configuration', url: '/guides/self-hosting/realtime/config' }, ], }, ], @@ -844,11 +795,11 @@ export const migrate = { label: 'Migrate to Supabase', url: '/guides/migrate', 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: [] }, - { name: 'Render', url: '/guides/migrations/render', items: [] }, + { name: 'Firebase Auth', url: '/guides/migrations/firebase-auth' }, + { name: 'Firestore Data', url: '/guides/migrations/firestore-data' }, + { name: 'Firebase Storage', url: '/guides/migrations/firebase-storage' }, + { name: 'Heroku', url: '/guides/migrations/heroku' }, + { name: 'Render', url: '/guides/migrations/render' }, ], } @@ -857,7 +808,7 @@ export const integrations = { label: 'Integrations', url: '/guides/integrations', items: [ - { name: 'Overview', url: '/guides/integrations/integrations', items: [] }, + { name: 'Overview', url: '/guides/integrations/integrations' }, { name: 'Auth', url: undefined, @@ -865,53 +816,53 @@ export const integrations = { { 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: 'Stytch', url: '/guides/integrations/stytch', items: [] }, - { name: 'SuperTokens', url: '/guides/integrations/supertokens', items: [] }, + { name: 'Authsignal', url: '/guides/integrations/authsignal' }, + { name: 'Clerk', url: '/guides/integrations/clerk' }, + { name: 'keyri', url: '/guides/integrations/keyri' }, + { name: 'Stytch', url: '/guides/integrations/stytch' }, + { name: 'SuperTokens', url: '/guides/integrations/supertokens' }, ], }, { name: 'Caching / Offline-first', url: undefined, - items: [{ name: 'Polyscale', url: '/guides/integrations/polyscale', items: [] }], + items: [{ name: 'Polyscale', url: '/guides/integrations/polyscale' }], }, { name: 'Developer Tools', url: undefined, items: [ - { name: 'Estuary', url: '/guides/integrations/estuary', items: [] }, - { name: 'OpenAI', url: '/guides/functions/examples/openai', 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: 'WeWeb', url: '/guides/integrations/weweb', items: [] }, - { name: 'Zuplo', url: '/guides/integrations/zuplo', items: [] }, + { name: 'Estuary', url: '/guides/integrations/estuary' }, + { name: 'OpenAI', url: '/guides/functions/examples/openai' }, + { name: 'pgMustard', url: '/guides/integrations/pgmustard' }, + { name: 'Prisma', url: '/guides/integrations/prisma' }, + { name: 'Sequin', url: '/guides/integrations/sequin' }, + { name: 'Snaplet', url: '/guides/integrations/snaplet' }, + { name: 'Vercel', url: '/guides/integrations/vercel' }, + { name: 'Upstash Redis', url: '/guides/functions/examples/upstash-redis' }, + { name: 'WeWeb', url: '/guides/integrations/weweb' }, + { name: 'Zuplo', url: '/guides/integrations/zuplo' }, ], }, { name: 'Low-code', url: undefined, items: [ - { name: 'Appsmith', url: '/guides/integrations/appsmith', items: [] }, - { name: 'Dashibase', url: '/guides/integrations/dashibase', items: [] }, - { name: 'DhiWise', url: '/guides/integrations/dhiwise', items: [] }, - { name: 'Directus', url: '/guides/integrations/directus', items: [] }, - { name: 'Draftbit', url: '/guides/integrations/draftbit', items: [] }, - { name: 'FlutterFlow', url: '/guides/integrations/flutterflow', items: [] }, - { name: 'Plasmic', url: '/guides/integrations/plasmic', items: [] }, - { name: 'ILLA', url: '/guides/integrations/illa', items: [] }, + { name: 'Appsmith', url: '/guides/integrations/appsmith' }, + { name: 'Dashibase', url: '/guides/integrations/dashibase' }, + { name: 'DhiWise', url: '/guides/integrations/dhiwise' }, + { name: 'Directus', url: '/guides/integrations/directus' }, + { name: 'Draftbit', url: '/guides/integrations/draftbit' }, + { name: 'FlutterFlow', url: '/guides/integrations/flutterflow' }, + { name: 'Plasmic', url: '/guides/integrations/plasmic' }, + { name: 'ILLA', url: '/guides/integrations/illa' }, ], }, { name: 'Messaging', url: undefined, - items: [{ name: 'OneSignal', url: '/guides/integrations/onesignal', items: [] }], + items: [{ name: 'OneSignal', url: '/guides/integrations/onesignal' }], }, ], } @@ -927,35 +878,31 @@ export const reference = { name: 'supabase-js', url: '/reference/javascript/start', level: 'reference_javascript', - items: [], icon: '/img/icons/menu/reference-javascript', }, { name: 'supabase-dart', url: '/reference/dart/start', level: 'reference_dart', - items: [], icon: '/img/icons/menu/reference-dart', }, { name: 'supabase-csharp', url: '/reference/csharp/start', level: 'reference_csharp', - items: [], icon: '/img/icons/menu/reference-csharp', }, { name: 'supbase-python', url: '/reference/python/start', level: 'reference_python', - items: [], icon: '/img/icons/menu/reference-python', }, // { // name: 'supabase-python', // url: '/reference/python/start', // level: 'reference_python', - // items: [], + // // icon: '/img/icons/menu/reference-javascript', // }, ], @@ -966,13 +913,11 @@ export const reference = { { name: 'Supabase CLI', url: '/reference/cli/start', - items: [], icon: '/img/icons/menu/reference-cli', }, { name: 'Management API', url: '/reference/javascript', - items: [], icon: '/img/icons/menu/reference-api', }, ], @@ -1060,25 +1005,25 @@ export const reference_self_hosting_realtime = { // { // 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: [] } +// { name: 'Reference Documentation'; url: '/reference'; }, +// { name: 'Supabase JavaScript Library'; url: '/reference/javascript'; }, +// { name: 'Supabase Flutter Library'; url: '/reference/dart'; }, +// { name: 'Supabase CLI'; url: '/reference/cli'; }, +// { name: 'Management API'; url: '/reference/api'; } // ] // }, // { // label: 'Self-hosting' // items: [ -// { name: 'Auth Server'; url: '/reference/auth'; items: [] }, -// { name: 'Storage Server'; url: '/reference/storage'; items: [] } +// { name: 'Auth Server'; url: '/reference/auth'; }, +// { name: 'Storage Server'; url: '/reference/storage'; } // ] // } // { // label: 'Clients', // items: [ -// { name: 'Auth Server', url: '/reference/auth', items: [] }, -// { name: 'Storage Server', url: '/reference/storage', items: [] }, +// { name: 'Auth Server', url: '/reference/auth'}, +// { name: 'Storage Server', url: '/reference/storage'}, // ], // }, // 'reference/javascript': SupabaseJsV2Nav, diff --git a/apps/docs/pages/guides/auth/overview.mdx b/apps/docs/pages/guides/auth.mdx similarity index 100% rename from apps/docs/pages/guides/auth/overview.mdx rename to apps/docs/pages/guides/auth.mdx diff --git a/apps/docs/pages/guides/functions/auth.mdx b/apps/docs/pages/guides/functions/auth.mdx index 29ad1505034..c5bff683160 100644 --- a/apps/docs/pages/guides/functions/auth.mdx +++ b/apps/docs/pages/guides/functions/auth.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'auth', - title: 'Auth', + title: 'Integrating With Supabase Auth', description: 'Supabase Edge Functions and Auth.', } diff --git a/apps/docs/pages/guides/functions/cicd-workflow.mdx b/apps/docs/pages/guides/functions/cicd-workflow.mdx index e168c6c7642..01c30d69182 100644 --- a/apps/docs/pages/guides/functions/cicd-workflow.mdx +++ b/apps/docs/pages/guides/functions/cicd-workflow.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'cicd-workflow', - title: 'CI / CD Workflow', + title: 'Deploying with Git', description: 'How to deploy Supabase Edge Functions with a CI / CD pipeline.', video: 'https://www.youtube.com/v/6OMVWiiycLs', } diff --git a/apps/docs/pages/guides/functions/examples/connect-to-postgres.mdx b/apps/docs/pages/guides/functions/connect-to-postgres.mdx similarity index 97% rename from apps/docs/pages/guides/functions/examples/connect-to-postgres.mdx rename to apps/docs/pages/guides/functions/connect-to-postgres.mdx index 5fc087aa92f..461ae904c49 100644 --- a/apps/docs/pages/guides/functions/examples/connect-to-postgres.mdx +++ b/apps/docs/pages/guides/functions/connect-to-postgres.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'examples-postgres-on-the-edge', - title: 'Connect to Postgres', + title: 'Connecting directly to Postgres', description: 'Connecting to Postgres from Edge Functions.', video: 'https://www.youtube.com/v/cl7EuF1-RsY', } diff --git a/apps/docs/pages/guides/functions/cors.mdx b/apps/docs/pages/guides/functions/cors.mdx index 7274d810b02..75525da0741 100644 --- a/apps/docs/pages/guides/functions/cors.mdx +++ b/apps/docs/pages/guides/functions/cors.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'functions-cors', - title: 'CORS (Cross-Origin Resource Sharing)', + title: 'CORS (Cross-Origin Resource Sharing) support for Invoking from the browser', description: 'Add CORS headers to invoke Edge Functions from the browser.', } diff --git a/apps/docs/pages/guides/functions/examples/cloudflare-turnstile.mdx b/apps/docs/pages/guides/functions/examples/cloudflare-turnstile.mdx index 7cfcc5feb19..bb6bdf7d71d 100644 --- a/apps/docs/pages/guides/functions/examples/cloudflare-turnstile.mdx +++ b/apps/docs/pages/guides/functions/examples/cloudflare-turnstile.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'examples-cloudflare-turnstile', - title: 'Cloudflare Turnstile', + title: 'CAPTCHA support with Cloudflare Turnstile', description: 'Protecting Forms with Cloudflare Turnstile.', video: 'https://www.youtube.com/v/OwW0znboh60', } diff --git a/apps/docs/pages/guides/functions/examples/discord-bot.mdx b/apps/docs/pages/guides/functions/examples/discord-bot.mdx index 4aad62ac901..e542f346ca6 100644 --- a/apps/docs/pages/guides/functions/examples/discord-bot.mdx +++ b/apps/docs/pages/guides/functions/examples/discord-bot.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'examples-discord-bot', - title: 'Discord Bot', + title: 'Building a Discord Bot', description: 'Building a Slash Command Discord Bot with Edge Functions.', video: 'https://www.youtube.com/v/J24Bvo_m7DM', } diff --git a/apps/docs/pages/guides/functions/examples/openai.mdx b/apps/docs/pages/guides/functions/examples/openai.mdx index bc24d6a151a..236ad59354f 100644 --- a/apps/docs/pages/guides/functions/examples/openai.mdx +++ b/apps/docs/pages/guides/functions/examples/openai.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'examples-openai', - title: 'OpenAI', + title: 'Generating OpenAI GPT3 completions', description: 'Using OpenAI in Edge Functions.', video: 'https://www.youtube.com/v/29p8kIqyU_Y', } diff --git a/apps/docs/pages/guides/functions/examples/rate-limiting.mdx b/apps/docs/pages/guides/functions/examples/rate-limiting.mdx new file mode 100644 index 00000000000..0116326f6c5 --- /dev/null +++ b/apps/docs/pages/guides/functions/examples/rate-limiting.mdx @@ -0,0 +1,25 @@ +import Layout from '~/layouts/DefaultGuideLayout' + +export const meta = { + title: 'Rate Limiting Edge Functions', + description: 'Rate Limiting Edge Functions with Upstash Redis.', +} + +
    + +
    + +[Redis](https://redis.io/docs/about/) is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. It is optimised for atomic operations like incrementing a value, for example for a view counter or rate limiting. We can even rate limit based on the user ID from Supabase Auth! + +[Upstash](https://upstash.com/) provides an HTTP/REST based Redis client which is ideal for serverless use-cases and therefore works well with Supabase Edge Functions. + +Find the code on [GitHub](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/upstash-redis-ratelimit). + +export const Page = ({ children }) => + +export default Page diff --git a/apps/docs/pages/guides/functions/examples/screenshots.mdx b/apps/docs/pages/guides/functions/examples/screenshots.mdx new file mode 100644 index 00000000000..6e02568e47e --- /dev/null +++ b/apps/docs/pages/guides/functions/examples/screenshots.mdx @@ -0,0 +1,23 @@ +import Layout from '~/layouts/DefaultGuideLayout' + +export const meta = { + title: 'Taking Screenshots with Puppeteer', + description: 'Take screenshots in Edge Functions with Puppeteer and Browserless.io.', +} + +
    + +
    + +[Puppeteer](https://pptr.dev/) is a handy tool to programmatically take screenshots and generate PDFs. However, trying to do so in Edge Functions can be challenging due to the size restrictions. Luckily there is a [serverless browser offering available](https://www.browserless.io/) that we can connect to via websockets. + +Find the code on [GitHub](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/puppeteer). + +export const Page = ({ children }) => + +export default Page diff --git a/apps/docs/pages/guides/functions/examples/telegram-bot.mdx b/apps/docs/pages/guides/functions/examples/telegram-bot.mdx index ad87c1a7103..68254bc1b53 100644 --- a/apps/docs/pages/guides/functions/examples/telegram-bot.mdx +++ b/apps/docs/pages/guides/functions/examples/telegram-bot.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'examples-telegram-bot', - title: 'Telegram Bot', + title: 'Building a Telegram Bot', description: 'Building a Telegram Bot with Edge Functions.', video: 'https://www.youtube.com/v/AWfE3a9J_uo', } diff --git a/apps/docs/pages/guides/functions/examples/upstash-redis.mdx b/apps/docs/pages/guides/functions/examples/upstash-redis.mdx index 77411c5b1d8..d97d1879e63 100644 --- a/apps/docs/pages/guides/functions/examples/upstash-redis.mdx +++ b/apps/docs/pages/guides/functions/examples/upstash-redis.mdx @@ -5,7 +5,16 @@ export const meta = { description: 'Build an Edge Functions Counter with Upstash Redis.', } -A Redis counter example that stores a [hash](https://redis.io/commands/hincrby/) of function invocation count per region. +
    + +
    + +A Redis counter example that stores a [hash](https://redis.io/commands/hincrby/) of function invocation count per region. Find the code on [GitHub](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/upstash-redis-counter). ## Redis database setup diff --git a/apps/docs/pages/guides/functions/global-deployments.mdx b/apps/docs/pages/guides/functions/global-deployments.mdx new file mode 100644 index 00000000000..dbd3810cb71 --- /dev/null +++ b/apps/docs/pages/guides/functions/global-deployments.mdx @@ -0,0 +1,49 @@ +import Layout from '~/layouts/DefaultGuideLayout' + +export const meta = { + id: 'functions-debugging', + title: 'Globally Distributed Deployments', + description: 'We deploy your code throughout the world, close to your users.', +} + +We deploy your code throughout the world. Each new request is served from the closest region to your user. Currently located in the following regions: + +1. Taiwan (`asia-east1`) +1. Hong Kong (`asia-east2`) +1. Tokyo (`asia-northeast1`) +1. Osaka (`asia-northeast2`) +1. Seoul (`asia-northeast3`) +1. Mumbai (`asia-south1`) +1. Delhi (`asia-south2`) +1. Singapore (`asia-southeast1`) +1. Jakarta (`asia-southeast2`) +1. Sydney (`australia-southeast1`) +1. Melbourne (`australia-southeast2`) +1. Warsaw (`europe-central2`) +1. Finland (`europe-north1`) +1. Belgium (`europe-west1`) +1. London (`europe-west2`) +1. Frankfurt (`europe-west3`) +1. Netherlands (`europe-west4`) +1. Zurich (`europe-west6`) +1. Milan (`europe-west8`) +1. Paris (`europe-west9`) +1. Tel Aviv (`me-west1`) +1. Madrid (`europe-southwest1`) +1. Montréal (`northamerica-northeast1`) +1. Toronto (`northamerica-northeast2`) +1. São Paulo (`southamerica-east1`) +1. Chile (`southamerica-west1`) +1. Iowa (`us-central1`) +1. South Carolina (`us-east1`) +1. North Virginia (`us-east4`) +1. Ohio (`us-east5`) +1. Texas (`us-south1`) +1. Oregon (`us-west1`) +1. California (`us-west2`) +1. Utah (`us-west3`) +1. Nevada (`us-west4`) + +export const Page = ({ children }) => + +export default Page diff --git a/apps/docs/pages/guides/functions/import-maps.mdx b/apps/docs/pages/guides/functions/import-maps.mdx index 6d61e774b55..f6c360dc3fd 100644 --- a/apps/docs/pages/guides/functions/import-maps.mdx +++ b/apps/docs/pages/guides/functions/import-maps.mdx @@ -2,8 +2,8 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'functions-import-maps', - title: 'Import Maps', - description: 'Using Import Maps.', + title: 'Managing packages using Import Maps', + description: 'Managing packages using Import Maps.', video: 'https://www.youtube.com/v/ILr3cneZuFk', } diff --git a/apps/docs/pages/guides/functions/local-development.mdx b/apps/docs/pages/guides/functions/local-development.mdx index 254cad70044..e3e77c95105 100644 --- a/apps/docs/pages/guides/functions/local-development.mdx +++ b/apps/docs/pages/guides/functions/local-development.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'functions-local-development', - title: 'Local Development', + title: 'Developing Functions locally', description: 'Run your Edge Functions locally.', } diff --git a/apps/docs/pages/guides/functions/schedule-functions.mdx b/apps/docs/pages/guides/functions/schedule-functions.mdx index 3339fcab8fa..fb4b0552824 100644 --- a/apps/docs/pages/guides/functions/schedule-functions.mdx +++ b/apps/docs/pages/guides/functions/schedule-functions.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'schedule-functions', - title: 'Schedule Edge Functions', + title: 'Scheduling Edge Functions', description: 'Schedule Edge Functions with pg_cron.', } diff --git a/apps/docs/pages/guides/functions/secrets.mdx b/apps/docs/pages/guides/functions/secrets.mdx index 3487fc94d79..ffbe7920042 100644 --- a/apps/docs/pages/guides/functions/secrets.mdx +++ b/apps/docs/pages/guides/functions/secrets.mdx @@ -2,7 +2,7 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { id: 'functions-secrets', - title: 'Secrets and Environment Variables', + title: 'Managing Secrets and Environment Variables', description: 'Managing secrets and environment variables.', } diff --git a/apps/docs/pages/guides/functions/examples/storage-caching.mdx b/apps/docs/pages/guides/functions/storage-caching.mdx similarity index 90% rename from apps/docs/pages/guides/functions/examples/storage-caching.mdx rename to apps/docs/pages/guides/functions/storage-caching.mdx index c9cf4de7be9..e7f70d58b0f 100644 --- a/apps/docs/pages/guides/functions/examples/storage-caching.mdx +++ b/apps/docs/pages/guides/functions/storage-caching.mdx @@ -1,8 +1,8 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { - id: 'examples-storage-caching', - title: 'Caching Images with Supabase Storage CDN', + id: 'storage-caching', + title: 'Integrating with Supabase Storage', description: 'Integrate Edge Functions with Supabase Storage to cache images on the Edge (CDN).', video: 'https://www.youtube.com/v/wW6L52v9Ldo', } diff --git a/apps/docs/pages/guides/functions/typescript-support.mdx b/apps/docs/pages/guides/functions/typescript-support.mdx new file mode 100644 index 00000000000..f210b7c2a0f --- /dev/null +++ b/apps/docs/pages/guides/functions/typescript-support.mdx @@ -0,0 +1,54 @@ +import Layout from '~/layouts/DefaultGuideLayout' + +export const meta = { + id: 'functions-debugging', + title: 'TypeScript Support', + description: 'Using TypeScript in Deno Edge Functions.', +} + +One of the benefits of Deno is that it treats TypeScript as a first class +language, just like JavaScript or Web Assembly, when running code in Deno. What +that means is you can run or import TypeScript without installing anything more +than the Deno CLI. + +## How does it work? + +At a high level, Deno converts TypeScript (as well as TSX and JSX) into +JavaScript. It does this via a combination of the +[TypeScript compiler](https://github.com/microsoft/TypeScript), which we build +into Deno, and a Rust library called [swc](https://swc.rs/). When the code has +been type checked and transformed, it is stored in a cache, ready for the next +run without the need to convert it from its source to JavaScript again. + +## Strict by default + +Deno type checks TypeScript in _strict_ mode by default, and the TypeScript core +team recommends _strict_ mode as a sensible default. This mode generally enables +features of TypeScript that probably should have been there from the start, but +as TypeScript continued to evolve, would be breaking changes for existing code. + +## Mixing JavaScript and TypeScript + +By default, Deno does not type check JavaScript. This can be changed, and is +discussed further in [Configuring TypeScript in Deno](./configuration.md). Deno +does support JavaScript importing TypeScript and TypeScript importing +JavaScript, in complex scenarios. + +An important note though is that when type checking TypeScript, by default Deno +will "read" all the JavaScript in order to be able to evaluate how it might have +an impact on the TypeScript types. The type checker will do the best it can to +figure out what the types are of the JavaScript you import into TypeScript, +including reading any JSDoc comments. Details of this are discussed in detail in +the [Types and type declarations](./types.md) section. + +## Type resolution + +One of the core design principles of Deno is to avoid non-standard module +resolution, and this applies to type resolution as well. If you want to utilise +JavaScript that has type definitions (e.g. a `.d.ts` file), you have to +explicitly tell Deno about this. The details of how this is accomplished are +covered in the [Types and type declarations](https://deno.land/manual/advanced/typescript/types) section. + +export const Page = ({ children }) => + +export default Page From 8192e408fedb26740f6a10b802da1d62843523c9 Mon Sep 17 00:00:00 2001 From: thorwebdev Date: Fri, 24 Mar 2023 16:14:25 +0800 Subject: [PATCH 06/12] chore: typos. --- apps/docs/pages/guides/functions.mdx | 7 ++++++- .../docs/pages/guides/functions/examples/rate-limiting.mdx | 2 +- .../pages/guides/functions/examples/stripe-webhooks.mdx | 2 -- apps/docs/pages/guides/functions/typescript-support.mdx | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/docs/pages/guides/functions.mdx b/apps/docs/pages/guides/functions.mdx index b19ddb81872..c3b9901e49d 100644 --- a/apps/docs/pages/guides/functions.mdx +++ b/apps/docs/pages/guides/functions.mdx @@ -129,7 +129,7 @@ export const examples = [ { name: 'Puppeteer', description: `Generate screenshots with Puppeteer.`, - href: 'https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/puppeteer', + href: '/guides/functions/examples/screenshots', }, { name: 'Discord Bot', @@ -151,6 +151,11 @@ export const examples = [ description: `Build an Edge Functions Counter with Upstash Redis.`, href: '/guides/functions/examples/upstash-redis', }, + { + name: 'Rate Limiting', + description: `Rate Limiting Egde Functions with Upstash Redis.`, + href: '/guides/functions/examples/rate-limiting', + }, ] export const Page = ({ children }) => diff --git a/apps/docs/pages/guides/functions/examples/rate-limiting.mdx b/apps/docs/pages/guides/functions/examples/rate-limiting.mdx index 0116326f6c5..6c99592a8fc 100644 --- a/apps/docs/pages/guides/functions/examples/rate-limiting.mdx +++ b/apps/docs/pages/guides/functions/examples/rate-limiting.mdx @@ -14,7 +14,7 @@ export const meta = { > -[Redis](https://redis.io/docs/about/) is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. It is optimised for atomic operations like incrementing a value, for example for a view counter or rate limiting. We can even rate limit based on the user ID from Supabase Auth! +[Redis](https://redis.io/docs/about/) is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. It is optimized for atomic operations like incrementing a value, for example for a view counter or rate limiting. We can even rate limit based on the user ID from Supabase Auth! [Upstash](https://upstash.com/) provides an HTTP/REST based Redis client which is ideal for serverless use-cases and therefore works well with Supabase Edge Functions. diff --git a/apps/docs/pages/guides/functions/examples/stripe-webhooks.mdx b/apps/docs/pages/guides/functions/examples/stripe-webhooks.mdx index b71a4ca2b36..c10c46426c8 100644 --- a/apps/docs/pages/guides/functions/examples/stripe-webhooks.mdx +++ b/apps/docs/pages/guides/functions/examples/stripe-webhooks.mdx @@ -1,10 +1,8 @@ import Layout from '~/layouts/DefaultGuideLayout' export const meta = { - id: 'examples-stripe-webhooks', title: 'Handling Stripe Webhooks', description: 'Handling signed Stripe Webhooks with Edge Functions.', - video: 'https://www.youtube.com/v/6OMVWiiycLs', }
    diff --git a/apps/docs/pages/guides/functions/typescript-support.mdx b/apps/docs/pages/guides/functions/typescript-support.mdx index f210b7c2a0f..66f6ce4c9b6 100644 --- a/apps/docs/pages/guides/functions/typescript-support.mdx +++ b/apps/docs/pages/guides/functions/typescript-support.mdx @@ -44,7 +44,7 @@ the [Types and type declarations](./types.md) section. ## Type resolution One of the core design principles of Deno is to avoid non-standard module -resolution, and this applies to type resolution as well. If you want to utilise +resolution, and this applies to type resolution as well. If you want to utilize JavaScript that has type definitions (e.g. a `.d.ts` file), you have to explicitly tell Deno about this. The details of how this is accomplished are covered in the [Types and type declarations](https://deno.land/manual/advanced/typescript/types) section. From fde3df828b9a97f144140c0ac2a1805e80f88bfa Mon Sep 17 00:00:00 2001 From: ApollonNishikawa <89737688+ApollonNishikawa@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:09:59 +0900 Subject: [PATCH 07/12] Fix with-expo.mdx Fixed forgetting to apply container style. --- .../docs/pages/guides/getting-started/tutorials/with-expo.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx index 5c47ae577b3..2ad275085aa 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx @@ -99,7 +99,7 @@ export default function Auth() { } return ( - + + From 022cc52636ac417ca0f58daa5ef25edb63baae1c Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Sun, 26 Mar 2023 14:15:56 -0230 Subject: [PATCH 08/12] Spelling --- apps/docs/pages/guides/cli/local-development.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/pages/guides/cli/local-development.mdx b/apps/docs/pages/guides/cli/local-development.mdx index 5438b2e941c..aec434ecea1 100644 --- a/apps/docs/pages/guides/cli/local-development.mdx +++ b/apps/docs/pages/guides/cli/local-development.mdx @@ -9,7 +9,7 @@ export const meta = { Supabase is a flexible platform that lets you decide how you want to build your projects. You can use the Dashboard directly to get up and running quickly, or use a proper local setup. We suggest you work locally and deploy your changes to a linked project on the [Supabase Platform](https://app.supabase.io/). -Doing things directly on the platform via the [Dashboard](https://app.supabase.io/) is fine when you're getting started, but it's a good idea to move to a proper local workflow before you get too far. Working locally, generating migrations as you change your tables, and appling those migrations to a linked project on the [Platform](https://app.supabase.io/) keeps everything nicely organized as you grow. +Doing things directly on the platform via the [Dashboard](https://app.supabase.io/) is fine when you're getting started, but it's a good idea to move to a proper local workflow before you get too far. Working locally, generating migrations as you change your tables, and applying those migrations to a linked project on the [Platform](https://app.supabase.io/) keeps everything nicely organized as you grow. ## Why develop locally? @@ -23,7 +23,7 @@ The Dashboard provides a wide range of features for setting up your project: cre 4. **Configuration in code**: If you directly change your tables via the Dashboard, none of that gets captured in code. If you follow these local development practices, you'll store all of your table schemas in code. -5. **Work offline**: Need to work from a train? A plain? An automobile? No problem. Developing your project locally allows you to work offline. +5. **Work offline**: Need to work from a train? A plane? An automobile? No problem. Developing your project locally allows you to work offline.