diff --git a/apps/docs/components/HomePageCover.tsx b/apps/docs/components/HomePageCover.tsx index 597e64e8174..e760c411dc3 100644 --- a/apps/docs/components/HomePageCover.tsx +++ b/apps/docs/components/HomePageCover.tsx @@ -77,7 +77,7 @@ const HomePageCover = (props) => { Discover how to set up a database to an app making queries in just a few minutes.

-
+
{frameworks.map((framework, i) => ( @@ -98,7 +98,7 @@ const HomePageCover = (props) => { return (
-
+

{props.meta?.title}

@@ -108,7 +108,7 @@ const HomePageCover = (props) => {

-
+
diff --git a/apps/docs/components/Navigation/NavigationMenu/HomeMenuIcons.tsx b/apps/docs/components/Navigation/NavigationMenu/HomeMenuIcons.tsx index 6925319d68d..4d2e53f6ea2 100644 --- a/apps/docs/components/Navigation/NavigationMenu/HomeMenuIcons.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/HomeMenuIcons.tsx @@ -1,3 +1,5 @@ +import { products } from 'shared-data' + type HomeMenuIcon = { width?: number height?: number @@ -50,7 +52,7 @@ export function IconMenuAuth({ width = 16, height = 16 }: HomeMenuIcon) { xmlns="http://www.w3.org/2000/svg" > +### Storage Location + +Currently, all BigQuery datasets stored and managed by Analytics, whether via CLI or self-hosted, will default to the US region. + ## Production Recommendations To self-host in a production setting, we recommend performing the following for a better experience. diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsx index adc866288b0..b24019de139 100644 --- a/apps/docs/layouts/SiteLayout.tsx +++ b/apps/docs/layouts/SiteLayout.tsx @@ -96,7 +96,7 @@ const levelsData = { }, reference_swift_v0: { icon: '/docs/img/icons/menu/reference-swift', - name: 'Swift Reference v1.0', + name: 'Swift Reference v0.0', }, reference_kotlin_v0: { icon: '/docs/img/icons/menu/reference-kotlin', diff --git a/apps/docs/pages/guides/ai/choosing-compute-addon.mdx b/apps/docs/pages/guides/ai/choosing-compute-addon.mdx index 9ce4f52002b..1a27b1e52cd 100644 --- a/apps/docs/pages/guides/ai/choosing-compute-addon.mdx +++ b/apps/docs/pages/guides/ai/choosing-compute-addon.mdx @@ -12,11 +12,17 @@ export const meta = { This guide will help you choose the right Compute Add-on for your workload. We'll provide general guidance, as it is impossible to provide specific instructions for every possible use case. The goal is to give you a starting point from which you can make your own benchmarks and optimizations. +Note that it is only useful for index searches, not for sequential scans. Sequential scans will result to significantly higher latencies and lower throughput, but will guarantee 100% precision and will not be RAM bound. Therefore it is possible to use a smaller plan for sequential scans. + For more information about engineering at scale, see our [Engineering for Scale](/docs/guides/ai/engineering-for-scale) guide. ## Simple workloads -We've run a set of benchmarks using the [gist-960-angular](http://corpus-texmex.irisa.fr/) dataset. This dataset contains 1,000,000 embeddings for images, with each embedding being 960 dimensions. And using the [GloVe Reddit comments](https://nlp.stanford.edu/projects/glove/) dataset, which contains 1,623,397 embeddings for words, with each embedding being 512 dimensions. +We've run a set of benchmarks using + +- The [dbpedia-entities-openai-1M](https://huggingface.co/datasets/KShivendu/dbpedia-entities-openai-1M) dataset. This dataset contains 1,000,000 embeddings for text, with each embedding being 1536 dimensions made using OpenAI API. +- The [gist-960-angular](http://corpus-texmex.irisa.fr/) dataset. This dataset contains 1,000,000 embeddings for images, with each embedding being 960 dimensions. +- The [GloVe Reddit comments](https://nlp.stanford.edu/projects/glove/) dataset, which contains 1,623,397 embeddings for words, with each embedding being 512 dimensions. We used [Vecs](https://github.com/supabase/vecs) to create a collection, upload the embeddings to a single table, and create an `inner-product` index for the embedding column. We then ran a series of queries to measure the performance of different compute add-ons: @@ -26,8 +32,48 @@ We used [Vecs](https://github.com/supabase/vecs) to create a collection, upload scrollable size="small" type="underlined" - defaultActiveId="gist960" + defaultActiveId="dbpedia1536" > + + +Emdeddings of 1536 dimensions by OpenAI for dbpedia dataset with 1,000,000 vectors. + +| Plan | Vectors | Lists | RPS | Latency Mean | Latency p95 | RAM Usage | RAM | +| ------ | --------- | ----- | ---- | ------------ | ----------- | ------------------ | ------ | +| Free | 20,000 | 40 | 135 | 0.372 sec | 0.412 sec | 1 GB + 200 Mb Swap | 1 GB | +| Small | 50,000 | 100 | 140 | 0.357 sec | 0.398 sec | 1.8 GB | 2 GB | +| Medium | 100,000 | 200 | 130 | 0.383 sec | 0.446 sec | 3.7 GB | 4 GB | +| Large | 250,000 | 500 | 130 | 0.378 sec | 0.434 sec | 7 GB | 8 GB | +| XL | 500,000 | 1000 | 235 | 0.213 sec | 0.271 sec | 13.5 GB | 16 GB | +| 2XL | 1,000,000 | 2000 | 380 | 0.133 sec | 0.236 sec | 30 GB | 32 GB | +| 4XL | 1,000,000 | 2000 | 720 | 0.068 sec | 0.120 sec | 35 GB | 64 GB | +| 8XL | 1,000,000 | 2000 | 1250 | 0.039 sec | 0.066 sec | 38 GB | 128 GB | +| 12XL | 1,000,000 | 2000 | 1600 | 0.030 sec | 0.052 sec | 41 GB | 192 GB | +| 16XL | 1,000,000 | 2000 | 1790 | 0.029 sec | 0.051 sec | 45 GB | 256 GB | + +For 1,000,000 vectors 10 probes results to precision of 0.91. And for 500,000 vectors and below 10 probes results to precision in the range of 0.95 - 0.99. To increase precision, you need to increase the number of probes. + + + + +Emdeddings of 1536 dimensions by OpenAI for dbpedia dataset with 1,000,000 vectors. + +| Plan | Vectors | Lists | RPS | Latency Mean | Latency p95 | RAM Usage | RAM | +| ------ | --------- | ----- | --- | ------------ | ----------- | --------- | ------ | +| Free | 20,000 | 40 | - | - | - | - | 1 GB | +| Small | 50,000 | 100 | - | - | - | - | 2 GB | +| Medium | 100,000 | 200 | - | - | - | - | 4 GB | +| Large | 250,000 | 500 | - | - | - | - | 8 GB | +| XL | 500,000 | 1000 | - | - | - | - | 16 GB | +| 2XL | 1,000,000 | 2000 | 140 | 0.358 sec | 0.575 sec | 30 GB | 32 GB | +| 4XL | 1,000,000 | 2000 | 270 | 0.186 sec | 0.304 sec | 35 GB | 64 GB | +| 8XL | 1,000,000 | 2000 | 470 | 0.104 sec | 0.166 sec | 38 GB | 128 GB | +| 12XL | 1,000,000 | 2000 | 600 | 0.085 sec | 0.132 sec | 41 GB | 192 GB | +| 16XL | 1,000,000 | 2000 | 670 | 0.081 sec | 0.129 sec | 45 GB | 256 GB | + +For 1,000,000 vectors 40 probes results to precision of 0.98. Note that exact values may vary depending on the dataset and queries, we recommend to run benchmarks with your own data to get precise results. Use this table as a reference. + + Emdeddings of 960 dimensions from gist-960 dataset with 1,000,000 vectors. @@ -91,7 +137,7 @@ Random vectors were generated for queries. -It is possible to upload more vectors to a single table if Memory allows it (for example, 2XL plan and higher). But it will affect the performance of the queries: RPS will be lower, and latency will be higher. Scaling should be almost linear, but it is recommended to benchmark your workload to find the optimal number of vectors per table and per database instance. +It is possible to upload more vectors to a single table if Memory allows it (for example, 4XL plan and higher for OpenAI embeddings). But it will affect the performance of the queries: RPS will be lower, and latency will be higher. Scaling should be almost linear, but it is recommended to benchmark your workload to find the optimal number of vectors per table and per database instance. @@ -116,10 +162,6 @@ Each test is run for a minimum of 30-40 minutes. They include a series of experi As a general recommendation, we suggest using a concurrency level of 5 or more for most workloads and 30 or more for high-load workloads. -## Future benchmarks - -We'll continue to add more benchmarks on datasets consisting of different vector dimensions, number of `lists` in the index, and number of `probes` in the index. Stay tuned for more information about how it may affect the performance and precision of your queries. - export const Page = ({ children }) => export default Page diff --git a/apps/docs/pages/guides/cli/managing-environments.mdx b/apps/docs/pages/guides/cli/managing-environments.mdx index 8c8646cfe1c..3807044ad65 100644 --- a/apps/docs/pages/guides/cli/managing-environments.mdx +++ b/apps/docs/pages/guides/cli/managing-environments.mdx @@ -196,6 +196,7 @@ The Supabase CLI requires a few environment variables to run in non-interactive - `SUPABASE_ACCESS_TOKEN` is your personal access token - `SUPABASE_DB_PASSWORD` is your project specific database password +- `SUPABASE_PROJECT_ID` is your project specific reference string We recommend adding these as [encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) to your GitHub Actions runners. @@ -218,19 +219,22 @@ on: jobs: test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - uses: supabase/setup-cli@v1 + with: + version: latest - name: Start Supabase local development setup run: supabase start - - name: Verify generated types are up-to-date + - name: Verify generated types are checked in run: | - supabase gen types typescript --local > types.ts - if [ "$(git diff --ignore-space-at-eol types.ts | wc -l)" -gt "0" ]; then + supabase gen types typescript --local > types.gen.ts + if ! git diff --ignore-space-at-eol --exit-code --quiet types.gen.ts; then echo "Detected uncommitted changes after build. See status below:" git diff exit 1 @@ -251,21 +255,22 @@ on: jobs: deploy: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} SUPABASE_DB_PASSWORD: ${{ secrets.STAGING_DB_PASSWORD }} - STAGING_PROJECT_ID: abcdefghijklmnopqrst + SUPABASE_PROJECT_ID: ${{ secrets.STAGING_PROJECT_ID }} steps: - uses: actions/checkout@v3 - uses: supabase/setup-cli@v1 + with: + version: latest - - run: | - supabase link --project-ref $STAGING_PROJECT_ID - supabase db push + - run: supabase link --project-ref $SUPABASE_PROJECT_ID + - run: supabase db push ``` @@ -282,21 +287,22 @@ on: jobs: deploy: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }} - PRODUCTION_PROJECT_ID: abcdefghijklmnopqrst + SUPABASE_PROJECT_ID: ${{ secrets.PRODUCTION_PROJECT_ID }} steps: - uses: actions/checkout@v3 - uses: supabase/setup-cli@v1 + with: + version: latest - - run: | - supabase link --project-ref $PRODUCTION_PROJECT_ID - supabase db push + - run: supabase link --project-ref $SUPABASE_PROJECT_ID + - run: supabase db push ``` diff --git a/apps/docs/pages/guides/functions/quickstart.mdx b/apps/docs/pages/guides/functions/quickstart.mdx index 235556c439e..14de4f79620 100644 --- a/apps/docs/pages/guides/functions/quickstart.mdx +++ b/apps/docs/pages/guides/functions/quickstart.mdx @@ -199,7 +199,8 @@ For use-cases which require low-latency we recommend [Edge Functions](/docs/guid ## Organizing your Edge Functions -We recommend developing “fat functions”. This means that you should develop few large functions, rather than many small functions. One common pattern when developing Functions is that you need to share code between two or more Functions. To do this, you can store any shared code in a folder prefixed with an underscore (`_`). We recommend this folder structure: +We recommend developing “fat functions”. This means that you should develop few large functions, rather than many small functions. One common pattern when developing Functions is that you need to share code between two or more Functions. To do this, you can store any shared code in a folder prefixed with an underscore (`_`). We also recommend a separate folder for [Unit Tests](/docs/guides/functions/unit-test) including the name of the function followed by a `-test` suffix. +We recommend this folder structure: ```bash └── supabase @@ -212,7 +213,10 @@ We recommend developing “fat functions”. This means that you should develop │ ├── function-one # Use hyphens to name functions. │ │ └── index.ts │ └── function-two - │ └── index.ts + │ │ └── index.ts + │ └── tests + │ └── function-one-test.ts + │ └── function-two-test.ts ├── migrations └── config.toml ``` diff --git a/apps/docs/pages/guides/functions/unit-test.mdx b/apps/docs/pages/guides/functions/unit-test.mdx new file mode 100644 index 00000000000..9532e435858 --- /dev/null +++ b/apps/docs/pages/guides/functions/unit-test.mdx @@ -0,0 +1,140 @@ +import Layout from '~/layouts/DefaultGuideLayout' + +export const meta = { + id: 'unit-test', + title: 'Testing your Edge Functions', + description: 'Writing Unit Tests for Edge Functions using Deno Test', +} + +Testing is an essential step in the development process to ensure the correctness and performance of your Edge Functions. + +When creating test files for Edge Functions, it is recommended to place them in the `supabase/tests` directory and name the file by the function name followed by `-test.ts`. For example, `hello-world-test.ts`. + +```typescript +// deno-test.ts + +// Import required libraries and modules +import { + assert, + assertExists, + assertEquals, +} from 'https://deno.land/std@0.192.0/testing/asserts.ts' +import { createClient, SupabaseClient } from 'https://esm.sh/@supabase/supabase-js@2.23.0' +import { delay } from 'https://deno.land/x/delay@v0.2.0/mod.ts' + +// Set up the configuration for the Supabase client +const supabaseUrl = Deno.env.get('SUPABASE_URL') ?? '' +const supabaseKey = Deno.env.get('SUPABASE_ANON_KEY') ?? '' +const options = { + auth: { + autoRefreshToken: false, + persistSession: false, + detectSessionInUrl: false, + }, +} + +// Test the creation and functionality of the Supabase client +const testClientCreation = async () => { + var client: SupabaseClient = createClient(supabaseUrl, supabaseKey, options) + + // Verify if the Supabase URL and key are provided + if (!supabaseUrl) throw new Error('supabaseUrl is required.') + if (!supabaseKey) throw new Error('supabaseKey is required.') + + // Test a simple query to the database + const { data: table_data, error: table_error } = await client + .from('my_table') + .select('*') + .limit(1) + if (table_error) { + throw new Error('Invalid Supabase client: ' + table_error.message) + } + assert(table_data, 'Data should be returned from the query.') +} + +// Test the 'hello-world' function +const testHelloWorld = async () => { + var client: SupabaseClient = createClient(supabaseUrl, supabaseKey, options) + + // Invoke the 'hello-world' function with a parameter + const { data: func_data, error: func_error } = await client.functions.invoke('hello-world', { + body: { name: 'bar' }, + }) + + // Check for errors from the function invocation + if (func_error) { + throw new Error('Invalid response: ' + func_error.message) + } + + // Log the response from the function + console.log(JSON.stringify(func_data, null, 2)) + + // Assert that the function returned the expected result + assertEquals(func_data.message, 'Hello bar!') +} + +// Register and run the tests +Deno.test('Client Creation Test', testClientCreation) +Deno.test('Hello-world Function Test', testHelloWorld) +``` + +This test case consists of two parts. The first part tests the client library and verifies that the database can be connected to and returns values from a table (`my_table`). The second part tests the edge function and checks if the received value matches the expected value. Here's a brief overview of the code: + +- We import various testing functions from the Deno standard library, including `assert`, `assertExists`, and `assertEquals`. +- We import the `createClient` and `SupabaseClient` classes from the `@supabase/supabase-js` library to interact with the Supabase client. +- We define the necessary configuration for the Supabase client, including the Supabase URL, API key, and authentication options. +- The `testClientCreation` function tests the creation of a Supabase client instance and queries the database for data from a table. It verifies that data is returned from the query. +- The `testHelloWorld` function tests the "Hello-world" Edge Function by invoking it using the Supabase client's `functions.invoke` method. It checks if the response message matches the expected greeting. +- We run the tests using the `Deno.test` function, providing a descriptive name for each test case and the corresponding test function. + + + +Please make sure to replace the placeholders (`supabaseUrl`, `supabaseKey`, `my_table`) with the +actual values relevant to your Supabase setup. + + + +### Running Edge Functions Locally + +To locally test and debug Edge Functions, you can utilize the Supabase CLI. Let's explore how to run Edge Functions locally using the Supabase CLI: + +1. Ensure that the Supabase server is running by executing the following command: + + ```bash + supabase start + ``` + +2. In your terminal, use the following command to serve the Edge Functions locally: + + ```bash + supabase functions serve + ``` + + This command starts a local server that runs your Edge Functions, enabling you to test and debug them in a development environment. + +3. Create the environment variables file: + + ```bash + # creates the file + touch .env.local + # adds the SUPABASE_URL secret + echo "SUPABASE_URL=http://localhost:54321" >> .env.local + # adds the SUPABASE_ANON_KEY secret + echo "SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0" >> .env.local + # Alternatively, you can open it in your editor: + open .env.local + ``` + +4. To run the tests, use the following command in your terminal: + + ```bash + deno test --allow-all deno-test.ts --env-file .env.local + ``` + +## Resources + +- Full guide on Testing Supabase Edge Functions on [Mansueli's tips](https://blog.mansueli.com/testing-supabase-edge-functions-with-deno-test) + +export const Page = ({ children }) => + +export default Page diff --git a/apps/docs/pages/guides/getting-started/architecture.mdx b/apps/docs/pages/guides/getting-started/architecture.mdx index 9d2f24b5efe..4e7ebdf2504 100644 --- a/apps/docs/pages/guides/getting-started/architecture.mdx +++ b/apps/docs/pages/guides/getting-started/architecture.mdx @@ -140,7 +140,7 @@ Less, but better. ### Everything is portable To avoid lock-in, we make it easy to migrate in and out. Our cloud offering is compatible with our self-hosted product. -We use existing standards to increase portability (like pg_dump an CSV files). If a new standard emerges which competes with a "Supabase" approach, we will deprecate the approach in favor of the standard. +We use existing standards to increase portability (like pg_dump and CSV files). If a new standard emerges which competes with a "Supabase" approach, we will deprecate the approach in favor of the standard. This forces us compete on experience. We aim to be the best Postgres hosting service. ### Play the long game diff --git a/apps/docs/pages/guides/getting-started/local-development.mdx b/apps/docs/pages/guides/getting-started/local-development.mdx index 07f364c69de..c6516e0caab 100644 --- a/apps/docs/pages/guides/getting-started/local-development.mdx +++ b/apps/docs/pages/guides/getting-started/local-development.mdx @@ -413,23 +413,38 @@ supabase functions deploy ### Use Auth locally -To use Auth locally, update your project's `supabase/config.toml` file that gets created after running `supabase init`. Add any providers you want, and set enabled to `true` +To use Auth locally, update your project's `supabase/config.toml` file that gets created after running `supabase init`. Add any providers you want, and set enabled to `true`. ```bash config.toml [auth.external.github] enabled = true -client_id = "" -secret = "" +client_id = "env($SUPABASE_AUTH_GITHUB_CLIENT_ID)" +secret = "env($SUPABASE_AUTH_GITHUB_SECRET)" +redirect_uri = "http://localhost:54321/auth/v1/callback" +``` + +As a best practice, any secret values should be loaded from environment variables. You can add them to `supabase/.env` for the CLI to automatically substitute them. + +```bash supabase/.env +SUPABASE_AUTH_GITHUB_CLIENT_ID="redacted" +SUPABASE_AUTH_GITHUB_SECRET="redacted" ``` For these changes to take effect, you need to run `supabase stop` and `supabase start` again. +If you have additional RLS policies defined on your `auth` schema, you can pull them as a migration file locally. + +```bash +supabase db remote commit --schema auth +``` + ### Enabling Local Logging Local logs rely on the Supabase Analytics Server. This can be enabled via the CLI configuration, and requires a Google Cloud project and BigQuery access. - The Google Cloud project must have billing enabled. Read more about this requirement + The Google Cloud project must have billing enabled. The dataset created and managed by Analytics + will be within the US. Read more about this requirement [here](https://supabase.com/docs/reference/self-hosting-analytics/introduction#bigquery). @@ -461,8 +476,7 @@ This will switch the logging drivers and will direct logs to the Analytics serve The local development environment is not as feature-complete as the Supabase Platform. We're working towards parity between the hosted platform and the local environment. Here are some of the differences: -- The Functions interface is coming soon. -- You cannot update your project settings in the Dashboard. This must be done using the CLI. +- You cannot update your project settings in the Dashboard. This must be done using the local config file. - The CLI version determines the local version of Studio used, so make sure you keep your local [Supabase CLI up to date](https://github.com/supabase/cli#getting-started). We're constantly adding new features and bug fixes. export const Page = ({ children }) => diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-redwoodjs.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-redwoodjs.mdx index c3428ee814e..375198da2f4 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-redwoodjs.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-redwoodjs.mdx @@ -14,27 +14,6 @@ export const meta = { GitHub](https://github.com/redwoodjs/redwoodjs-supabase-quickstart). -{/* ## Video demo */} - -{/* Coming soon. */} - -{/* Use the annotated timeline to step through this tutorial. */} - -{/* ## Instant deploy */} - -{/* Want to deploy a completed version of this example without following the guide? */} - -{/* [![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%2Freact-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-react-user-management.vercel.app&demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv&external-id=nextjs-user-management) */} - -{/* Clicking this button the application will: */} - -{/* - Launch and prepare the Postgres database in Supabase. */} -{/* - Launch the app in Vercel. */} -{/* - Fork the example into your own GitHub account. */} -{/* - Prepare the deployed application with all the necessary environment variables. */} - -{/* If you want to do it yourself, let's get started:` */} - ## About RedwoodJS A Redwood application is split into two parts: a frontend and a backend. This is represented as two node projects within a single monorepo. diff --git a/apps/docs/pages/guides/integrations/bracket.mdx b/apps/docs/pages/guides/integrations/bracket.mdx index 0f5e9c513b5..0e6776d1060 100644 --- a/apps/docs/pages/guides/integrations/bracket.mdx +++ b/apps/docs/pages/guides/integrations/bracket.mdx @@ -7,9 +7,9 @@ export const meta = { 'Set up two-way syncs between Supabase and familiar tools like Airtable, Google Sheets, and Notion.', } -This guide explains how to set up a sync between your Supabase database and tools like Google Sheets, Airtable, or Notion using [Bracket](https://usebracket.com) — a two-way data syncing tool. +This guide explains how to set up a sync between your Supabase database and tools like Salesforce, Hubspot, Google Sheets, Airtable, or Notion using [Bracket](https://usebracket.com) — a two-way data syncing tool. -With customizable two-way and one-way syncs, Bracket enables business teams to read from & write to their Supabase database without ever leaving a spreadsheet. If you don’t have a Bracket account, you can [create one here](https://app.usebracket.com). +With customizable two-way and one-way syncs, Bracket enables business teams to read from & write to their Supabase database without ever leaving a spreadsheet or CRM. If you don’t have a Bracket account, you can [create one here](https://app.usebracket.com). This guide assumes you have a Supabase account and database. You do not need existing tables in Supabase if you are replicating data from a SaaS tool into Supabase. Otherwise, an existing table in Supabase is required. diff --git a/apps/docs/pages/guides/platform/database-size.mdx b/apps/docs/pages/guides/platform/database-size.mdx index 7acb07040f8..f23631ee053 100644 --- a/apps/docs/pages/guides/platform/database-size.mdx +++ b/apps/docs/pages/guides/platform/database-size.mdx @@ -57,13 +57,11 @@ Supabase uses network-attached storage to balance performance with scalability. ### Paid Plan Behavior -Pro and Enterprise projects have auto-scaling Disk Storage. +Projects on the Pro plan and above have auto-scaling Disk Storage. Disk Storage expands automatically when the database reaches 90% of the disk size. The disk is expanded to be 50% larger (e.g., 8GB -> 12GB). Auto-scaling can only take place once every 6 hours. If within those 6 hours you reach 95% of the disk space, your project will enter read-only mode. -The maximum Disk Storage Size for Pro plan is 64TB. If you need more than this, [contact us](https://supabase.com/dashboard/support/new) to learn more about the Enterprise plan. - -The Disk Storage Size can also be manually expanded in [Database settings page](https://supabase.com/dashboard/project/_/settings/database). The maximum default you can expand the Disk Storage to is 200GB. If you wish to manually expand it any more than 200GB, please [contact us](https://supabase.com/dashboard/support/new) to discuss expanding the 200GB limit. +The Disk Storage Size can also be manually expanded on the [Database settings page](https://supabase.com/dashboard/project/_/settings/database). The maximum default you can expand the Disk Storage to is 200GB. If you wish to manually expand it to any more than 200GB, please [contact us](https://supabase.com/dashboard/support/new) to discuss expanding the 200GB limit. You may want to import a lot of data into your database which requires multiple disk expansions; for example, uploading more than 1.5x the current size of your database storage will put your database into [read-only mode](#read-only-mode). If so, it is highly recommended you increase the Disk Storage Size manually on the [Database settings page](https://supabase.com/dashboard/project/_/settings/database). @@ -72,11 +70,13 @@ Due to provider restrictions, disk expansions can occur only once every six hour +The maximum Disk Storage Size for the Pro plan is 16TB. If you need more than this, [contact us](https://forms.supabase.com/enterprise) to learn more about the Enterprise plan. + ### Free Plan Behavior -Free Plan projects enter [read-only](#read-only-mode) mode when you exceed the 500mb limit. Once in read-only mode, you have several options: +Free Plan projects enter [read-only](#read-only-mode) mode when you exceed the 500MB limit. Once in read-only mode, you have several options: -- [Upgrade to the Pro or Enterprise plan](https://supabase.com/dashboard/project/_/settings/billing/subscription) to enable auto-scaling and expand beyond the 500mb database size limit. +- [Upgrade to the Pro plan or above](https://supabase.com/dashboard/project/_/settings/billing/subscription) to enable auto-scaling and expand beyond the 500MB database size limit. - [Disable read-only mode](#disabling-read-only-mode) and reduce your database size. ### Read-only mode diff --git a/apps/docs/pages/guides/platform/sso.mdx b/apps/docs/pages/guides/platform/sso.mdx index 47f0c6581f5..43a33a2208c 100644 --- a/apps/docs/pages/guides/platform/sso.mdx +++ b/apps/docs/pages/guides/platform/sso.mdx @@ -6,8 +6,9 @@ export const meta = { } - Looking for docs on how to add Single Sign-On support in your Supabase project? Head on over to - [Single Sign-On with SAML 2.0 for Projects](/docs/guides/auth/sso/auth-sso-saml). + +Looking for docs on how to add Single Sign-On support in your Supabase project? Head on over to [Single Sign-On with SAML 2.0 for Projects](/docs/guides/auth/sso/auth-sso-saml). + Supabase offers single sign-on (SSO) as a login option to provide additional @@ -19,9 +20,7 @@ applications or tools—which can also be revoked easily by an administrator. -Supabase currently provides SAML SSO. Please contact [Enterprise -Sales](https://supabase.com/contact/enterprise) to have this enabled for your -organization. +Supabase currently provides SAML SSO for [Team and Enterprise plan customers](https://supabase.com/pricing). Please contact [Sales](https://forms.supabase.com/team) to have this enabled for your organization. diff --git a/apps/docs/pages/guides/storage/quickstart.mdx b/apps/docs/pages/guides/storage/quickstart.mdx index 090dabb2690..b94c588ce4b 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-user-management) or deploy it with [Vercel for a preview](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). +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-user-management). diff --git a/apps/docs/pages/index.mdx b/apps/docs/pages/index.mdx index 00432dc6d16..8024c9629a4 100644 --- a/apps/docs/pages/index.mdx +++ b/apps/docs/pages/index.mdx @@ -159,7 +159,7 @@ export const meta = {

@@ -232,7 +232,7 @@ export const products = [ }, { title: 'Edge Functions', - icon: 'functions', + icon: 'edge-functions', hasLightIcon: true, href: '/guides/functions', description: diff --git a/apps/www/components/BackedBy.tsx b/apps/www/components/BackedBy.tsx index f796653e736..af93fc30156 100644 --- a/apps/www/components/BackedBy.tsx +++ b/apps/www/components/BackedBy.tsx @@ -1,5 +1,6 @@ import React from 'react' import { useRouter } from 'next/router' +import Image from 'next/image' const BackedBy = ({ className, @@ -23,26 +24,42 @@ const BackedBy = ({ backed by
- Y Combinator - Mozilla - Coatue - Felicis +
+ Y Combinator +
+
+ Mozilla +
+
+ Coatue +
+
+ Felicis +
diff --git a/apps/www/components/Carousels/ImageCarousel.tsx b/apps/www/components/Carousels/ImageCarousel.tsx index ef544266da7..802a1bf4ff5 100644 --- a/apps/www/components/Carousels/ImageCarousel.tsx +++ b/apps/www/components/Carousels/ImageCarousel.tsx @@ -1,6 +1,6 @@ import { Button, IconCornerRightUp, Tabs } from 'ui' import { useRouter } from 'next/router' -import { useState } from 'react' +import { useRef, useState } from 'react' // Import Swiper React components import { Swiper, SwiperSlide } from 'swiper/react' @@ -11,6 +11,7 @@ import 'swiper/swiper.min.css' import Image from 'next/image' import TextLink from '../TextLink' import ImageCarouselStyles from './ImageCarousel.module.css' +import { useInView } from 'framer-motion' interface Content { title: string @@ -29,6 +30,8 @@ interface ImageCarouselProps { } function ImageCarousel(props: ImageCarouselProps) { + const sectionRef = useRef(null) + const isInView = useInView(sectionRef, { margin: '75%', once: true }) // base path for images const { basePath } = useRouter() @@ -66,7 +69,7 @@ function ImageCarousel(props: ImageCarouselProps) { ) return ( -
+
@@ -116,7 +119,7 @@ function ImageCarousel(props: ImageCarouselProps) { height="960" /> )} - {content.youtube_id && ( + {isInView && content.youtube_id && (