diff --git a/apps/docs/components/Navigation/Navigation.constants.ts b/apps/docs/components/Navigation/Navigation.constants.ts index 0c5bcbdb8e2..1e8f220bffa 100644 --- a/apps/docs/components/Navigation/Navigation.constants.ts +++ b/apps/docs/components/Navigation/Navigation.constants.ts @@ -253,7 +253,7 @@ export const menuItems: NavMenu = { { label: 'Platform', items: [ - { name: 'Overview', url: '/guides/hosting/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: [] }, diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 5ea6c6b7aef..f05bc049aa0 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -462,7 +462,6 @@ export const platform = { label: 'Platform', url: '/guides/platform', items: [ - { name: 'Overview', url: '/guides/hosting/platform', items: [] }, { name: 'Add-ons', url: undefined, @@ -501,7 +500,6 @@ export const resources = { url: '/guides/resources', items: [ { name: 'Examples', url: '/guides/resources/examples', items: [] }, - { name: 'Features', url: '/features', items: [] }, { name: 'Glossary', url: '/guides/resources/glossary', items: [] }, { name: 'Migrate to Supabase', @@ -557,23 +555,23 @@ export const resources = { ], }, { - name: 'Self-Hosting reference docs', + name: 'Self-Hosting Reference', items: [ { - name: 'Auth server', - url: '/reference/self-hosting-auth', + name: 'Auth Server', + url: '/reference/self-hosting-auth/introduction', icon: '/docs/img/icons/menu/reference-auth', items: [], }, { - name: 'Storage server', - url: '/reference/self-hosting-storage', + name: 'Storage Server', + url: '/reference/self-hosting-storage/introduction', icon: '/docs/img/icons/menu/reference-storage', items: [], }, { - name: 'Realtime server', - url: '/reference/self-hosting-realtime', + name: 'Realtime Server', + url: '/reference/self-hosting-realtime/introduction', icon: '/docs/img/icons/menu/reference-realtime', items: [], }, @@ -750,22 +748,22 @@ export const reference_api = { export const reference_self_hosting_auth = { icon: 'reference-auth', - title: 'Self Hosting Auth', + title: 'Self-Hosting Auth', url: '/guides/reference/self-hosting/auth', parent: '/reference', } export const reference_self_hosting_storage = { icon: 'reference-storage', - title: 'Self Hosting Storage', - url: '/guides/reference/self-hosting/auth', + title: 'Self-Hosting Storage', + url: '/guides/reference/self-hosting/storage', parent: '/reference', } export const reference_self_hosting_realtime = { icon: 'reference-auth', - title: 'Self Hosting Realtime', - url: '/guides/reference/self-hosting/auth', + title: 'Self-Hosting Realtime', + url: '/guides/reference/self-hosting/realtime', parent: '/reference', } diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx index e852ba2bb57..6c1cabfd158 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx @@ -106,8 +106,7 @@ const SideNav = () => { case url.includes(`/docs/guides/storage`) && url: menuState.setMenuLevelId('storage') break - case url.includes(`/docs/guides/platform`) || - (url.includes(`/docs/guides/hosting/platform`) && url): + case url.includes(`/docs/guides/platform`) && url: menuState.setMenuLevelId('platform') break case url.includes(`/docs/guides/resources`) && url: @@ -213,7 +212,7 @@ const SideNav = () => { { label: 'Platform', icon: '/img/icons/menu/platform', - href: '/guides/hosting/platform', + href: '/guides/platform', level: 'platform', }, { diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx index b9cc5359eac..dc2fe22f731 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx @@ -86,10 +86,9 @@ const NavigationMenuRefList: React.FC = ({ let sections = commonSections - // console.log('sections', sections) - if (!sections) console.error('no common sections imported') + const allowedKeys = allowedClientKeys - // console.log(id, 'sections in ref menu', sections) + if (!sections) console.error('no common sections imported') const menu = NavItems[id] @@ -101,8 +100,6 @@ const NavigationMenuRefList: React.FC = ({ ? find(sections, { title: 'Auth' }).items : [] - // console.log('databaseFunctions', databaseFunctions) - const filterIds = databaseFunctions.length > 0 ? find(databaseFunctions, { @@ -110,9 +107,10 @@ const NavigationMenuRefList: React.FC = ({ }) && find(databaseFunctions, { id: 'using-filters', - }).items.map((x) => x.id) + }) + .items.filter((x) => allowedKeys.includes(x.id)) + .map((x) => x.id) : [] - const modifierIds = databaseFunctions.length > 0 ? find(databaseFunctions, { @@ -120,7 +118,9 @@ const NavigationMenuRefList: React.FC = ({ }) && find(databaseFunctions, { id: 'using-modifiers', - }).items.map((x) => x.id) + }) + .items.filter((x) => allowedKeys.includes(x.id)) + .map((x) => x.id) : [] const authServerIds = @@ -133,9 +133,6 @@ const NavigationMenuRefList: React.FC = ({ }).items.map((x) => x.id) : [] - // console.log(filterIds) - // console.log(modifierIds) - return (
= ({ // // check if the link is allowed to be displayed function isFuncNotInLibraryOrVersion(id, type) { - if ( - id && - allowedClientKeys && - !allowedClientKeys.includes(id) && - type !== 'markdown' - ) { + if (id && allowedKeys && !allowedKeys.includes(id) && type !== 'markdown') { /* * Remove this menu link from side bar, as it does not exist for either * this language, or for this lib version @@ -212,8 +204,6 @@ const NavigationMenuRefList: React.FC = ({ const activeAccordianItem = useMenuActiveRefId() let active = false - // console.log('activeAccordianItem', activeAccordianItem) - const isFilter = filterIds && filterIds.length > 0 && filterIds.includes(activeAccordianItem) const isModifier = @@ -223,45 +213,25 @@ const NavigationMenuRefList: React.FC = ({ authServerIds.length > 0 && authServerIds.includes(activeAccordianItem) - // console.log('isFilter', props.id, isFilter) - // console.log('isModifier', props.id, isModifier) - if ( (isFilter && !isModifier && !isAuthServer && props.id === 'using-filters') || - (activeAccordianItem === 'using-filters' && - !isModifier && - !isFilter && - props.id === 'using-filters') + (activeAccordianItem === 'using-filters' && props.id === 'using-filters') ) { active = true } else if ( (isModifier && !isFilter && !isAuthServer && props.id === 'using-modifiers') || - (activeAccordianItem === 'using-modifiers' && - !isFilter && - !isModifier && - props.id === 'using-modifiers') + (activeAccordianItem === 'using-modifiers' && props.id === 'using-modifiers') ) { active = true } else if ( (isAuthServer && !isFilter && !isModifier && props.id === 'admin-api') || - (activeAccordianItem === 'admin-api' && - !isFilter && - !isModifier && - !isAuthServer && - props.id === 'admin-api') + (activeAccordianItem === 'admin-api' && props.id === 'admin-api') ) { active = true } else { active = false } - // if (props.id === 'using-filters') { - // console.log('using-filters', active) - // } - // if (props.id === 'using-modifiers') { - // console.log('using-modifiers', active) - // } - return ( = ({ className="transition data-open:animate-slide-down data-closed:animate-slide-up ml-2" > {props.items && - props.items.map((item) => { - return - })} + props.items + .filter((item) => allowedKeys.includes(item.id)) + .map((item) => { + return + })} @@ -303,7 +275,6 @@ const NavigationMenuRefList: React.FC = ({ ) } else { // handle normal links - return ( <> @@ -316,35 +287,6 @@ const NavigationMenuRefList: React.FC = ({ } })} - {/* {menu.extras && ( - <> - {' '} - - Resources - - - )} - {menu.extras?.map((x) => { - return ( - - ) - })} */}
) diff --git a/apps/docs/docs/ref/api/introduction.mdx b/apps/docs/docs/ref/api/introduction.mdx index 47dbbcf3cd4..68d27b6e1b8 100644 --- a/apps/docs/docs/ref/api/introduction.mdx +++ b/apps/docs/docs/ref/api/introduction.mdx @@ -14,6 +14,8 @@ hideTitle: true + Manage your Supabase organizations and projects programmatically. + ## Status The Management API is in `beta`. It is usable in it's current state, but it's likely that there will be breaking changes. @@ -44,7 +46,7 @@ hideTitle: true - [OpenAPI Docs](https://api.supabase.com/api/v1) - [OpenAPI Spec](https://api.supabase.com/api/v1-json) - - Reporting bugs and issues: [github.com/supabase/supabase](https://github.com/supabase/supabase) + - [Report bugs and issues](https://github.com/supabase/supabase) diff --git a/apps/docs/docs/ref/cli/introduction.mdx b/apps/docs/docs/ref/cli/introduction.mdx index bb12eea9481..e204038abae 100644 --- a/apps/docs/docs/ref/cli/introduction.mdx +++ b/apps/docs/docs/ref/cli/introduction.mdx @@ -11,9 +11,33 @@ hideTitle: true -
- This reference documents every object and method available in Supabase's isomorphic JavaScript - library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to - database changes, invoke Deno Edge Functions, build login and user management functionality, and - manage large files. -
+ + + + The Supabase CLI provides tools to develop your project locally and deploy to the Supabase Platform. + The CLI is still under development, but it contains all the functionality for working with your Supabase projects and the Supabase Platform. + + - Run Supabase locally: [`supabase start`](/docs/reference/cli/usage#supabase-start) + - Manage database migrations: [`supabase migration`](/docs/reference/cli/usage#supabase-migration) + - CI/CD for releasing to production: [`supabase db push`](/docs/reference/cli/usage#supabase-db-push) + - Manage your Supabase projects: [`supabase projects`](/docs/reference/cli/usage#supabase-projects) + - Generate types directly from your database schema: [`supabase gen types`](/docs/reference/cli/usage#supabase-gen) + - A [community-supported GitHub Action](https://github.com/lyqht/generate-supabase-db-types-github-action) to generate TypeScript types + - Shell autocomplete: [`supabase completion`](/docs/reference/cli/usage#supabase-completion) + - A [community-supported Fig autocomplete spec](https://fig.io/manual/supabase) for macOS terminal + + + + + + ### Additional links + + - [Install the Supabase CLI](/docs/guides/cli) + - [Source code](https://github.com/supabase/cli) + - [Known bugs and issues](https://github.com/supabase/cli/issues) + - [Supabase CLI v1 and Management API Beta](https://supabase.com/blog/supabase-cli-v1-and-admin-api-beta) + - [Video: Announcing CLI V1 and Management API Beta](https://www.youtube.com/watch?v=OpPOaJI_Z28) + + + + diff --git a/apps/docs/docs/ref/javascript/release-notes.mdx b/apps/docs/docs/ref/javascript/release-notes.mdx index ba55be387c5..f997c312e77 100644 --- a/apps/docs/docs/ref/javascript/release-notes.mdx +++ b/apps/docs/docs/ref/javascript/release-notes.mdx @@ -288,7 +288,7 @@ Deprecated and removed `setAuth()` . To set a custom `access_token` jwt instead, - `getPublicURL` only returns the public URL inside the data object. This keeps it consistent with our other methods of returning only within the data object. No error is returned since this method cannot does not throw an error ([PR](https://github.com/supabase/storage-js/pull/93)) - signed urls are returned as `signedUrl` instead of `signedURL` in both `createSignedUrl` and `createSignedUrls` ([PR](https://github.com/supabase/storage-js/pull/94)) - Encodes URLs returned by `createSignedUrl`, `createSignedUrls` and `getPublicUrl` ([PR](https://github.com/supabase/storage-js/pull/86)) - - `createsignedUrl` used to return a url directly and and within the data object. This was inconsistent. Now we always return values only inside the data object across all methods. ([PR](https://www.notion.so/LW5-supabase-js-v2-7b0bfcdf571d4f20b9b7a9308883f24b)) + - `createsignedUrl` used to return a url directly and and within the data object. This was inconsistent. Now we always return values only inside the data object across all methods. ([PR](https://github.com/supabase/storage-js/pull/88)) - `createBucket` returns a data object instead of the name of the bucket directly. ([PR](https://github.com/supabase/storage-js/pull/89)) - Fixed types for metadata ([PR](https://github.com/supabase/storage-js/pull/90)) - Better error types make it easier to track down what went wrong quicker. diff --git a/apps/docs/docs/ref/self-hosting-auth/introduction.mdx b/apps/docs/docs/ref/self-hosting-auth/introduction.mdx index 3e1af1ff9dd..d33aee3de4f 100644 --- a/apps/docs/docs/ref/self-hosting-auth/introduction.mdx +++ b/apps/docs/docs/ref/self-hosting-auth/introduction.mdx @@ -5,16 +5,34 @@ hideTitle: true ---
- +
-

Javascript Client Library

-

@supabase/supabase-js

+

Self-Hosting Auth

-
- This reference documents every object and method available in Supabase's isomorphic JavaScript - library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to - database changes, invoke Deno Edge Functions, build login and user management functionality, and - manage large files. -
+ + + + The Supabase Auth Server (GoTrue) is a JSON Web Token (JWT)-based API for managing users and issuing access tokens. + + GoTrue is an open-source API written in Golang, that acts as a self-standing API service for handling user registration and authentication for JAM projects. It's based on OAuth2 and JWT and handles user signup, authentication, and custom user data. + + + + + + ### Client libraries + + - [JavaScript](https://github.com/supabase/gotrue-js) + - [Dart](https://github.com/supabase/gotrue-dart) + + ### Additional links + + - [Source code](https://github.com/supabase/gotrue) + - [Known bugs and issues](https://github.com/supabase/gotrue/issues) + - [Auth guides](/docs/guides/auth) + + + + diff --git a/apps/docs/docs/ref/self-hosting-realtime/introduction.mdx b/apps/docs/docs/ref/self-hosting-realtime/introduction.mdx index 3e1af1ff9dd..310e0c96192 100644 --- a/apps/docs/docs/ref/self-hosting-realtime/introduction.mdx +++ b/apps/docs/docs/ref/self-hosting-realtime/introduction.mdx @@ -5,16 +5,69 @@ hideTitle: true ---
- +
-

Javascript Client Library

-

@supabase/supabase-js

+

Self-Hosting Realtime

-
- This reference documents every object and method available in Supabase's isomorphic JavaScript - library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to - database changes, invoke Deno Edge Functions, build login and user management functionality, and - manage large files. -
+ + + + Supabase Realtime is a server built with Elixir using the [Phoenix Framework](https://www.phoenixframework.org) that allows you to listen to changes in your PostgreSQL database via logical replication and then broadcast those changes via WebSockets. + + There are two versions of this server: `Realtime` and `Realtime RLS`. + + `Realtime` server works by: + + 1. Listening to PostgreSQL's replication functionality (using PostgreSQL's logical decoding) + 2. Converting the byte stream into JSON + 3. Broadcasting to all connected clients over WebSockets + + `Realtime RLS` server works by: + + 1. Polling PostgreSQL's replication functionality (using PostgreSQL's logical decoding and [wal2json](https://github.com/eulerto/wal2json) output plugin) + 2. Passing database changes to a [Write Ahead Log Realtime Unified Security (WALRUS)](https://github.com/supabase/walrus) PostgresSQL function and receiving a list of authorized subscribers depending on Row Level Security (RLS) policies + 3. Converting the changes into JSON + 4. Broadcasting to authorized subscribers over WebSockets + + ## Why not just use PostgreSQL's `NOTIFY`? + + A few reasons: + + 1. You don't have to set up triggers on every table. + 2. `NOTIFY` has a payload limit of 8000 bytes and will fail for anything larger. The usual solution is to send an ID and then fetch the record, but that's heavy on the database. + 3. `Realtime` server consumes two connections to the database, then you can connect many clients to this server. Easier on your database, and to scale up you just add additional `Realtime` servers. + + ## Benefits + + 1. The beauty of listening to the replication functionality is that you can make changes to your database from anywhere - your API, directly in the DB, via a console, etc. - and you will still receive the changes via WebSockets. + 2. Decoupling. For example, if you want to send a new slack message every time someone makes a new purchase you might build that functionality directly into your API. This allows you to decouple your async functionality from your API. + 3. This is built with Phoenix, an [extremely scalable Elixir framework](https://www.phoenixframework.org/blog/the-road-to-2-million-websocket-connections). + + ## Does this server guarantee delivery of every data change? + + Not yet! Due to the following limitations: + + 1. Postgres database runs out of disk space due to Write-Ahead Logging (WAL) buildup, which can crash the database and prevent Realtime server from receiving and broadcasting changes. This can be mitigated in the Realtime RLS version of this server by setting the Postgres config `max_slot_wal_keep_size` to a reasonable size. + 2. Realtime server can crash due to a larger replication lag than available memory, forcing the creation of a new replication slot and resetting replication to read from the latest WAL data. + 3. When Realtime server falls too far behind for any reason, for example disconnecting from database as WAL continues to build up, then database can delete WAL segments the server still needs to read from, for example after reconnecting. + + + + + + ### Client libraries + + - [JavaScript](https://github.com/supabase/realtime-js) + - [Dart](https://github.com/supabase/realtime-dart) + + ### Additional links + + - [Source code](https://github.com/supabase/realtime) + - [Known bugs and issues](https://github.com/supabase/realtime/issues) + - [Realtime guides](/docs/guides/realtime) + + + + diff --git a/apps/docs/docs/ref/self-hosting-storage/introduction.mdx b/apps/docs/docs/ref/self-hosting-storage/introduction.mdx index 3e1af1ff9dd..40fd27d4ce8 100644 --- a/apps/docs/docs/ref/self-hosting-storage/introduction.mdx +++ b/apps/docs/docs/ref/self-hosting-storage/introduction.mdx @@ -5,16 +5,39 @@ hideTitle: true ---
- +
-

Javascript Client Library

-

@supabase/supabase-js

+

Self-Hosting Storage

-
- This reference documents every object and method available in Supabase's isomorphic JavaScript - library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to - database changes, invoke Deno Edge Functions, build login and user management functionality, and - manage large files. -
+ + + + An S3 compatible object storage service that integrates with Postgres. + + - Uses Postgres as it's datastore for storing metadata + - Authorization rules are written as Postgres Row Level Security policies + - Integrates with S3 as the storage backend (with more in the pipeline!) + - Extremely lightweight and performant + + + + + + ### Client libraries + + - [JavaScript](https://github.com/supabase/storage-js) + - [Dart](https://github.com/supabase/storage-dart) + + ### Additional links + + - [Source code](https://github.com/supabase/storage-api) + - [Known bugs and issues](https://github.com/supabase/storage-js/issues) + - [Storage guides](/docs/guides/storage) + - [OpenAPI docs](https://supabase.github.io/storage-api/) + - [Why we built a new object storage service](https://supabase.com/blog/supabase-storage) + + + + diff --git a/apps/docs/pages/guides/getting-started.mdx b/apps/docs/pages/guides/getting-started.mdx index 700789231a1..f751794966c 100644 --- a/apps/docs/pages/guides/getting-started.mdx +++ b/apps/docs/pages/guides/getting-started.mdx @@ -4,8 +4,8 @@ import { GlassPanel, IconPanel, Button, IconChevronRight } from 'ui' export const meta = { id: 'getting-started', - title: 'Getting started', - description: 'Resources for getting started building with Supabase.', + title: 'Getting Started', + description: 'Resources for getting started with Supabase.', }
@@ -55,91 +55,91 @@ export const meta = { export const webapps = [ { title: 'NextJS', - href: '/guides/tutorials/with-nextjs', + href: '/guides/getting-started/tutorials/with-nextjs', description: 'Learn how to build a user management app with NextJS and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/nextjs-icon', }, { title: 'React', - href: '/guides/tutorials/with-react', + href: '/guides/getting-started/tutorials/with-react', description: 'Learn how to build a user management app with React and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/react-icon', }, { title: 'Vue 3', - href: '/guides/tutorials/with-vue-3', + href: '/guides/getting-started/tutorials/with-vue-3', description: 'Learn how to build a user management app with Vue 3 and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/vuejs-icon', }, { title: 'Nuxt 3', - href: '/guides/tutorials/with-nuxt-3', + href: '/guides/getting-started/tutorials/with-nuxt-3', description: 'Learn how to build a user management app with Nuxt 3 and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/nuxt-icon', }, { - title: 'Anglular', - href: '/guides/tutorials/with-angular', + title: 'Angular', + href: '/guides/getting-started/tutorials/with-angular', description: 'Learn how to build a user management app with Nuxt 3 and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/angular-icon', }, { title: 'RedwoodJS', - href: '/guides/tutorials/with-redwoodjs', + href: '/guides/getting-started/tutorials/with-redwoodjs', description: 'Learn how to build a user management app with Nuxt 3 and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/redwood-icon', }, { title: 'Svelte', - href: '/guides/tutorials/with-svelte', + href: '/guides/getting-started/tutorials/with-svelte', description: 'Learn how to build a user management app with Nuxt 3 and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/svelte-icon', }, { title: 'SvelteKit', - href: '/guides/tutorials/with-sveltekit', + href: '/guides/getting-started/tutorials/with-sveltekit', description: 'Learn how to build a user management app with Nuxt 3 and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/svelte-icon', }, { title: 'Flutter', - href: '/guides/tutorials/with-flutter', + href: '/guides/getting-started/tutorials/with-flutter', description: 'Learn how to build a user management app with Flutter and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/flutter-icon', }, { title: 'Expo', - href: '/guides/tutorials/with-expo', + href: '/guides/getting-started/tutorials/with-expo', description: 'Learn how to build a user management app with React and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/expo-icon', }, { title: 'Ionic React', - href: '/guides/tutorials/with-ionic-react', + href: '/guides/getting-started/tutorials/with-ionic-react', description: 'Learn how to build a user management app with React and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/ionic-icon', }, { title: 'Ionic Vue', - href: '/guides/tutorials/with-ionic-vue', + href: '/guides/getting-started/tutorials/with-ionic-vue', description: 'Learn how to build a user management app with Flutter and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/ionic-icon', }, { title: 'Ionic Angular', - href: '/guides/tutorials/with-ionic-angular', + href: '/guides/getting-started/tutorials/with-ionic-angular', description: 'Learn how to build a user management app with NextJS and Supabase Database, Auth, and Storage functionality.', icon: '/docs/img/icons/ionic-icon', @@ -156,9 +156,9 @@ export const resources = [ { title: 'Architecture', hasLightIcon: true, - href: '/guides/resources/examples', + href: '/architecture', description: - 'Supabase is open source. We choose open source tools which are scalable and make them simple to use.', + 'An overview of Supabase\'s architecture and product principles.', }, ] diff --git a/apps/docs/pages/guides/integrations.mdx b/apps/docs/pages/guides/integrations.mdx index cefcde3bef5..f4167b280a1 100644 --- a/apps/docs/pages/guides/integrations.mdx +++ b/apps/docs/pages/guides/integrations.mdx @@ -13,13 +13,12 @@ Explore a variety of integrations from Supabase partners. Need a different integ {integrations.items.map((item) => (

{item.name}

-
+
{item.items.map((integration) => ( - + } > diff --git a/apps/docs/pages/guides/hosting/platform.mdx b/apps/docs/pages/guides/platform.mdx similarity index 100% rename from apps/docs/pages/guides/hosting/platform.mdx rename to apps/docs/pages/guides/platform.mdx diff --git a/apps/docs/pages/guides/platform/custom-domains.mdx b/apps/docs/pages/guides/platform/custom-domains.mdx index b6750653aba..2690eb5f23b 100644 --- a/apps/docs/pages/guides/platform/custom-domains.mdx +++ b/apps/docs/pages/guides/platform/custom-domains.mdx @@ -18,7 +18,7 @@ To get started: 1. [Install](/docs/guides/cli) the Supabase CLI 1.11.3+. 1. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI. -1. Ensure that you have [Owner or Admin permissions](/docs/guides/hosting/platform#manage-team-members) for the project you'd like to set up a custom domain for. +1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform#manage-team-members) for the project you'd like to set up a custom domain for. 1. Enable the Custom Domains add-on in the Billing page of the Dashboard. ## Configure a Custom Domain @@ -85,9 +85,63 @@ supabase domains delete --project-ref foobarbaz --experimental As with the final activation stage of the process for setting up a custom domain, you'll need to update any references in your client code and OAuth providers from the custom domain to the Supabase-provisioned endpoints. +## Vanity Subdomains + + + +Vanity Subdomains are currently in beta, and are being slowly made available to projects. [Contact Support](https://app.supabase.com/support/new) if you'd like to request early access. + + + +Vanity Subdomains allow you to present a basic branded experience, compared to custom domains. They allow you to host your services at a custom subdomain on Supabase (e.g., `my-example-brand.supabase.co`) instead of the default, randomly-assigned `foobarbaz.supabase.co`. + +To get started: + +1. [Install](/docs/guides/cli) the Supabase CLI 1.22.0+. +1. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI. +1. Ensure that you have [Owner or Admin permissions](/docs/guides/hosting/platform#manage-team-members) for the project you'd like to set up a vanity subdomain for. +1. Ensure that your project has a paid subscription (Pro/Pay as you go/Enterprise tier) in the [Billing page of the Dashboard](https://app.supabase.com/project/_/settings/billing/subscription). + +## Configure a Vanity Subdomain + +This example assumes your Supabase project is `foobarbaz` with a corresponding API URL `foobarbaz.supabase.co` and configures a vanity subdomain at `my-example-brand.supabase.co`. + +### Check subdomain availability + +Use the `check-availability` subcommand of the CLI to check if your desired subdomain is available for use: + +```bash +supabase vanity-subdomains --project-ref foobarbaz check-availability --desired-subdomain my-example-brand --experimental +``` + +### Activate a subdomain + +Once you've chosen an available subdomain, you can reconfigure your Supabase project to start serving traffic on the vanity subdomain (`my-example-brand.supabase.co`). +The auth service, in particular, will no longer work with the original URL (`foobarbaz.supabase.co`). +As such, it is recommended that you schedule a downtime window of 20-30 minutes, depending on the complexity of your project, to update all the services that need to know about your vanity subdomain: + +- any client code (e.g., frontends, mobile apps) +- any OAuth providers (e.g., Google, GitHub) + +The `activate` subcommand can be used to initiate the activation: + +```bash +supabase vanity-subdomains --project-ref fwmssjhjgszhnavvqxnt check-availability --desired-subdomain my-example-subdomain --experimental +``` + +## Remove a Vanity Subdomain + +If you have a vanity subdomain (`my-example-brand.supabase.co`) set up for your Supabase project (ref `foobarbaz`, with assigned endpoints at `foobarbaz.supabase.co`), and would like to go back to using the Supabase-provisioned endpoints (`foobarbaz.supabase.co`), you can use the `delete` subcommand: + +```bash +supabase vanity-subdomains delete --project-ref foobarbaz --experimental +``` + +As with the final activation stage of the process for setting up a vanity subdomain, you'll need to update any references in your client code and OAuth providers from the vanity subdomain to the Supabase-provisioned endpoints. + ## Limitations -Edge functions do not honor the custom domain setting and they still have to be invoked via the `foobarbaz.supabase.co` domain. +Edge functions do not honor the custom domain or the vanity subdomain setting and they still have to be invoked via the `foobarbaz.supabase.co` domain. export const Page = ({ children }) => diff --git a/apps/docs/pages/guides/storage/quickstart.mdx b/apps/docs/pages/guides/storage/quickstart.mdx index 20b99aee99f..7309f2730af 100644 --- a/apps/docs/pages/guides/storage/quickstart.mdx +++ b/apps/docs/pages/guides/storage/quickstart.mdx @@ -7,7 +7,7 @@ export const meta = { sidebar_label: 'Quickstart', } -This guide shows the basic functionality of Supabase Storage. Find a full [example application on GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/nextjs-ts-user-management) you can deploy yourself. +This guide shows the basic functionality of Supabase Storage. Find a full [example application on GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/nextjs-ts-user-management) or deploy it with Vercel for a preview: [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fuser-management%2Fnextjs-ts-user-management&project-name=supabase-user-management&repository-name=supabase-user-management&demo-title=Supabase%20User%20Management&demo-description=An%20example%20web%20app%20using%20Supabase%20and%20Next.js&demo-url=https%3A%2F%2Fsupabase-nextjs-ts-user-management.vercel.app&demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv&external-id=nextjs-user-management) diff --git a/apps/docs/pages/new/index.mdx b/apps/docs/pages/new/index.mdx index c2f817766d4..b17f706beb3 100644 --- a/apps/docs/pages/new/index.mdx +++ b/apps/docs/pages/new/index.mdx @@ -294,7 +294,7 @@ export const platform = [ title: 'Platform Guides', icon: '/docs/img/icons/menu/platform', hasLightIcon: true, - href: 'guides/hosting/platform', + href: 'guides/platform', description: 'Learn more about the tools and services powering the Supabase Platform, available add-ons, and how to customize the platform for your needs.', }, diff --git a/apps/docs/pages/reference/self-hosting-realtime/[...slug].tsx b/apps/docs/pages/reference/self-hosting-realtime/[...slug].tsx index a32858330c9..240ea180f0c 100644 --- a/apps/docs/pages/reference/self-hosting-realtime/[...slug].tsx +++ b/apps/docs/pages/reference/self-hosting-realtime/[...slug].tsx @@ -13,7 +13,7 @@ export default function JSReference(props) { } export async function getStaticProps({ params }: { params: { slug: string[] } }) { - return handleRefStaticProps(sections, params, '/self-hosting-auth', '/self-hosting-auth') + return handleRefStaticProps(sections, params, '/self-hosting-realtime', '/self-hosting-realtime') } export function getStaticPaths() { diff --git a/apps/docs/public/sitemap.xml b/apps/docs/public/sitemap.xml index 4d3f67e1b47..64b374684e4 100644 --- a/apps/docs/public/sitemap.xml +++ b/apps/docs/public/sitemap.xml @@ -649,7 +649,7 @@ - https://supabase.com/docs/guides/hosting/platform + https://supabase.com/docs/guides/platform weekly 0.5 diff --git a/apps/www/_blog/2022-08-19-launch-week-5-one-more-thing.mdx b/apps/www/_blog/2022-08-19-launch-week-5-one-more-thing.mdx index 1bf4d3bf1cc..1ad675b6b76 100644 --- a/apps/www/_blog/2022-08-19-launch-week-5-one-more-thing.mdx +++ b/apps/www/_blog/2022-08-19-launch-week-5-one-more-thing.mdx @@ -70,7 +70,7 @@ We've released granular permissions for the Supabase Dashboard. Dashboard permis We're starting with 3 roles—Owner, Administrator, and Developer—which you can edit in the Org settings of the Dashboard. There's a tooltip in the header of the members table, which elaborates on the individual permissions available for each role. -[Read more](/docs/guides/hosting/platform#manage-team-members). +[Read more](/docs/guides/platform#manage-team-members). --- diff --git a/apps/www/_blog/2022-12-12-new-supabase-docs-built-with-nextjs.mdx b/apps/www/_blog/2022-12-12-new-supabase-docs-built-with-nextjs.mdx index 7968bfe61d9..dbeca1493f0 100644 --- a/apps/www/_blog/2022-12-12-new-supabase-docs-built-with-nextjs.mdx +++ b/apps/www/_blog/2022-12-12-new-supabase-docs-built-with-nextjs.mdx @@ -72,7 +72,7 @@ With this foundation, we hope to re-imagine what a documentation experience can ### Fully integrated experience - **Unified Authentication:** If you’re logged into the Dashboard, then you’re logged into Supabase docs. That means personalization and project-specific documentation. No more placeholders like “`SUPABASE_URL`". We will add URLs and Keys for the project you’ve selected, making it easier to copy and run code snippets. -- **Auto docs:** We may also move AutoDocs (currenrly in the dashboard) into the main Docs website. Reference docs are then just, reference docs, but you can see it in context with the table/schema you're interested in. +- **Auto docs:** We may also move AutoDocs (currently in the dashboard) into the main Docs website. Reference docs are then just, reference docs, but you can see it in context with the table/schema you're interested in. ### Runnable code blocks diff --git a/apps/www/components/Favicons.tsx b/apps/www/components/Favicons.tsx index 5c65346f0fa..8cb53689b8c 100644 --- a/apps/www/components/Favicons.tsx +++ b/apps/www/components/Favicons.tsx @@ -24,7 +24,8 @@ const Favicons = () => { /> {/* */} - + {/* */} + diff --git a/apps/www/data/Community.tsx b/apps/www/data/Community.tsx index c202ce5f4ae..4a48cca53dd 100644 --- a/apps/www/data/Community.tsx +++ b/apps/www/data/Community.tsx @@ -12,7 +12,7 @@ type CommunityItem = { const data: CommunityItem[] = [ { title: 'Developers', - stat: '80,000+', + stat: '150,000+', statLabel: 'Registered developers', img: 'supabase.png', detail: () => ( diff --git a/apps/www/data/Footer.json b/apps/www/data/Footer.json index 0d97d37489e..98d012faf4e 100644 --- a/apps/www/data/Footer.json +++ b/apps/www/data/Footer.json @@ -72,10 +72,6 @@ "text": "Documentation", "url": "/docs" }, - { - "text": "API Reference", - "url": "/docs/reference" - }, { "text": "Changelog", "url": "/changelog" diff --git a/apps/www/lib/redirects.js b/apps/www/lib/redirects.js index ac351f8eb56..41552e25f88 100644 --- a/apps/www/lib/redirects.js +++ b/apps/www/lib/redirects.js @@ -537,9 +537,9 @@ module.exports = [ }, { - permanent: false, - source: '/docs/guides/platform', - destination: '/docs/guides/hosting/platform', + permanent: true, + source: '/docs/guides/hosting/platform', + destination: '/docs/guides/platform', }, { permanent: false, @@ -599,7 +599,7 @@ module.exports = [ { permanent: true, source: '/docs/reference/javascript/supabase-client', - destination: '/docs/reference', + destination: '/docs#reference-documentation', }, { permanent: true, @@ -1331,7 +1331,7 @@ module.exports = [ { permanent: true, source: '/docs/guides/client-libraries', - destination: '/docs/reference', + destination: '/docs#reference-documentation', }, { permanent: true, @@ -1595,4 +1595,9 @@ module.exports = [ source: '/docs/company/sla', destination: '/sla', }, + { + permanent: true, + source: '/docs/reference', + destination: '/docs#reference-documentation', + }, ] diff --git a/apps/www/pages/launch-week/index.tsx b/apps/www/pages/launch-week/index.tsx index c415316beaa..2fcd99cde21 100644 --- a/apps/www/pages/launch-week/index.tsx +++ b/apps/www/pages/launch-week/index.tsx @@ -38,6 +38,7 @@ export default function launchweek() { const { isDarkMode } = useTheme() const title = 'Launch Week 6' const description = 'Supabase Launch Week 6 | 12-18 Dec 2022' + const liveDay = 'Monday' const [supabase] = useState(() => createClient(process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!) @@ -93,15 +94,22 @@ export default function launchweek() { return ( ) } @@ -171,16 +189,6 @@ export default function launchweek() {

Dec 12 – 16 at 6 AM PT | 9 AM ET

- {process.env.NEXT_PUBLIC_LW_STARTED && ( -
- -
- )}
0 && (
{day1.description} - + Redesigned
- +
)} @@ -674,6 +688,18 @@ export default function launchweek() { )}
+ + {process.env.NEXT_PUBLIC_LW_STARTED && ( +
+ +
+ )} +
) diff --git a/apps/www/public/favicon/favicon-lw.svg b/apps/www/public/favicon/favicon-lw.svg new file mode 100644 index 00000000000..b34acb319ed --- /dev/null +++ b/apps/www/public/favicon/favicon-lw.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/apps/www/public/sitemap_www.xml b/apps/www/public/sitemap_www.xml index c8a1642fc83..ee99ac2420f 100644 --- a/apps/www/public/sitemap_www.xml +++ b/apps/www/public/sitemap_www.xml @@ -42,6 +42,12 @@ 0.5 + + https://supabase.com/oss + weekly + 0.5 + + https://supabase.com/support weekly @@ -60,6 +66,18 @@ 0.5 + + https://supabase.com/database + weekly + 0.5 + + + + https://supabase.com/edge-functions + weekly + 0.5 + + https://supabase.com/contact/enterprise weekly @@ -72,12 +90,6 @@ 0.5 - - https://supabase.com/database - weekly - 0.5 - - https://supabase.com/launch-week/ticket-image weekly @@ -96,12 +108,6 @@ 0.5 - - https://supabase.com/edge-functions - weekly - 0.5 - - https://supabase.com/nextjs weekly diff --git a/spec/cli_v1_commands.yaml b/spec/cli_v1_commands.yaml index f3eab57370e..a55059edbf6 100644 --- a/spec/cli_v1_commands.yaml +++ b/spec/cli_v1_commands.yaml @@ -1,7 +1,7 @@ -clispec: '001' +clispec: "001" info: id: cli - version: 1.14.3 + version: 1.23.0 title: Supabase CLI language: sh source: https://github.com/supabase/cli @@ -20,20 +20,89 @@ flags: - id: debug name: --debug description: output debug logs to stderr - default_value: 'false' + default_value: "false" - id: experimental name: --experimental description: enable experimental features - default_value: 'false' + default_value: "false" - id: help name: -h, --help description: help for supabase - default_value: 'false' + default_value: "false" - id: workdir name: --workdir description: path to a Supabase project directory - default_value: '' + default_value: "" commands: + - id: supabase-vanity-subdomains + title: supabase vanity-subdomains + summary: Manage vanity subdomains for Supabase projects + description: |- + Manage vanity subdomains for Supabase projects. + + Usage of vanity subdomains and custom domains is mutually exclusive. + tags: + - management-api + links: [] + subcommands: + - supabase-vanity-subdomains-activate + - supabase-vanity-subdomains-check-availability + - supabase-vanity-subdomains-delete + - supabase-vanity-subdomains-get + flags: + - id: project-ref + name: --project-ref + description: Project ref of the Supabase project. + default_value: "" + - id: supabase-vanity-subdomains-get + title: supabase vanity-subdomains get + summary: Get the current vanity subdomain + tags: [] + links: [] + usage: supabase vanity-subdomains get + subcommands: [] + flags: [] + - id: supabase-vanity-subdomains-delete + title: supabase vanity-subdomains delete + summary: Deletes a project's vanity subdomain + description: | + Deletes the vanity subdomain for a project, and reverts to using the project ref for routing. + tags: [] + links: [] + usage: supabase vanity-subdomains delete + subcommands: [] + flags: [] + - id: supabase-vanity-subdomains-check-availability + title: supabase vanity-subdomains check-availability + summary: Checks if a desired subdomain is available for use + tags: [] + links: [] + usage: supabase vanity-subdomains check-availability [flags] + subcommands: [] + flags: + - id: desired-subdomain + name: --desired-subdomain + description: | + The desired vanity subdomain to use for your Supabase project. + default_value: "" + - id: supabase-vanity-subdomains-activate + title: supabase vanity-subdomains activate + summary: Activate a vanity subdomain + description: | + Activate a vanity subdomain for your Supabase project. + + This reconfigures your Supabase project to respond to requests on your vanity subdomain. + After the vanity subdomain is activated, your project's auth services will no longer function on the {project-ref}.{supabase-domain} hostname. + tags: [] + links: [] + usage: supabase vanity-subdomains activate [flags] + subcommands: [] + flags: + - id: desired-subdomain + name: --desired-subdomain + description: | + The desired vanity subdomain to use for your Supabase project. + default_value: "" - id: supabase-test title: supabase test summary: Run tests on local Supabase containers @@ -63,7 +132,7 @@ commands: - id: backup name: --backup description: Backs up the current database before stopping. - default_value: 'false' + default_value: "false" - id: supabase-status title: supabase status summary: Show status of local Supabase containers @@ -74,25 +143,25 @@ commands: subcommands: [] flags: - id: output - name: -o, --output + name: -o, --output <[ env | json | pretty | toml | yaml ]> description: Output format of status variables. default_value: pretty accepted_values: - id: env name: env - type: string + type: '[ env | json | pretty | toml | yaml ]' - id: json name: json - type: string + type: '[ env | json | pretty | toml | yaml ]' - id: pretty name: pretty - type: string + type: '[ env | json | pretty | toml | yaml ]' - id: toml name: toml - type: string + type: '[ env | json | pretty | toml | yaml ]' - id: yaml name: yaml - type: string + type: '[ env | json | pretty | toml | yaml ]' - id: override-name name: --override-name description: Override specific variable names. @@ -103,9 +172,14 @@ commands: tags: - local-dev links: [] - usage: supabase start + usage: supabase start [flags] subcommands: [] - flags: [] + flags: + - id: exclude + name: -x, --exclude + description: | + Names of containers to not start. [gotrue, realtime, storage-api, imgproxy, kong, inbucket, postgrest, pgadmin-schema-diff, migra, postgres-meta, studio, deno-relay] + default_value: '[]' - id: supabase-secrets title: supabase secrets summary: Manage Supabase secrets @@ -138,7 +212,7 @@ commands: - id: env-file name: --env-file description: Read secrets from a .env file. - default_value: '' + default_value: "" - id: supabase-secrets-list title: supabase secrets list summary: List all secrets on Supabase @@ -178,39 +252,36 @@ commands: - id: db-password name: --db-password description: Database password of the project. - default_value: '' + default_value: "" - id: interactive name: -i, --interactive description: Enables interactive mode. - default_value: 'false' + default_value: "false" - id: org-id name: --org-id description: Organization ID to create the project in. - default_value: '' + default_value: "" - id: plan - name: --plan + name: --plan <[ free | pro ]> description: Select a plan that suits your needs. default_value: free accepted_values: - id: free name: free - type: string + type: '[ free | pro ]' - id: pro name: pro - type: string + type: '[ free | pro ]' - id: region name: --region description: Select a region close to you for the best performance. - default_value: '' + default_value: "" accepted_values: - - id: ca-central-1 - name: ca-central-1 + - id: ap-northeast-1 + name: ap-northeast-1 type: string - - id: eu-west-2 - name: eu-west-2 - type: string - - id: us-east-1 - name: us-east-1 + - id: ap-northeast-2 + name: ap-northeast-2 type: string - id: ap-south-1 name: ap-south-1 @@ -221,24 +292,30 @@ commands: - id: ap-southeast-2 name: ap-southeast-2 type: string + - id: ca-central-1 + name: ca-central-1 + type: string + - id: eu-central-1 + name: eu-central-1 + type: string - id: eu-west-1 name: eu-west-1 type: string + - id: eu-west-2 + name: eu-west-2 + type: string + - id: eu-west-3 + name: eu-west-3 + type: string - id: sa-east-1 name: sa-east-1 type: string + - id: us-east-1 + name: us-east-1 + type: string - id: us-west-1 name: us-west-1 type: string - - id: ap-northeast-1 - name: ap-northeast-1 - type: string - - id: ap-northeast-2 - name: ap-northeast-2 - type: string - - id: eu-central-1 - name: eu-central-1 - type: string - id: supabase-orgs title: supabase orgs summary: Manage Supabase organizations @@ -257,6 +334,44 @@ commands: usage: supabase orgs list subcommands: [] flags: [] + - id: supabase-network-restrictions + title: supabase network-restrictions + summary: Manage network restrictions + tags: + - management-api + links: [] + subcommands: + - supabase-network-restrictions-get + - supabase-network-restrictions-update + flags: + - id: project-ref + name: --project-ref + description: Project ref of the Supabase project. + default_value: "" + - id: supabase-network-restrictions-update + title: supabase network-restrictions update + summary: Update network restrictions + tags: [] + links: [] + usage: supabase network-restrictions update [flags] + subcommands: [] + flags: + - id: bypass-cidr-checks + name: --bypass-cidr-checks + description: Bypass some of the CIDR validation checks. + default_value: "false" + - id: db-allow-cidr + name: --db-allow-cidr + description: CIDR to allow DB connections from. + default_value: '[]' + - id: supabase-network-restrictions-get + title: supabase network-restrictions get + summary: Get the current network restrictions + tags: [] + links: [] + usage: supabase network-restrictions get + subcommands: [] + flags: [] - id: supabase-migration title: supabase migration summary: Manage database migration scripts @@ -266,7 +381,28 @@ commands: subcommands: - supabase-migration-list - supabase-migration-new + - supabase-migration-repair flags: [] + - id: supabase-migration-repair + title: supabase migration repair + summary: Repairs the migration history table + tags: [] + links: [] + usage: supabase migration repair [flags] + subcommands: [] + flags: + - id: status + name: --status <[ applied | reverted ]> + description: Version status to update. + required: true + default_value: "" + accepted_values: + - id: applied + name: applied + type: '[ applied | reverted ]' + - id: reverted + name: reverted + type: '[ applied | reverted ]' - id: supabase-migration-new title: supabase migration new summary: Create an empty migration script @@ -286,7 +422,7 @@ commands: - id: password name: -p, --password description: Password to your remote Postgres database. - default_value: '' + default_value: "" - id: supabase-login title: supabase login summary: Authenticate using an access token @@ -308,12 +444,12 @@ commands: - id: password name: -p, --password description: Password to your remote Postgres database. - default_value: '' + default_value: "" - id: project-ref name: --project-ref description: Project ref of the Supabase project. required: true - default_value: '' + default_value: "" - id: supabase-init title: supabase init summary: Initialize a local project @@ -353,19 +489,19 @@ commands: - id: db-url name: --db-url description: Generate types from a database url. - default_value: '' + default_value: "" - id: linked name: --linked description: Generate types from the linked project. - default_value: 'false' + default_value: "false" - id: local name: --local description: Generate types from the local dev database. - default_value: 'false' + default_value: "false" - id: project-id name: --project-id description: Generate types from a project ID. - default_value: '' + default_value: "" - id: schema name: --schema description: Schemas to generate types for. @@ -394,11 +530,11 @@ commands: name: --env-file description: | Path to an env file to be populated to the Function environment. - default_value: '' + default_value: "" - id: no-verify-jwt name: --no-verify-jwt description: Disable JWT verification for the Function. - default_value: 'false' + default_value: "false" - id: supabase-functions-new title: supabase functions new summary: Create a new Function locally @@ -419,15 +555,15 @@ commands: - id: legacy-bundle name: --legacy-bundle description: Use legacy bundling mechanism. - default_value: 'false' + default_value: "false" - id: no-verify-jwt name: --no-verify-jwt description: Disable JWT verification for the Function. - default_value: 'false' + default_value: "false" - id: project-ref name: --project-ref description: Project ref of the Supabase project. - default_value: '' + default_value: "" - id: supabase-functions-delete title: supabase functions delete summary: Delete a Function from Supabase @@ -441,10 +577,14 @@ commands: - id: project-ref name: --project-ref description: Project ref of the Supabase project. - default_value: '' + default_value: "" - id: supabase-domains title: supabase domains summary: Manage custom domain names for Supabase projects + description: | + Manage custom domain names for Supabase projects. + + Use of custom domains and vanity subdomains is mutually exclusive. tags: - management-api links: [] @@ -458,14 +598,14 @@ commands: - id: include-raw-output name: --include-raw-output description: Include raw output (useful for debugging). - default_value: 'false' + default_value: "false" - id: project-ref name: --project-ref description: Project ref of the Supabase project. - default_value: '' + default_value: "" - id: supabase-domains-reverify title: supabase domains reverify - summary: Re-verify the custom hostname config for your project. + summary: Re-verify the custom hostname config for your project tags: [] links: [] usage: supabase domains reverify @@ -473,7 +613,7 @@ commands: flags: [] - id: supabase-domains-get title: supabase domains get - summary: Get the current custom hostname config. + summary: Get the current custom hostname config description: | Retrieve the custom hostname config for your project, as stored in the Supabase platform. tags: [] @@ -483,7 +623,7 @@ commands: flags: [] - id: supabase-domains-delete title: supabase domains delete - summary: Deletes the custom hostname config for your project. + summary: Deletes the custom hostname config for your project tags: [] links: [] usage: supabase domains delete @@ -491,7 +631,7 @@ commands: flags: [] - id: supabase-domains-create title: supabase domains create - summary: Create a custom hostname. + summary: Create a custom hostname description: |- Create a custom hostname for your Supabase project. @@ -504,10 +644,10 @@ commands: - id: custom-hostname name: --custom-hostname description: The custom hostname to use for your Supabase project. - default_value: '' + default_value: "" - id: supabase-domains-activate title: supabase domains activate - summary: Activate the custom hostname for a project. + summary: Activate the custom hostname for a project description: |- Activates the custom hostname configuration for a project. @@ -530,6 +670,15 @@ commands: - supabase-db-push - supabase-db-remote - supabase-db-reset + - supabase-db-start + flags: [] + - id: supabase-db-start + title: supabase db start + summary: Starts local Postgres database + tags: [] + links: [] + usage: supabase db start + subcommands: [] flags: [] - id: supabase-db-reset title: supabase db reset @@ -545,13 +694,12 @@ commands: tags: [] links: [] subcommands: - - supabase-db-remote-changes - supabase-db-remote-commit flags: - id: password name: -p, --password description: Password to your remote Postgres database. - default_value: '' + default_value: "" - id: supabase-db-remote-commit title: supabase db remote commit summary: Commit remote changes as a new migration @@ -560,15 +708,6 @@ commands: usage: supabase db remote commit subcommands: [] flags: [] - - id: supabase-db-remote-changes - title: supabase db remote changes - summary: Show changes on the remote database - description: Show changes on the remote database since last migration. - tags: [] - links: [] - usage: supabase db remote changes - subcommands: [] - flags: [] - id: supabase-db-push title: supabase db push summary: Push new migrations to the remote database @@ -581,11 +720,11 @@ commands: name: --dry-run description: | Print the migrations that would be applied, but don't actually apply them. - default_value: 'false' + default_value: "false" - id: password name: -p, --password description: Password to your remote Postgres database. - default_value: '' + default_value: "" - id: supabase-db-lint title: supabase db lint summary: Checks local database for typing error @@ -595,16 +734,16 @@ commands: subcommands: [] flags: - id: level - name: --level + name: --level <[ warning | error ]> description: Error level to emit. default_value: warning accepted_values: - id: warning name: warning - type: string + type: '[ warning | error ]' - id: error name: error - type: string + type: '[ warning | error ]' - id: schema name: -s, --schema description: List of schema to include. @@ -620,11 +759,11 @@ commands: - id: file name: -f, --file description: Saves schema diff to a file. - default_value: '' + default_value: "" - id: linked name: --linked description: Diffs local schema against linked project. - default_value: 'false' + default_value: "false" - id: schema name: -s, --schema description: List of schema to include. @@ -632,7 +771,7 @@ commands: - id: use-migra name: --use-migra description: Use migra to generate schema diff. - default_value: 'false' + default_value: "false" - id: supabase-completion title: supabase completion summary: Generate the autocompletion script for the specified shell @@ -682,7 +821,7 @@ commands: - id: no-descriptions name: --no-descriptions description: disable completion descriptions - default_value: 'false' + default_value: "false" - id: supabase-completion-powershell title: supabase completion powershell summary: Generate the autocompletion script for powershell @@ -703,7 +842,7 @@ commands: - id: no-descriptions name: --no-descriptions description: disable completion descriptions - default_value: 'false' + default_value: "false" - id: supabase-completion-fish title: supabase completion fish summary: Generate the autocompletion script for fish @@ -727,7 +866,7 @@ commands: - id: no-descriptions name: --no-descriptions description: disable completion descriptions - default_value: 'false' + default_value: "false" - id: supabase-completion-bash title: supabase completion bash summary: Generate the autocompletion script for bash @@ -760,4 +899,4 @@ commands: - id: no-descriptions name: --no-descriptions description: disable completion descriptions - default_value: 'false' + default_value: "false" diff --git a/spec/common-client-libs-sections.json b/spec/common-client-libs-sections.json index 99f502ec128..57b71cf83f9 100644 --- a/spec/common-client-libs-sections.json +++ b/spec/common-client-libs-sections.json @@ -72,14 +72,6 @@ "type": "function", "libs": ["js", "js_v1", "dart", "dart_v0"] }, - { - "id": "tester", - "title": "literally a test", - "slug": "tester", - "product": "database", - "type": "function", - "libs": ["dart", "dart_v0"] - }, { "id": "using-filters", "isFunc": false, diff --git a/spec/examples/examples.yml b/spec/examples/examples.yml index 71dc1646a71..d2bc4403b6e 100644 --- a/spec/examples/examples.yml +++ b/spec/examples/examples.yml @@ -749,7 +749,7 @@ functions: - By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's [API settings](https://app.supabase.com/project/_/settings/api). It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data. - `select()` can be combined with [Filters](/docs/reference/javascript/using-filters) - `select()` can be combined with [Modifiers](/docs/reference/javascript/using-modifiers) - - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/hosting/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). + - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). examples: - id: getting-your-data name: Getting your data diff --git a/spec/supabase_js_v2--old.yml b/spec/supabase_js_v2--old.yml index cf95996c5f1..f245467e26c 100644 --- a/spec/supabase_js_v2--old.yml +++ b/spec/supabase_js_v2--old.yml @@ -688,7 +688,7 @@ pages: - By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's [API settings](https://app.supabase.com/project/_/settings/api). It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data. - `select()` can be combined with [Filters](/docs/reference/javascript/using-filters) - `select()` can be combined with [Modifiers](/docs/reference/javascript/using-modifiers) - - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/hosting/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). + - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). examples: - name: Getting your data description: | diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml index a34988e1891..b130c4a00fb 100644 --- a/spec/supabase_js_v2.yml +++ b/spec/supabase_js_v2.yml @@ -740,7 +740,7 @@ functions: - By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's [API settings](https://app.supabase.com/project/_/settings/api). It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data. - `select()` can be combined with [Filters](/docs/reference/javascript/using-filters) - `select()` can be combined with [Modifiers](/docs/reference/javascript/using-modifiers) - - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/hosting/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). + - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). examples: - id: getting-your-data name: Getting your data diff --git a/studio/components/interfaces/Billing/Billing.constants.tsx b/studio/components/interfaces/Billing/Billing.constants.tsx index 97efdae0381..49782d9f644 100644 --- a/studio/components/interfaces/Billing/Billing.constants.tsx +++ b/studio/components/interfaces/Billing/Billing.constants.tsx @@ -69,6 +69,13 @@ export const USAGE_BASED_PRODUCTS = [ units: 'bytes', costPerUnit: 0.09, }, + { + key: 'storage_image_render_count', + attribute: 'total_storage_image_render_count', + title: 'Storage Images Transformed', + units: 'absolute', + costPerUnit: 0.005, + }, ], }, { diff --git a/studio/components/interfaces/Reports/Reports.tsx b/studio/components/interfaces/Reports/Reports.tsx index 5fb1630fa29..c5b02f5b596 100644 --- a/studio/components/interfaces/Reports/Reports.tsx +++ b/studio/components/interfaces/Reports/Reports.tsx @@ -17,7 +17,7 @@ import { } from 'ui' import { PermissionAction } from '@supabase/shared-types/out/constants' -import { checkPermissions, useStore } from 'hooks' +import { checkPermissions, useFlag, useStore } from 'hooks' import { uuidv4 } from 'lib/helpers' import { METRIC_CATEGORIES, METRICS, TIME_PERIODS_REPORTS } from 'lib/constants' import { useProjectContentStore } from 'stores/projectContentStore' @@ -263,6 +263,10 @@ const Reports = () => { }) } + // Filter out total_storage_image_render_count if feature flag is not enabled + const storageImageResizeEnabled = useFlag('storageImageResize') + let metrics = METRICS.filter(it => it.key !== 'total_storage_image_render_count' || storageImageResizeEnabled); + const MetricOptions = () => { return ( <> @@ -273,7 +277,7 @@ const Reports = () => { isNested overlay={ <> - {METRICS.filter((metric) => metric?.category?.key === cat.key).map((metric) => { + {metrics.filter((metric) => metric?.category?.key === cat.key).map((metric) => { return ( = ({ projectRef }) => { const { ui } = useStore() const { usage, error, isLoading } = useProjectUsage(projectRef) + const router = useRouter() + + const subscriptionTier = ui.selectedProject?.subscription_tier const projectHasNoLimits = - ui.selectedProject?.subscription_tier === PRICING_TIER_PRODUCT_IDS.PAYG || - ui.selectedProject?.subscription_tier === PRICING_TIER_PRODUCT_IDS.ENTERPRISE + subscriptionTier === PRICING_TIER_PRODUCT_IDS.PAYG || + subscriptionTier === PRICING_TIER_PRODUCT_IDS.ENTERPRISE - const showUsageExceedMessage = - ui.selectedProject?.subscription_tier !== undefined && !projectHasNoLimits + const showUsageExceedMessage = subscriptionTier !== undefined && !projectHasNoLimits + + const planNames = { + [PRICING_TIER_PRODUCT_IDS.FREE]: 'Free', + [PRICING_TIER_PRODUCT_IDS.PRO]: 'Pro', + [PRICING_TIER_PRODUCT_IDS.PAYG]: 'Pro', + [PRICING_TIER_PRODUCT_IDS.ENTERPRISE]: 'Enterprise', + } + + const planName = subscriptionTier ? planNames[subscriptionTier] || 'current' : 'current' useEffect(() => { if (error) { @@ -44,11 +56,21 @@ const ProjectUsage: FC = ({ projectRef }) => { ) } + const storageImageResizeEnabled = useFlag('storageImageResize') + + // Filter out storage_image_render_count if feature flag is not enabled + const usageBasedProducts = USAGE_BASED_PRODUCTS.map((usageBasedProduct) => ({ + ...usageBasedProduct, + features: usageBasedProduct.features.filter( + (it) => it.key !== 'storage_image_render_count' || storageImageResizeEnabled + ), + })) + return ( {usage && (
- {USAGE_BASED_PRODUCTS.map((product) => { + {usageBasedProducts.map((product) => { const isExceededUsage = showUsageExceedMessage && product.features @@ -57,6 +79,7 @@ const ProjectUsage: FC = ({ projectRef }) => { return featureUsage.usage / featureUsage.limit > 1 }) .some((x) => x === true) + return (
= ({ projectRef }) => { const usageRatio = usageValue / featureUsage.limit const isApproaching = usageRatio >= USAGE_APPROACHING_THRESHOLD const isExceeded = showUsageExceedMessage && usageRatio >= 1 + const isAvailableInPlan = featureUsage.available_in_plan + + let usageElement + if (!isAvailableInPlan) { + usageElement = ( +
+ Not included in {planName} tier + +
+ ) + } else if (showUsageExceedMessage) { + usageElement = ( + + ) + } else { + usageElement = ( + + {feature.units === 'bytes' ? formatBytes(usageValue) : usageValue} + + ) + } return ( = ({ projectRef }) => { <> {showUsageExceedMessage && ( - {(usageRatio * 100).toFixed(2)} % + {isAvailableInPlan ? ( + <>{(usageRatio * 100).toFixed(2)} % + ) : ( + <>- + )} )} - {showUsageExceedMessage ? ( - - ) : ( - - {feature.units === 'bytes' - ? formatBytes(usageValue) - : usageValue} - - )} + {usageElement} )} diff --git a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.types.ts b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.types.ts index 542264ebca6..4a4d96fd7df 100644 --- a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.types.ts +++ b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.types.ts @@ -2,6 +2,7 @@ export interface ResourceUsage { usage: number limit: number cost: number + available_in_plan: boolean } export interface UsageStats { diff --git a/studio/lib/constants/metrics.tsx b/studio/lib/constants/metrics.tsx index 796925abace..3c1044e536c 100644 --- a/studio/lib/constants/metrics.tsx +++ b/studio/lib/constants/metrics.tsx @@ -209,6 +209,12 @@ export const METRICS = [ provider: 'daily-stats', category: METRIC_CATEGORIES.API_STORAGE, }, + { + key: 'total_storage_image_render_count', + label: 'Storage Images Transformed', + provider: 'daily-stats', + category: METRIC_CATEGORIES.API_STORAGE, + }, { key: 'total_storage_requests', label: 'Storage Requests',