diff --git a/apps/docs/pages/guides/ai/choosing-compute-addon.mdx b/apps/docs/pages/guides/ai/choosing-compute-addon.mdx index 047017f9e98..384e16543a3 100644 --- a/apps/docs/pages/guides/ai/choosing-compute-addon.mdx +++ b/apps/docs/pages/guides/ai/choosing-compute-addon.mdx @@ -21,7 +21,7 @@ The number of dimensions in your embeddings is the most important factor in choo ## HNSW -### 384 Dimensions +### 384 dimensions This benchmark uses the dbpedia-entities-openai-1M dataset containing 1,000,000 embeddings of text, regenerated for 384 dimension embeddings. Each embedding is generated using [gte-small](https://huggingface.co/Supabase/gte-small). @@ -52,7 +52,7 @@ Accuracy was 0.99 for benchmarks. -### 960 Dimensions +### 960 dimensions This benchmark uses the [gist-960](http://corpus-texmex.irisa.fr/) dataset, which contains 1,000,000 embeddings of images. Each embedding is 960 dimensions. @@ -85,7 +85,7 @@ QPS can also be improved by increasing [`m` and `ef_construction`](/docs/guides/ -### 1536 Dimensions +### 1536 dimensions This benchmark uses the [dbpedia-entities-openai-1M](https://huggingface.co/datasets/KShivendu/dbpedia-entities-openai-1M) dataset, which contains 1,000,000 embeddings of text. And 224,482 embeddings from [Wikipedia articles](https://huggingface.co/datasets/Supabase/wikipedia-en-embeddings) for compute add-ons `large` and below. Each embedding is 1536 dimensions created with the [OpenAI Embeddings API](https://platform.openai.com/docs/guides/embeddings). @@ -136,7 +136,7 @@ It is possible to upload more vectors to a single table if Memory allows it (for ## IVFFlat -### 384 Dimensions +### 384 dimensions This benchmark uses the dbpedia-entities-openai-1M dataset containing 1,000,000 embeddings of text, regenerated for 384 dimension embeddings. Each embedding is generated using [gte-small](https://huggingface.co/Supabase/gte-small). @@ -181,7 +181,7 @@ This benchmark uses the dbpedia-entities-openai-1M dataset containing 1,000,000 -### 960 Dimensions +### 960 dimensions This benchmark uses the [gist-960](http://corpus-texmex.irisa.fr/) dataset, which contains 1,000,000 embeddings of images. Each embedding is 960 dimensions. @@ -210,7 +210,7 @@ This benchmark uses the [gist-960](http://corpus-texmex.irisa.fr/) dataset, whic -### 1536 Dimensions +### 1536 dimensions This benchmark uses the [dbpedia-entities-openai-1M](https://huggingface.co/datasets/KShivendu/dbpedia-entities-openai-1M) dataset, which contains 1,000,000 embeddings of text. Each embedding is 1536 dimensions created with the [OpenAI Embeddings API](https://platform.openai.com/docs/guides/embeddings). @@ -322,7 +322,7 @@ You can increase the Requests per Second by increasing `m` and `ef_construction` Check out more tips and the complete step-by-step guide in [Going to Production for AI applications](going-to-prod). -## Benchmark Methodology +## Benchmark methodology We follow techniques outlined in the [ANN Benchmarks](https://github.com/erikbern/ann-benchmarks) methodology. A Python test runner is responsible for uploading the data, creating the index, and running the queries. The pgvector engine is implemented using [vecs](https://github.com/supabase/vecs), a Python client for pgvector. diff --git a/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx b/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx index 0a66b90a9d6..39a81955b67 100644 --- a/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx +++ b/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx @@ -21,7 +21,7 @@ A [Retrieval Plugin](https://github.com/openai/chatgpt-retrieval-plugin) is a Py It allows ChatGPT to dynamically pull relevant information into conversations from your data sources. This could be PDF documents, Confluence, or Notion knowledge bases. -## Example: Chat with Postgres Docs +## Example: Chat with Postgres docs Let’s build an example where we can “ask ChatGPT questions” about the Postgres documentation. Although ChatGPT already knows about the Postgres documentation because it is publicly available, this is a simple example which demonstrates how to work with PDF files. @@ -74,7 +74,7 @@ export PG_HOST= export PG_PASSWORD= ``` -### Step 4: Run Postgres Locally +### Step 4: Run Postgres locally To start quicker you may use Supabase CLI to spin everything up locally as it already includes pgvector from the start. Install `supabase-cli`, go to the `examples/providers` folder in the repo and run: diff --git a/apps/docs/pages/guides/ai/examples/huggingface-image-captioning.mdx b/apps/docs/pages/guides/ai/examples/huggingface-image-captioning.mdx index 163422ee325..29dfde30de1 100644 --- a/apps/docs/pages/guides/ai/examples/huggingface-image-captioning.mdx +++ b/apps/docs/pages/guides/ai/examples/huggingface-image-captioning.mdx @@ -30,7 +30,7 @@ We can combine Hugging Face with [Supabase Storage](https://supabase.com/storage - Deploy the function to Supabase: `supabase functions deploy huggingface-image-captioning`. - Create the Database Webhook in the [Supabase Dashboard](https://supabase.com/dashboard/project/_/database/hooks) to trigger the `huggingface-image-captioning` function anytime a record is added to the `storage.objects` table. -## Generate TypeScript Types +## Generate TypeScript types To generate the types.ts file for the storage and public schemas, run the following command in the terminal: diff --git a/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx b/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx index f76227dab3f..40f9859aa26 100644 --- a/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx +++ b/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx @@ -16,7 +16,7 @@ The [OpenAI CLIP Model](https://github.com/openai/CLIP) was trained on a variety You can find the full application code as a Python Poetry project on [GitHub](https://github.com/supabase/supabase/tree/master/examples/ai/image_search#image-search-with-supabase-vector). -## Create a new Python Project with Poetry +## Create a new Python project with Poetry [Poetry](https://python-poetry.org/) provides packaging and dependency management for Python. If you haven't already, install poetry via pip: @@ -46,7 +46,7 @@ supabase start This will start up the Supabase stack locally and print out a bunch of environment details, including your local `DB URL`. Make a note of that for later user. -## Install the Dependencies +## Install the dependencies We will need to add the following dependencies to our project: @@ -134,7 +134,7 @@ search = "image_search.main:search" After activating the virtual environtment with `poetry shell` you can now run your seed script via `poetry run seed`. You can inspect the generated embeddings in your local database by visiting the local Supabase dashboard at [localhost:54323](http://localhost:54323/project/default/editor), selecting the `vecs` schema, and the `image_vectors` database. -## Perform an Image Search from a Text Query +## Perform an image search from a text query With Supabase Vector we can easily query our embeddings. We can use either an image as search input or alternative we can generate an embedding from a string input and use that as the query input: diff --git a/apps/docs/pages/guides/ai/examples/nextjs-vector-search.mdx b/apps/docs/pages/guides/ai/examples/nextjs-vector-search.mdx index 2a0d73938e9..2d6986fb92c 100644 --- a/apps/docs/pages/guides/ai/examples/nextjs-vector-search.mdx +++ b/apps/docs/pages/guides/ai/examples/nextjs-vector-search.mdx @@ -322,7 +322,7 @@ With our database set up, we need to process and store all `.mdx` files in the ` -## Create Text Completion with OpenAI API +## Create text completion with OpenAI API Anytime a user asks a question, we need to create an embedding for their question, perform a similarity search, and then send a text completion request to the OpenAI API with the query and then context content merged together into a prompt. @@ -527,7 +527,7 @@ const handleConfirm = React.useCallback( ) ``` -## Learn More +## Learn more Want to learn more about the awesome tech that is powering this? diff --git a/apps/docs/pages/guides/ai/going-to-prod.mdx b/apps/docs/pages/guides/ai/going-to-prod.mdx index 4c5dd6b304d..bf133b70b10 100644 --- a/apps/docs/pages/guides/ai/going-to-prod.mdx +++ b/apps/docs/pages/guides/ai/going-to-prod.mdx @@ -84,7 +84,7 @@ You can find more examples of how `lists` and `probes` constants affect accuracy /> -## Performance Tips when using indexes +## Performance tips when using indexes First, a few generic tips which you can pick and choose from: diff --git a/apps/docs/pages/guides/ai/hugging-face.mdx b/apps/docs/pages/guides/ai/hugging-face.mdx index dc77e055c39..0b36104c8e8 100644 --- a/apps/docs/pages/guides/ai/hugging-face.mdx +++ b/apps/docs/pages/guides/ai/hugging-face.mdx @@ -15,7 +15,7 @@ There are 3 ways to use Hugging Face models in your application: 1. [Generate embeddings](/docs/guides/ai/quickstarts/generate-text-embeddings) directly in Edge Functions using Transformers.js. 1. Use Hugging Face's hosted [Inference API](https://huggingface.co/inference-api) to execute AI tasks remotely on Hugging Face servers. This guide will walk you through this approach. -## AI Tasks +## AI tasks Below are some of the types of tasks you can perform with Hugging Face: @@ -27,7 +27,7 @@ Below are some of the types of tasks you can perform with Hugging Face: - [Translation](https://huggingface.co/tasks/translation) - [Fill in the blank](https://huggingface.co/tasks/fill-mask) -### Computer Vision +### Computer vision - [Image to text](https://huggingface.co/tasks/image-to-text) - [Text to image](https://huggingface.co/tasks/text-to-image) diff --git a/apps/docs/pages/guides/ai/integrations/roboflow.mdx b/apps/docs/pages/guides/ai/integrations/roboflow.mdx index 8797fa600a3..568fd734608 100644 --- a/apps/docs/pages/guides/ai/integrations/roboflow.mdx +++ b/apps/docs/pages/guides/ai/integrations/roboflow.mdx @@ -12,13 +12,13 @@ In this guide, we will walk through two examples of using [Roboflow Inference](h -## Save Computer Vision Predictions +## Save computer vision predictions Once you have a trained vision model, you need to create business logic for your application. In many cases, you want to save inference results to a file. The steps below show you how to run a vision model locally and save predictions to Supabase. -### Preparation: Set up a Model +### Preparation: Set up a model Before you begin, you will need an object detection model trained on your data. @@ -28,7 +28,7 @@ All models have an infinitely scalable API through which you can query your mode For this guide, we will use a demo [rock, paper, scissors](https://universe.roboflow.com/roboflow-58fyf/rock-paper-scissors-sxsw) model. -### Step 1: Install and Start Roboflow Inference +### Step 1: Install and start Roboflow Inference You will deploy our model locally using Roboflow Inference, a computer vision inference server. @@ -42,7 +42,7 @@ pip install inference inference-cli inference-sdk && inference server start An inference server will be available at `http://localhost:9001`. -### Step 2: Run Inference on an Image +### Step 2: Run inference on an image You can run inference on images and videos. Let's run inference on an image. @@ -76,7 +76,7 @@ When you run the code above, a list of predictions will be printed to the consol {'time': 0.05402109300121083, 'image': {'width': 640, 'height': 480}, 'predictions': [{'x': 312.5, 'y': 392.0, 'width': 255.0, 'height': 110.0, 'confidence': 0.8620790839195251, 'class': 'Paper', 'class_id': 0}]} ``` -### Step 3: Save Results in Supabase +### Step 3: Save results in Supabase To save results in Supabase, add the following code to your script: @@ -110,17 +110,17 @@ Here is an example result: data=[{'predictions': {'time': 0.08492901099998562, 'image': {'width': 640, 'height': 480}, 'predictions': [{'x': 312.5, 'y': 392.0, 'width': 255.0, 'height': 110.0, 'confidence': 0.8620790839195251, 'class': 'Paper', 'class_id': 0}]}}, {'predictions': {'time': 0.08818970100037404, 'image': {'width': 640, 'height': 480}, 'predictions': [{'x': 312.5, 'y': 392.0, 'width': 255.0, 'height': 110.0, 'confidence': 0.8620790839195251, 'class': 'Paper', 'class_id': 0}]}}] count=None ``` -## Calculate and Save CLIP Embeddings +## Calculate and save CLIP embeddings You can use the Supabase vector database functionality to store and query CLIP embeddings. Roboflow Inference provides a HTTP interface through which you can calculate image and text embeddings using CLIP. -### Step 1: Install and Start Roboflow Inference +### Step 1: Install and start Roboflow Inference See [Step #1: Install and Start Roboflow Inference](#step-1-install-and-start-roboflow-inference) above to install and start Roboflow Inference. -### Step 2: Run CLIP on an Image +### Step 2: Run CLIP on an image Create a new Python file and add the following code: @@ -168,7 +168,7 @@ Above, replace: You can also calculate CLIP embeddings in the cloud by setting `SERVER_URL` to `https://infer.roboflow.com`. -### Step 3: Save Embeddings in Supabase +### Step 3: Save embeddings in Supabase You can store your image embeddings in Supabase using the Supabase `vecs` Python package: diff --git a/apps/docs/pages/guides/ai/langchain.mdx b/apps/docs/pages/guides/ai/langchain.mdx index f86f2381031..967bf23e14e 100644 --- a/apps/docs/pages/guides/ai/langchain.mdx +++ b/apps/docs/pages/guides/ai/langchain.mdx @@ -111,7 +111,7 @@ export const run = async () => { } ``` -### Simple Metadata Filtering +### Simple metadata filtering Given the above `match_documents` Postgres function, you can also pass a filter parameter to only return documents with a specific metadata field value. This filter parameter is a JSON object, and the `match_documents` function will use the Postgres JSONB Containment operator `@>` to filter documents by the metadata field values you specify. See details on the [Postgres JSONB Containment operator](https://www.postgresql.org/docs/current/datatype-json.html#JSON-CONTAINMENT) for more information. @@ -150,7 +150,7 @@ export const run = async () => { } ``` -### Advanced Metadata Filtering +### Advanced metadata filtering You can also use query builder-style filtering ([similar to how the Supabase JavaScript library works](https://supabase.com/docs/reference/javascript/using-filters)) instead of passing an object. Note that since the filter properties will be in the metadata column, you need to use arrow operators (`->` for integer or `->>` for text) as defined in [Postgrest API documentation](https://postgrest.org/en/stable/references/api/tables_views.html?highlight=operators#json-columns) and specify the data type of the property (e.g. the column should look something like `metadata->some_int_value::int`). diff --git a/apps/docs/pages/guides/ai/rag-with-permissions.mdx b/apps/docs/pages/guides/ai/rag-with-permissions.mdx index cf0dcf4aa7b..c5b27f20d42 100644 --- a/apps/docs/pages/guides/ai/rag-with-permissions.mdx +++ b/apps/docs/pages/guides/ai/rag-with-permissions.mdx @@ -78,7 +78,7 @@ order by document_sections.embedding <#> embedding; The above example only configures `select` access to users. If you wanted, you could create more RLS policies for inserts, updates, and deletes in order to apply the same permission logic for those other operations. See [Row Level Security](/docs/guides/database/postgres/row-level-security) for a more in-depth guide on RLS policies. -## Alternative Scenarios +## Alternative scenarios Every app has its own unique requirements and may differ from the above example. Here are some alternative scenarios we often see and how they are implemented in Supabase. @@ -189,7 +189,7 @@ Since we're managing users and authentication outside of Supabase, we have two o 1. Make a direct Postgres connection to the Supabase DB and set the current user every request 2. Issue a custom JWT from your system and use it to authenticate with the REST API -#### Direct Postgres Connection +#### Direct Postgres connection You can directly connect to your Supabase Postgres DB using the [connection info](/dashboard/project/_/settings/database) on your project's database settings page. To use RLS with this method, we use a custom session variable that contains the current user's ID: diff --git a/apps/docs/pages/guides/ai/vecs-python-client.mdx b/apps/docs/pages/guides/ai/vecs-python-client.mdx index 05b36f72bf8..071da52f43d 100644 --- a/apps/docs/pages/guides/ai/vecs-python-client.mdx +++ b/apps/docs/pages/guides/ai/vecs-python-client.mdx @@ -77,7 +77,7 @@ docs.query( ) ``` -## Deep Dive +## Deep dive For a more in-depth guide on `vecs` collections, see [API](/docs/guides/ai/python/api). diff --git a/apps/docs/pages/guides/api.mdx b/apps/docs/pages/guides/api.mdx index 21b68b980fb..2286f601d54 100644 --- a/apps/docs/pages/guides/api.mdx +++ b/apps/docs/pages/guides/api.mdx @@ -43,7 +43,7 @@ Reference: - [Docs](https://postgrest.org/) - [Source Code](https://github.com/PostgREST/postgrest) -## API URL and Keys +## API URL and keys You can find the API URL and Keys in the [Dashboard](https://supabase.com/dashboard/project/_/settings/api). diff --git a/apps/docs/pages/guides/api/creating-routes.mdx b/apps/docs/pages/guides/api/creating-routes.mdx index 9881edafb89..32e98f2962e 100644 --- a/apps/docs/pages/guides/api/creating-routes.mdx +++ b/apps/docs/pages/guides/api/creating-routes.mdx @@ -51,7 +51,7 @@ create table -## API URL and Keys +## API URL and keys Every Supabase project has a unique API URL. Your API is secured behind an API gateway which requires an API Key for every request. diff --git a/apps/docs/pages/guides/api/data-apis.mdx b/apps/docs/pages/guides/api/data-apis.mdx index a0a4c7b9836..acf7186c869 100644 --- a/apps/docs/pages/guides/api/data-apis.mdx +++ b/apps/docs/pages/guides/api/data-apis.mdx @@ -8,7 +8,7 @@ export const meta = { Supabase's auto-generated Data APIs let you perform operations on your database using REST API calls. You can read, write, and delete data, and even call functions, without writing an intermediate layer to translate between your app and Postgres. -## How to use the Data APIs +## How to use the data APIs The Data APIs are auto-generated HTTP REST endpoints. You can call them in the same way as any HTTP endpoint, for example, using `curl` from the command line or `fetch` from the browser. For convenience, you can use the Supabase client libraries. The client libraries perform the HTTP call for you, while also handling authentication, parsing responses, and maintaining type safety. diff --git a/apps/docs/pages/guides/api/rest/client-libs.mdx b/apps/docs/pages/guides/api/rest/client-libs.mdx index aa967a4b9eb..6c09295c8cd 100644 --- a/apps/docs/pages/guides/api/rest/client-libs.mdx +++ b/apps/docs/pages/guides/api/rest/client-libs.mdx @@ -9,14 +9,14 @@ export const meta = { Supabase provides client libraries for the REST and Realtime APIs. Some libraries are officially supported, and some are contributed by the community. -## Official Libraries +## Official libraries | `Language` | `Source Code` | `Documentation` | | --------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | Javascript/Typescript | [supabase-js](https://github.com/supabase/supabase-js) | [Docs](https://supabase.com/docs/reference/javascript/introduction) | | Dart/Flutter | [supabase-flutter](https://github.com/supabase/supabase-flutter/tree/main/packages/supabase_flutter) | [Docs](https://supabase.com/docs/reference/dart/introduction) | -## Community Libraries +## Community libraries | `Language` | `Source Code` | `Documentation` | | ----------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------- | diff --git a/apps/docs/pages/guides/api/rest/generating-types.mdx b/apps/docs/pages/guides/api/rest/generating-types.mdx index ac14bc5ba50..3d185e87fde 100644 --- a/apps/docs/pages/guides/api/rest/generating-types.mdx +++ b/apps/docs/pages/guides/api/rest/generating-types.mdx @@ -84,7 +84,7 @@ import { Database } from './database.types' const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY) ``` -## Helper types for Tables and Joins +## Helper types for tables and joins You can use the following helper types to make the generated TypeScript types easier to use. diff --git a/apps/docs/pages/guides/auth.mdx b/apps/docs/pages/guides/auth.mdx index 151941810df..c3cf0065265 100644 --- a/apps/docs/pages/guides/auth.mdx +++ b/apps/docs/pages/guides/auth.mdx @@ -121,7 +121,7 @@ const { data, error } = await supabase.from('users').select('user_id, name') // Still => { id: 'd0714948', name: 'Jane' } ``` -### How It Works +### How it works 1. A user signs up. Supabase creates a new user in the `auth.users` table. 2. Supabase returns a new JWT, which contains the user's `UUID`. @@ -131,7 +131,7 @@ const { data, error } = await supabase.from('users').select('user_id, name') Supabase provides a special function in Postgres, `auth.uid()`, which extracts the user's UID from the JWT. This is especially useful when creating policies. -## User Management +## User management Supabase provides multiple endpoints to authenticate and manage your users: diff --git a/apps/docs/pages/guides/auth/auth-email-templates.mdx b/apps/docs/pages/guides/auth/auth-email-templates.mdx index cd323634d5e..b06142dfbcb 100644 --- a/apps/docs/pages/guides/auth/auth-email-templates.mdx +++ b/apps/docs/pages/guides/auth/auth-email-templates.mdx @@ -28,7 +28,7 @@ The templating system provides the following variables for use: ## Limitations -### Email Prefetching +### Email prefetching Certain email providers may have spam detection or other security features that prefetch URL links from incoming emails (e.g. [Safe Links in Microsoft Defender for Office 365](https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/safe-links-about?view=o365-worldwide)). In this scenario, the `{{ .ConfirmationURL }}` sent will be consumed instantly which leads to a "Token has expired or is invalid" error. @@ -47,7 +47,7 @@ To guard against this: The user should be brought to a page on your site where they can confirm the action by clicking a button. The button should contain the actual confirmation link which can be obtained from parsing the `confirmation_url={{ .ConfirmationURL }}` query parameter in the URL. -### Email Tracking +### Email tracking If you are using an external email provider that enables "email tracking", the links inside the Supabase email templates will be overwritten and won't perform as expected. We recommend disabling email tracking to ensure email links are not overwritten. diff --git a/apps/docs/pages/guides/auth/auth-helpers.mdx b/apps/docs/pages/guides/auth/auth-helpers.mdx index 2b1f873044d..e8b59ff4a37 100644 --- a/apps/docs/pages/guides/auth/auth-helpers.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers.mdx @@ -48,7 +48,7 @@ Working with server-side frameworks is slightly different to client-side framewo The Auth Helpers are in `beta`. They are usable in their current state, but it's likely that there will be breaking changes. -## Additional Links +## Additional links - [Source code](https://github.com/supabase/auth-helpers) - [Known bugs and issues](https://github.com/supabase/auth-helpers/issues) diff --git a/apps/docs/pages/guides/auth/auth-helpers/auth-ui.mdx b/apps/docs/pages/guides/auth/auth-helpers/auth-ui.mdx index 9dfb3964754..b832b27be0c 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/auth-ui.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/auth-ui.mdx @@ -59,7 +59,7 @@ const App = () => ( ) ``` -### Social Providers +### Social providers The Auth component also supports login with [official social providers](../../auth#providers). @@ -96,7 +96,7 @@ Options are available via `queryParams`: /> ``` -### Provider Scopes +### Provider scopes Provider Scopes can be requested through `providerScope`; @@ -115,7 +115,7 @@ Provider Scopes can be requested through `providerScope`; /> ``` -### Supported Views +### Supported views The Auth component is currently shipped with the following views: diff --git a/apps/docs/pages/guides/auth/auth-helpers/flutter-auth-ui.mdx b/apps/docs/pages/guides/auth/auth-helpers/flutter-auth-ui.mdx index 13af6fb5ddd..fe5b99f2786 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/flutter-auth-ui.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/flutter-auth-ui.mdx @@ -22,7 +22,7 @@ dependencies: supabase_auth_ui: ^0.1.0+2 ``` -### Initialize the Flutter Auth Package +### Initialize the Flutter Auth package ```dart import 'package:flutter/material.dart'; @@ -65,7 +65,7 @@ SupaEmailAuth( ) ``` -### Magic Link Auth +### Magic link Auth Use SupaMagicAuth widget to create a magic link signIn form. diff --git a/apps/docs/pages/guides/auth/auth-helpers/nextjs-pages.mdx b/apps/docs/pages/guides/auth/auth-helpers/nextjs-pages.mdx index cd7710d0e87..51966eaa264 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/nextjs-pages.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/nextjs-pages.mdx @@ -44,7 +44,7 @@ NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key ``` -## Basic Setup +## Basic setup -## Auth with Next.js Middleware +## Auth with Next.js middleware As an alternative to protecting individual pages you can use a [Next.js Middleware](https://nextjs.org/docs/middleware) to protect the entire directory or those that match the config object. In the following example, all requests to `/middleware-protected/*` will check whether a user is signed in, if successful the request will be forwarded to the destination route, otherwise the user will be redirected: @@ -631,11 +631,11 @@ export const config = { } ``` -## Migration Guide +## Migration guide ### Migrating to v0.7.X -#### PKCE Auth Flow +#### PKCE Auth flow PKCE is the new server-side auth flow implemented by the Next.js Auth Helpers. It requires a new API route for `/api/auth/callback` that exchanges an auth `code` for the user's `session`. @@ -655,7 +655,7 @@ supabase.auth.signUp({ }) ``` -#### Deprecated Functions +#### Deprecated functions With v0.7.x of the Next.js Auth Helpers a new naming convention has been implemented for createClient functions. The `createBrowserSupabaseClient` and `createServerSupabaseClient` functions have been marked as deprecated, and will be removed in a future version of the Auth Helpers. diff --git a/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx b/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx index 97e2d13d1a7..c5cfb0c434c 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx @@ -31,13 +31,13 @@ If you are using the `pages` directory, check out [Auth Helpers in Next.js Pages -## Install Next.js Auth Helpers library +## Install Next.js Auth helpers library ```sh Terminal npm install @supabase/auth-helpers-nextjs @supabase/supabase-js ``` -## Declare Environment Variables +## Declare environment variables Retrieve your project's URL and anon key from your [API settings](https://supabase.com/dashboard/project/_/settings/api), and create a `.env.local` file with the following environment variables: @@ -46,7 +46,7 @@ NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key ``` -## Managing session with Middleware +## Managing session with middleware When using the Supabase client on the server, you must perform extra steps to ensure the user's auth session remains active. Since the user's session is tracked in a cookie, we need to read this cookie and update it if necessary. @@ -384,7 +384,7 @@ TypeScript types can be [generated with the Supabase CLI](/docs/reference/javasc The combination of [Server Components](https://nextjs.org/docs/getting-started/react-essentials#server-components) and [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers) can be used to trigger the authentication process from form submissions. -#### Sign Up Route +#### Sign up route -#### Login Route +#### Login route -#### Logout Route +#### Logout route -#### Login Page +#### Login page -## Creating a Supabase Client +## Creating a Supabase client There are 5 ways to access the Supabase client with the Next.js Auth Helpers: @@ -673,7 +673,7 @@ There are 5 ways to access the Supabase client with the Next.js Auth Helpers: This allows for the Supabase client to be easily instantiated in the correct context. All you need to change is the context in the middle `create[ClientComponent|ServerComponent|ServerAction|RouteHandler|Middleware]Client` and the Auth Helpers will take care of the rest. -### Client Components +### Client components
-## Create an application on Discord Developer Portal +## Create an application on Discord Developer portal 1. Go to [https://discord.com/developers/applications](https://discord.com/developers/applications) (login using your discord account if required). 2. Click on **New Application** button available at left side of your profile picture. @@ -140,7 +140,7 @@ function hexToUint8Array(hex: string) { } ``` -## Deploy the Slash Command Handler +## Deploy the Slash Command handler ```bash supabase functions deploy discord-bot --no-verify-jwt diff --git a/apps/docs/pages/guides/functions/examples/push-notifications.mdx b/apps/docs/pages/guides/functions/examples/push-notifications.mdx index 00ca3ebec64..19350620750 100644 --- a/apps/docs/pages/guides/functions/examples/push-notifications.mdx +++ b/apps/docs/pages/guides/functions/examples/push-notifications.mdx @@ -10,14 +10,14 @@ export const meta = { Find the example code on [GitHub](https://github.com/supabase/supabase/blob/master/examples/user-management/expo-push-notifications/). -## Supabase Setup +## Supabase setup - [Create a new Supabase project](https://database.new). - Link your project: `supabase link --project-ref your-supabase-project-ref` - Start supabase locally: `supabase start` - Push up the schema: `supabase db push` (schema is defined in [supabase/migrations](https://github.com/supabase/supabase/blob/master/examples/user-management/expo-push-notifications/supabase/migrations/)) -## Expo Setup +## Expo setup To utilize Expo's push notification service, you must configure your app by installing a set of libraries, implementing functions to handle notifications, and setting up credentials for Android and iOS. Follow the official [Expo Push Notifications Setup Guide](https://docs.expo.dev/push-notifications/push-notifications-setup/) to get the credentials for Android and iOS. This project uses [Expo's EAS build](https://docs.expo.dev/build/introduction/) service to simplify this part. diff --git a/apps/docs/pages/guides/functions/examples/slack-bot-mention.mdx b/apps/docs/pages/guides/functions/examples/slack-bot-mention.mdx index e3aff2ea780..30705165eb3 100644 --- a/apps/docs/pages/guides/functions/examples/slack-bot-mention.mdx +++ b/apps/docs/pages/guides/functions/examples/slack-bot-mention.mdx @@ -8,7 +8,7 @@ export const meta = { The Slack Bot Mention Edge Function allows you to process mentions in Slack and respond accordingly. -## Configuring Slack Apps +## Configuring Slack apps For your bot to seamlessly interact with Slack, you'll need to configure Slack Apps: diff --git a/apps/docs/pages/guides/functions/import-maps.mdx b/apps/docs/pages/guides/functions/import-maps.mdx index df35809a30c..61169b033eb 100644 --- a/apps/docs/pages/guides/functions/import-maps.mdx +++ b/apps/docs/pages/guides/functions/import-maps.mdx @@ -33,7 +33,7 @@ import process from 'node:process' You can learn more about `npm:` specifiers and Node built-in APIs, in [Deno's documentation](https://docs.deno.com/runtime/manual/node/npm_specifiers). -## Importing Types +## Importing types If your [environment is set up properly](/docs/guides/functions/local-development) and the module you're importing is exporting types, the import will have types and autocompletion support. @@ -50,7 +50,7 @@ To include types for built-in Node APIs, add the following line to the top of yo /// ``` -## Using Import Maps +## Using import maps An [Import Map](https://github.com/WICG/import-maps#the-import-map) is similar to a `package.json` file. They are a way to manage your dependencies. Consider this code: diff --git a/apps/docs/pages/guides/functions/local-development.mdx b/apps/docs/pages/guides/functions/local-development.mdx index 6b1b6e51ffa..9a7ad164646 100644 --- a/apps/docs/pages/guides/functions/local-development.mdx +++ b/apps/docs/pages/guides/functions/local-development.mdx @@ -9,7 +9,7 @@ export const meta = { We recommend installing the Deno CLI and related tools for local development. -## Deno Support +## Deno support You can follow the [Deno guide](https://deno.com/manual@v1.32.5/getting_started/setup_your_environment) for setting up your development environment with your favorite editor/IDE. @@ -39,7 +39,7 @@ To enable the Deno language server only for the `supabase/functions` folder, add } ``` -## Multi-root workspaces in VS Code +## Multi-root workspaces in VSCode When developing with VS Code inside of an existing application, you can utilize [multi-root workspaces](https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces). diff --git a/apps/docs/pages/guides/functions/quickstart.mdx b/apps/docs/pages/guides/functions/quickstart.mdx index 5bb8b7edfac..48e4f73e44c 100644 --- a/apps/docs/pages/guides/functions/quickstart.mdx +++ b/apps/docs/pages/guides/functions/quickstart.mdx @@ -118,7 +118,7 @@ Read on for some common development tips. Here are a few recommendations when developing Edge Functions. -### Skipping Authorization checks +### Skipping authorization checks By default, Edge Functions require a valid JWT in the authorization header. If you want to use Edge Functions without Authorization checks (commonly used for Stripe webhooks), you can pass the `--no-verify-jwt` flag when serving your Edge Functions locally. @@ -128,7 +128,7 @@ supabase functions serve hello-world --no-verify-jwt Be careful when using this flag, as it will allow anyone to invoke your Edge Function without a valid JWT. The Supabase client libraries automatically handle authorization. -### Using HTTP Methods +### Using HTTP methods Edge Functions support `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS`. A Function can be designed to perform different actions based on a request's HTTP method. See the [example on building a RESTful service](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/restful-tasks) to learn how to handle different HTTP methods in your Function. @@ -176,7 +176,7 @@ verify_jwt = false import_map = './import_map.json' ``` -### Error Handling +### Error handling The `supabase-js` library provides several error types that you can use to handle errors that might occur when invoking Edge Functions: diff --git a/apps/docs/pages/guides/functions/unit-test.mdx b/apps/docs/pages/guides/functions/unit-test.mdx index 0006dc6869e..8361ba38a95 100644 --- a/apps/docs/pages/guides/functions/unit-test.mdx +++ b/apps/docs/pages/guides/functions/unit-test.mdx @@ -115,7 +115,7 @@ Please make sure to replace the placeholders (`supabaseUrl`, `supabaseKey`, `my_ -## Running Edge Functions Locally +## 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: diff --git a/apps/docs/pages/guides/getting-started.mdx b/apps/docs/pages/guides/getting-started.mdx index 9482a244184..eb92573d7a0 100644 --- a/apps/docs/pages/guides/getting-started.mdx +++ b/apps/docs/pages/guides/getting-started.mdx @@ -35,7 +35,7 @@ export const meta = { -### Use Cases +### Use cases
{useCases.map((item) => { @@ -55,7 +55,7 @@ export const meta = { })}
-### Framework Quickstarts +### Framework quickstarts
{quickstarts.map((item) => { @@ -75,7 +75,7 @@ export const meta = { })}
-### Web App Tutorials +### Web app tutorials
{webapps.map((item) => { @@ -97,7 +97,7 @@ export const meta = {
-### Mobile Tutorials +### Mobile tutorials
{mobile.map((item) => { diff --git a/apps/docs/pages/guides/getting-started/architecture.mdx b/apps/docs/pages/guides/getting-started/architecture.mdx index 70e504fe597..448299322c9 100644 --- a/apps/docs/pages/guides/getting-started/architecture.mdx +++ b/apps/docs/pages/guides/getting-started/architecture.mdx @@ -23,7 +23,7 @@ Each Supabase project consists of several tools: ![Supabase Architecture](/docs/img/supabase-architecture.png) -### PostgreSQL (Database) +### PostgreSQL (database) PostgreSQL is the core of Supabase. We do not abstract the PostgreSQL database — you can access it and use it with full privileges. We simply provide tools which makes PostgreSQL as easy to use as Firebase. @@ -32,7 +32,7 @@ PostgreSQL is the core of Supabase. We do not abstract the PostgreSQL database - License: [PostgreSQL License](https://www.postgresql.org/about/licence/) - Language: C -### Studio (Dashboard) +### Studio (dashboard) An open source Dashboard for managing your database and services. @@ -87,7 +87,7 @@ A modern runtime for JavaScript and TypeScript. - License: [MIT](https://github.com/denoland/deno/blob/main/LICENSE.md) - Language: TypeScript / Rust -### postgres-meta (Database management) +### `postgres-meta` (database management) A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries. @@ -105,7 +105,7 @@ A lightweight connection pooler for PostgreSQL. This is useful for connecting to - License: [ISC](https://github.com/pgbouncer/pgbouncer/blob/master/COPYRIGHT) - Language: C -### Kong (API Gateway) +### Kong (API gateway) A cloud-native API gateway, built on top of Nginx. @@ -114,7 +114,7 @@ A cloud-native API gateway, built on top of Nginx. - License: [Apache 2.0](https://github.com/Kong/kong/blob/master/LICENSE) - Language: Lua -## Product Principles +## Product principles It is our goal to provide an architecture that any large-scale company would design for themselves, and then provide tooling around that architecture that is easy-to-use for indie-developers and small teams. diff --git a/apps/docs/pages/guides/getting-started/features.mdx b/apps/docs/pages/guides/getting-started/features.mdx index 28e01945063..12c3e0ae36e 100755 --- a/apps/docs/pages/guides/getting-started/features.mdx +++ b/apps/docs/pages/guides/getting-started/features.mdx @@ -10,27 +10,27 @@ This is a non-exhaustive list of features that Supabase provides for every proje ## Database -### Postgres Database +### Postgres database Every project is a full Postgres database. [Docs](/docs/guides/database). -### Database Extensions +### Database extensions Every database comes with a full set of Postgres extensions. [Docs](/docs/guides/database/extensions). -### Database Functions +### Database functions Create custom database functions which you can call from the browser. [Docs](/docs/guides/database/functions). -### Database Triggers +### Database triggers Attach triggers to your tables to handle database changes. [Docs](/docs/guides/auth/managing-user-data#using-triggers). -### Database Webhooks +### Database webhooks Send database changes to any external service using Webhooks. [Link](https://supabase.com/blog/supabase-functions-updates#database-webhooks-alpha). -### Database Backups +### Database backups Projects are backed up daily with the option to upgrade to Point in Time recovery. @@ -50,19 +50,19 @@ Develop locally and push your changes to your production database using migratio ## Auth -### Email & Password Logins +### Email & password logins Build email logins for your application or website. [Docs](/docs/guides/auth/auth-email). -### Magic Links +### Magic links Build passwordless logins for your application or website.[Docs](/docs/guides/auth/auth-magic-link). -### Social Logins +### Social logins Provide social logins - everything from Apple, to GitHub, to Slack. [Docs](/docs/guides/auth/social-login). -### Phone Logins +### Phone logins Provide phone logins using a third-party SMS provider. [Docs](/docs/guides/auth/phone-login). @@ -70,17 +70,17 @@ Provide phone logins using a third-party SMS provider. [Docs](/docs/guides/auth/ Control the data each user can access with Postgres Policies. [Docs](/docs/guides/auth/row-level-security). -### Serverside Auth Helpers +### Serverside Auth helpers Helpers for implementing user authentication in popular frameworks like [Next.js](/docs/guides/auth/auth-helpers/nextjs) and [SvelteKit](/docs/guides/auth/auth-helpers/sveltekit) -### Auth UI Kit +### Auth UI kit Build login and registration pages with custom themes. [Docs](/docs/guides/auth/auth-helpers/auth-ui).
-## APIs & Client libraries +## APIs & client libraries ### Auto-generated REST API @@ -90,15 +90,15 @@ RESTful APIs are autogenerated from your database, without a single line of code Fast GraphQL APIs using our custom Postgres GraphQL extension. [Docs](/docs/guides/graphql/api). -### Realtime Database changes +### Realtime database changes Receive your database changes through websockets. [Docs](/docs/guides/realtime/postgres-changes). -### User Broadcasting +### User broadcasting Send messages between connected users through websockets. [Docs](/docs/guides/realtime/broadcast). -### User Presence +### User presence Synchronize shared state across your users, including online status and typing indicators. [Docs](/docs/guides/realtime/presence). @@ -123,7 +123,7 @@ Upload large files easily using resumable uploads. [Docs](/docs/guides/storage/u Cache large files using the Supabase CDN. [Docs](/docs/guides/storage/cdn/fundamentals). -### Image Transformations +### Image transformations Transform images on the fly. [Docs](/docs/guides/storage/serving/image-transformations). @@ -137,7 +137,7 @@ Globally distributed TypeScript functions to execute custom business logic. [Doc
-## Project Management +## Project management ### CLI @@ -149,7 +149,7 @@ Manage your projects programmatically. [Docs](/docs/reference/api).
-## Feature Status +## Feature status Both Postgres and the Supabase Platform are production-ready. Some tools we offer on top of Postgres are still under development. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx index 4160e9fce9f..a21b2410a15 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-angular.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Angular app from scratch. @@ -129,7 +129,7 @@ export class SupabaseService { Optionally, update [src/styles.css](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/angular-user-management/src/styles.css) to style the app. -### Set up a Login component +### Set up a login component Let's set up an Angular component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. Create an **AuthComponent** with `ng g c auth` Angular CLI command. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-expo-react-native.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-expo-react-native.mdx index 859147ec7d7..33eacabd3b3 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-expo-react-native.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-expo-react-native.mdx @@ -18,7 +18,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the React Native app from scratch. @@ -162,7 +162,7 @@ These variables are safe to expose in your Expo app since Supabase has -### Set up a Login component +### Set up a login component Let's set up a React Native component to manage logins and sign ups. Users would be able to sign in with their email and password. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-flutter.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-flutter.mdx index 8be1f9a2f75..2bf0b17035e 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-flutter.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-flutter.mdx @@ -18,7 +18,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Flutter app from scratch. @@ -143,7 +143,7 @@ Future main() async { final supabase = Supabase.instance.client; ``` -### Set up Splash Screen +### Set up splash screen Let's create a splash screen that will be shown to users right after they open the app. This screen retrieves the current session and redirects the user accordingly. @@ -189,7 +189,7 @@ class _SplashPageState extends State { } ``` -### Set up a Login page +### Set up a login page Let's create a Flutter widget to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. @@ -297,7 +297,7 @@ class _LoginPageState extends State { } ``` -### Set up Account page +### Set up account page After a user is signed in we can allow them to edit their profile details and manage their account. Let's create a new widget called `account_page.dart` for that. @@ -534,7 +534,7 @@ We will be storing the image as a publicly sharable image. Make sure your `avatars` bucket is set to public, and if it is not, change the publicity by clicking the dot menu that appears when you hover over the bucket name. You should see an orange `Public` badge next to your bucket name if your bucket is set to public. -### Adding image uploading feature to Account page +### Adding image uploading feature to account page We will use [`image_picker`](https://pub.dev/packages/image_picker) plugin to select an image from the device. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-ionic-angular.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-ionic-angular.mdx index 582984e16fc..1c082b246cf 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-ionic-angular.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-ionic-angular.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Angular app from scratch. @@ -132,7 +132,7 @@ export class SupabaseService { } ``` -### Set up a Login route +### Set up a login route Let's set up a route to manage logins and signups. We'll use Magic Links so users can sign in with their email without using passwords. Create a **LoginPage** with the `ionic g page login` Ionic CLI command. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-ionic-react.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-ionic-react.mdx index d86e19fe620..fda5709a31f 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-ionic-react.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-ionic-react.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the React app from scratch. @@ -58,7 +58,7 @@ const supabaseAnonKey = process.env.REACT_APP_SUPABASE_ANON_KEY export const supabase = createClient(supabaseUrl, supabaseAnonKey) ``` -### Set up a Login route +### Set up a login route Let's set up a React component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-ionic-vue.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-ionic-vue.mdx index 1085817180a..388c1bea13b 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-ionic-vue.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-ionic-vue.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Vue app from scratch. @@ -58,7 +58,7 @@ const supabaseAnonKey = process.env.VUE_APP_SUPABASE_ANON_KEY as string; export const supabase = createClient(supabaseUrl, supabaseAnonKey); ``` -### Set up a Login route +### Set up a login route Let's set up a Vue component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-kotlin.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-kotlin.mdx index 9885de8eed0..d409e27c670 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-kotlin.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-kotlin.mdx @@ -43,7 +43,7 @@ SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY SUPABASE_URL=YOUR_SUPABASE_URL ``` -#### Read and set value to BuildConfig +#### Read and set value to `BuildConfig` In your `build.gradle` (app) file, create a `Properties` object and read the values from your `local.properties` file by calling the `buildConfigField` method: diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-nextjs.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-nextjs.mdx index ca68d79bf05..fda0843d508 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-nextjs.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-nextjs.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Next.js app from scratch. @@ -64,7 +64,7 @@ NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_URL NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY ``` -### App Styling (Optional) +### App styling (optional) An optional step is to update the CSS file `app/globals.css` to make the app look nice. You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/nextjs-user-management/app/globals.css). @@ -81,7 +81,7 @@ Install the auth helpers for Next.js npm install @supabase/auth-helpers-nextjs @supabase/supabase-js ``` -### Next.js Middleware +### Next.js middleware -### Set up a Login component +### Set up a login component #### Supabase Auth UI diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx index 0eef5fb2232..53cf590e5c0 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Vue 3 app from scratch. @@ -49,7 +49,7 @@ These variables will be exposed on the browser, and that's completely fine since Amazing thing about [NuxtSupabase](https://supabase.nuxtjs.org/) is that setting environment variables is all we need to do in order to start using Supabase. No need to initialize Supabase. The library will take care of it automatically. -### App Styling (Optional) +### App styling (optional) An optional step is to update the CSS file `assets/main.css` to make the app look nice. You can find the full contents of this file [here](https://github.com/supabase-community/nuxt3-quickstarter/blob/main/assets/main.css). diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-react.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-react.mdx index 8ba8307b8fd..a80d199f614 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-react.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-react.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the React app from scratch. @@ -59,12 +59,12 @@ const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY export const supabase = createClient(supabaseUrl, supabaseAnonKey) ``` -### App Styling (Optional) +### App styling (optional) An optional step is to update the CSS file `src/index.css` to make the app look nice. You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/react-user-management/src/index.css). -### Set up a Login component +### Set up a login component Let's set up a React component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. 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 a74a8dd5519..d2cccbb7e73 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-redwoodjs.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-redwoodjs.mdx @@ -43,7 +43,7 @@ to how your Supabase `public` schema references the `auth.users`. -## Building the App +## Building the app Let's start building the RedwoodJS app from scratch. @@ -157,12 +157,12 @@ const App = () => ( export default App ``` -### App Styling (Optional) +### App styling (optional) An optional step is to update the CSS file `web/src/index.css` to make the app look nice. You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/react-user-management/src/index.css). -### Start RedwoodJS and your first Page +### Start RedwoodJS and your first page Let's test our setup at the moment by starting up the app: @@ -216,7 +216,7 @@ const Routes = () => { export default Routes ``` -### Set up a Login component +### Set up a login component Let's set up a Redwood component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. @@ -288,7 +288,7 @@ const Auth = () => { export default Auth ``` -### Set up an Account component +### Set up an account component After a user is signed in we can allow them to edit their profile details and manage their account. @@ -433,7 +433,7 @@ You'll see the use of `useAuth()` several times. Redwood's `useAuth` hook provid logIn, logOut, currentUser, and access the `supabase` authenticate client. We'll use it to get an instance of the supabase client to interact with your API. -### Update Home Page +### Update home page Now that we have all the components in place, let's update your `HomePage` page to use them: diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-refine.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-refine.mdx index cc9c4fe030f..0ec2f8b2c75 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-refine.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-refine.mdx @@ -29,7 +29,7 @@ It is possible to customize the `authProvider` for Supabase and as we'll see bel -## Building the App +## Building the app Let's start building the refine app from scratch. @@ -63,7 +63,7 @@ We should have a running instance of the app with a Welcome page at `http://loca Let's move ahead to understand the generated code now. -### refine `supabaseClient` +### Refine `supabaseClient` The `create refine-app` generated a Supabase client for us in the `src/utility/supabaseClient.ts` file. It has two constants: `SUPABASE_URL` and `SUPABASE_KEY`. We want to replace them as `supabaseUrl` and `supabaseAnonKey` respectively and assign them our own Supabase server's values. @@ -273,7 +273,7 @@ const authProvider: AuthBindings = { export default authProvider ``` -### Set up a Login component +### Set up a login component We have chosen to use the headless refine core package that comes with no supported UI framework. So, let's set up a plain React component to manage logins and sign ups. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-solidjs.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-solidjs.mdx index b6df048c4ce..cb300f5cc65 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-solidjs.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-solidjs.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the SolidJS app from scratch. @@ -56,12 +56,12 @@ const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY export const supabase = createClient(supabaseUrl, supabaseAnonKey) ``` -### App Styling (Optional) +### App styling (optional) An optional step is to update the CSS file `src/index.css` to make the app look nice. You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/solid-user-management/src/index.css). -### Set up a Login component +### Set up a login component Let's set up a SolidJS component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-svelte.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-svelte.mdx index 90fd9dd6dbc..f5634a1db9b 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-svelte.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-svelte.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Svelte app from scratch. @@ -57,12 +57,12 @@ const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY export const supabase = createClient(supabaseUrl, supabaseAnonKey) ``` -### App Styling (Optional) +### App styling (optional) An optional step is to update the CSS file `src/app.css` to make the app look nice. You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/svelte-user-management/src/app.css). -### Set up a Login component +### Set up a login component Let's set up a Svelte component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-sveltekit.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-sveltekit.mdx index 6f31866dc27..0b4b80c6f53 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-sveltekit.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-sveltekit.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Svelte app from scratch. @@ -186,7 +186,7 @@ Update your `src/routes/+layout.svelte`:
``` -### Set up a Login page +### Set up a login page #### Supabase Auth UI diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-swift.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-swift.mdx index 15b988ae533..7ab17387e78 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-swift.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-swift.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the SwiftUI app from scratch. @@ -43,7 +43,7 @@ let supabase = SupabaseClient( ) ``` -### Set up a Login view +### Set up a login view Set up a SwiftUI view to manage logins and sign ups. Users should be able to sign in using a magic link. @@ -330,7 +330,7 @@ enum TransferError: Error { } ``` -#### Add PhotosPicker to Profile page +#### Add PhotosPicker to profile page ```swift ProfileView.swift struct ProfileView: View { diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx index b4effd63687..16cb193dba1 100644 --- a/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx +++ b/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx @@ -17,7 +17,7 @@ If you get stuck while working through this guide, refer to the [full example on -## Building the App +## Building the app Let's start building the Vue 3 app from scratch. @@ -64,7 +64,7 @@ export const supabase = createClient(supabaseUrl, supabaseAnonKey) Optionally, update [src/style.css](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/vue3-user-management/src/style.css) to style the app. -### Set up a Login component +### Set up a login component Set up an `src/components/Auth.vue` component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords. diff --git a/apps/docs/pages/guides/platform/backups.mdx b/apps/docs/pages/guides/platform/backups.mdx index 8ee3a4d008a..10699416268 100644 --- a/apps/docs/pages/guides/platform/backups.mdx +++ b/apps/docs/pages/guides/platform/backups.mdx @@ -16,7 +16,7 @@ export const mutuallyExclusiveNote = ( Database backups are an integral part of any disaster recovery plan. Disasters come in many shapes and sizes. It could be as simple as accidentally deleting a table column, the database crashing, or even a natural calamity wiping out the underlying hardware a database is running on. The risks and impact brought by these scenarios can never be fully eliminated, but only minimized or even mitigated. Having database backups is a form of insurance policy. They are essentially snapshots of the database at various points in time. When disaster strikes, database backups allow the project to be brought back to any of these points in time, therefore averting the crisis. -## Frequency of Backups +## Frequency of backups When deciding how often a database should be backed up, the key business metric Recovery Point Objective (RPO) should be considered. RPO is the threshold for how much data, measured in time, a business could lose when disaster strikes. This amount is fully dependent on a business and its underlying requirements. A low RPO would mean that database backups would have to be taken at an increased cadence throughout the day. Each Supabase project has access to two forms of backups, Daily Backups and Point-in-Time Recovery (PITR). The agreed upon RPO would be a deciding factor in choosing which solution best fits a project. @@ -28,7 +28,7 @@ Database backups do not include objects stored via the Storage API, as the datab -## Daily Backups +## Daily backups All Pro and Enterprise plan Supabase projects are backed up automatically on a daily basis. In terms of Recovery Point Objective (RPO), Daily Backups would be suitable for projects willing to lose up to 24 hours worth of data if disaster hits at the most inopportune time. If a lower RPO is required, enabling Point-in-Time Recovery should be considered. @@ -38,13 +38,13 @@ For security purposes, passwords for custom roles are not stored in daily backup -### Backup Process [#daily-backups-process] +### Backup process [#daily-backups-process] The PostgreSQL utility [pg_dumpall](https://www.postgresql.org/docs/current/app-pg-dumpall.html) is used to perform daily backups. An SQL file is generated, zipped up, and sent to our storage servers for safe keeping. You can access daily backups in the [Scheduled backups](https://supabase.com/dashboard/project/_/database/backups/scheduled) settings in the Dashboard. Pro plan projects can access the last 7 days' worth of daily backups while Enterprise plan projects can access up to 30 days' worth of daily backups. Users can restore their project to any one of the backups. If you wish to generate a logical backup on your own, you can do so through the [Supabase CLI](/docs/reference/cli/supabase-db-dump). -#### Backup Process for Large Databases +#### Backup process for large databases Databases larger than 100GB[^1], if they're on a recent build[^2] of the Supabase platform, get automatically transitioned[^3] to use daily physical backups. Physical backups are a more performant backup mechanism that lowers the overhead and impact on the database being backed up, and also avoids holding locks on objects in your database for a long period of time. While restores are unaffected, the backups created using this method cannot be downloaded from the Backups section of the dashboard. @@ -56,7 +56,7 @@ Once a database is transitioned to using physical backups, it continues to use p [^2]: Projects created or upgraded after the 14th of July 2022 are eligible. [^3]: The transition to physical backups is handled transparently and does not require any user intervention. It involves a single restart of the database to pick up new configuration that can only be loaded at start; the expected downtime for the restart is a few seconds. -### Restoration Process [#daily-backups-restoration-process] +### Restoration process [#daily-backups-restoration-process] When selecting a backup to restore to, select the closest available one made before the desired point in time to restore to. Earlier backups can always be chosen too but do consider the number of days' worth of data that could be lost. @@ -64,7 +64,7 @@ The Dashboard will then prompt for a confirmation before proceeding with the res {/* screenshot of the Dashboard of the project completing restoration */} -## Point-in-Time Recovery +## Point-in-Time recovery Point-in-Time Recovery (PITR) allows a project to be backed up at much shorter intervals. This provides users an option to restore to any chosen point of up to seconds in granularity. Even with daily backups, a day's worth of data could still be lost. With PITR, backups could be performed up to the point of disaster. @@ -78,7 +78,7 @@ Projects interested in PITR will also need to use at least a Small compute add-o {mutuallyExclusiveNote} -### Backup Process [#pitr-backup-process] +### Backup process [#pitr-backup-process] As discussed [here](https://supabase.com/blog/postgresql-physical-logical-backups), PITR is made possible by a combination of taking physical backups of a project, as well as archiving [Write Ahead Log (WAL)](https://www.postgresql.org/docs/current/wal-intro.html) files. Physical backups provide a snapshot of the underlying directory of the database, while WAL files contain records of every change made in the database. @@ -92,7 +92,7 @@ You can access PITR in the [Point in Time](https://supabase.com/dashboard/projec Note that the latest restore point of the project could be significantly far from the current time. This occurs when there has not been any recent activity in the database, and therefore no WAL file backups have been made recently. This is perfectly fine as the state of the database at the latest point of recovery would still be indicative of the state of the database at the current time given that no transactions have been made in between. -### Restoration Process [#pitr-restoration-process] +### Restoration process [#pitr-restoration-process] ![PITR: Calendar view](/docs/img/backups-pitr-calendar-view.png) diff --git a/apps/docs/pages/guides/platform/branching.mdx b/apps/docs/pages/guides/platform/branching.mdx index 18f2b4dab56..8479805094a 100644 --- a/apps/docs/pages/guides/platform/branching.mdx +++ b/apps/docs/pages/guides/platform/branching.mdx @@ -71,11 +71,11 @@ Supabase Branching follows the [Trunk Based Development](https://trunkbaseddevel -### Production Branch +### Production branch In Git, you have a Production Branch (typically this is `main`, `master`, `prod`, etc). This should also be your Supabase project's Production Branch. -### Preview Branches +### Preview branches After connecting your Supabase project to one of the supported [Git providers](#git-providers), a corresponding Supabase Preview will be created whenever a new Git branch is created. @@ -105,7 +105,7 @@ For security reasons, Preview Branches do not contain production data. Future ve -### Merging Production changes +### Merging production changes When you merge your Git branch into the production branch, all changes will be applied to your Production environment. @@ -113,7 +113,7 @@ When you merge your Git branch into the production branch, all changes will be a We currently support [GitHub](#branching-with-github). If you are interested in other Git providers, join the [discussion](<(https://github.com/orgs/supabase/discussions/18936)>) for GitLab, BitBucket, and non-Git based Branching. -## How to use Supabase Branching +## How to use Supabase branching Supabase Branching requires a hosted [Git provider](#git-providers). Follow these steps to connect your Supabase project to a Git provider, and enable branching. @@ -200,7 +200,7 @@ Push your new project to a GitHub repo. For more information, see the GitHub gui
-### Enable Supabase Branching +### Enable Supabase branching Once your repository is [correctly prepared](#preparing-your-git-repository), you can enable branching from the Supabase dashboard. @@ -574,7 +574,7 @@ When a preview branch is merged into the production branch, it creates a schema You can solve these conflicts the way you would solve normal Git Conflicts: merge or rebase from your production Git branch to your preview Git branch. Since migrations are applied sequentially, ensure that migration files are timestamped correctly after the rebase. Changes that build on top of earlier changes should always have later timestamps. -### Changing Production Branch +### Changing production branch It's not possible to change the Git branch used as the Production branch for Supabase Branching. The only way to change it is to disable and re-enable branching. See [Disable Branching](#disable-branching). @@ -625,7 +625,7 @@ If you prefer not to use branching, you can manage your environments and tests i You can also combine both strategies to perform both local and staging tests. -## Early Access Pricing +## Early access pricing Branching is available on the Pro Plan and above for Early Access users. The price during Early Access is: diff --git a/apps/docs/pages/guides/platform/compute-add-ons.mdx b/apps/docs/pages/guides/platform/compute-add-ons.mdx index 17f19f00b3c..28e8ad54f03 100644 --- a/apps/docs/pages/guides/platform/compute-add-ons.mdx +++ b/apps/docs/pages/guides/platform/compute-add-ons.mdx @@ -54,7 +54,7 @@ SSD Disks are attached to your servers and the disk performance depends on the c [Contact us](https://supabase.com/contact/enterprise) if you require a custom plan. -### Bursting and Disk Budget +### Bursting and disk budget Smaller compute instances can burst up to their largest throughput and IOPS for 30 minutes in a day. Beyond that, the performance reverts to the baseline. For example, the free tier can burst up to 2,085 Mbps for 30 minutes a day and reverts to the baseline performance of 87 Mbps. Your disk budget gets replenished throughout the day. @@ -62,7 +62,7 @@ If you need consistent disk performance, choose the 4XL or larger compute add-on If you're unsure of how much throughput or IOPS your application requires, you can load test your project and inspect these [metrics in the Dashboard](https://supabase.com/dashboard/project/_/reports). If the `Disk IO % consumed` stat is more than 1%, it indicates that your workload has burst beyond the baseline IO throughput during the day. If this metric goes to 100%, the workload has used up all available disk budget and will revert to baseline performance. Projects that use any disk budget are good candidates for upgrading to a larger compute add-on with higher baseline throughput. -## Postgres Replication Slots and WAL Senders +## Postgres replication slots and WAL senders [Replication Slots](https://postgresqlco.nf/doc/en/param/max_replication_slots) and [WAL Senders](https://postgresqlco.nf/doc/en/param/max_wal_senders/) are used to enable [Postgres Replication](/docs/guides/database/replication). diff --git a/apps/docs/pages/guides/platform/custom-domains.mdx b/apps/docs/pages/guides/platform/custom-domains.mdx index 1570a332317..b7ce3eff52b 100644 --- a/apps/docs/pages/guides/platform/custom-domains.mdx +++ b/apps/docs/pages/guides/platform/custom-domains.mdx @@ -18,11 +18,11 @@ Custom domains allow you to present a branded experience to your users. Custom d > -## Configure a Custom Domain using the Supabase Dashboard +## Configure a custom domain using the Supabase dashboard Follow the **Custom Domains** steps in the [General Settings](https://supabase.com/dashboard/project/_/settings/general) page in the Dashboard to set up a custom domain for your project. -## Configure a Custom Domain using the Supabase CLI +## Configure a custom domain using the Supabase CLI This example assumes your Supabase project is `foobarbaz` with a corresponding API URL `foobarbaz.supabase.co` and configures a custom domain at `api.example.com`. @@ -35,7 +35,7 @@ To get started: Set up a CNAME record for `api.example.com`, resolving to `foobarbaz.supabase.co.`, with as low a TTL as possible. -### Configure TXT Verification +### Configure TXT verification Use the `create` subcommand of the CLI to notify Supabase of your domain and retrieve TXT verification records: @@ -89,7 +89,7 @@ Finally, you can use the `activate` subcommand to reconfigure your project: supabase domains activate --project-ref foobarbaz --experimental ``` -## Remove a Custom Domain +## Remove a custom domain If you have a custom domain (`api.example.com`) 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: @@ -99,7 +99,7 @@ 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 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`. @@ -110,7 +110,7 @@ To get started: 1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project you'd like to set up a vanity subdomain for. 1. Ensure that your organization is on a paid plan (Pro/Team/Enterprise plan) in the [Billing page of the Dashboard](https://supabase.com/dashboard/org/_/billing). -## Configure a Vanity Subdomain +## 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`. @@ -137,7 +137,7 @@ The `activate` subcommand can be used to initiate the activation: supabase vanity-subdomains --project-ref fwmssjhjgszhnavvqxnt activate --desired-subdomain my-example-subdomain --experimental ``` -## Remove a Vanity Subdomain +## 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: diff --git a/apps/docs/pages/guides/platform/custom-postgres-config.mdx b/apps/docs/pages/guides/platform/custom-postgres-config.mdx index c5888bf6a6e..d1eb38daf43 100644 --- a/apps/docs/pages/guides/platform/custom-postgres-config.mdx +++ b/apps/docs/pages/guides/platform/custom-postgres-config.mdx @@ -14,13 +14,13 @@ Custom Postgres Config gives you advanced control over your database. Using it t -## Custom Postgres Config +## Custom Postgres config While most Postgres parameters can be configured from [within SQL](https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-SQL-COMMAND-INTERACTION), some parameters must either be set using a config file, or require superuser access. Custom Postgres Config allows you to configure such parameters. From the perspective of Postgres, config overrides will show up in the global configuration file. Role or database specific configuration could override them for some scenarios; please refer to the [Postgres docs](https://www.postgresql.org/docs/current/) on each parameter for additional details. -### Supported Parameters +### Supported parameters The following parameters are available for overrides: @@ -74,7 +74,7 @@ export const Page = ({ children }) => export default Page -## Pooler Config +## Pooler config You can also [customize some parameters](https://supabase.com/dashboard/project/_/settings/database) for the Connection Pooler: diff --git a/apps/docs/pages/guides/platform/database-size.mdx b/apps/docs/pages/guides/platform/database-size.mdx index 503bb3c79ae..a74b7c1a6b1 100644 --- a/apps/docs/pages/guides/platform/database-size.mdx +++ b/apps/docs/pages/guides/platform/database-size.mdx @@ -47,7 +47,7 @@ Supabase projects have automatic vacuuming enabled, which ensures that these ope It is possible to [fine-tune](https://www.percona.com/blog/2018/08/10/tuning-autovacuum-in-postgresql-and-autovacuum-internals/) the [autovacuum parameters](https://www.enterprisedb.com/blog/postgresql-vacuum-and-analyze-best-practice-tips), or [manually initiate](https://www.postgresql.org/docs/current/sql-vacuum.html) vacuum operations. Running a manual vacuum after deleting large amounts of data from your DB could help reduce the database size reported by Postgres. -### Preoccupied Space +### Preoccupied space New Supabase projects have a database size of ~40-60mb. This space includes pre-installed extensions, schemas, and default Postgres data. Additional database size is used when installing extensions, even if those extensions are inactive. @@ -55,7 +55,7 @@ New Supabase projects have a database size of ~40-60mb. This space includes pre- Supabase uses network-attached storage to balance performance with scalability. The behavior of your disk depends on your billing plan. -### Paid Plan Behavior +### Paid plan behavior Projects on the Pro plan and above have auto-scaling Disk Storage. @@ -79,7 +79,7 @@ A Supabase (or Postgres) update will "right-size" your disk based on the current 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 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: diff --git a/apps/docs/pages/guides/platform/enterprise-billing.mdx b/apps/docs/pages/guides/platform/enterprise-billing.mdx index fc6d8ac936a..7033890c093 100644 --- a/apps/docs/pages/guides/platform/enterprise-billing.mdx +++ b/apps/docs/pages/guides/platform/enterprise-billing.mdx @@ -11,7 +11,7 @@ Enterprise customers can use Account-based Billing to simplify billing for multi This is for users considering or on Enterprise plan only. -## Account-based Billing +## Account-based billing By default, each organization has a subscription and a plan. For our Enterprise customers, we offer Account-based Billing, so multiple organizations can point to a single Enterprise subscription, further simplifying billing. @@ -19,7 +19,7 @@ By default, each organization has a subscription and a plan. For our Enterprise With Account-based Billing, all organizations and projects within the subscription are recognized as Enterprise and your support tier or security addons propagate to all projects. -## Monitoring Enterprise Usage +## Monitoring Enterprise usage For the usage-billing, we’ll sum up the usage from all organizations and projects. You can still break down the usage per organization or per project by going to the [organization billing page](/dashboard/org/_/billing). diff --git a/apps/docs/pages/guides/platform/exhaust-disk-io.mdx b/apps/docs/pages/guides/platform/exhaust-disk-io.mdx index 8801f28cc5b..53998339c04 100644 --- a/apps/docs/pages/guides/platform/exhaust-disk-io.mdx +++ b/apps/docs/pages/guides/platform/exhaust-disk-io.mdx @@ -7,13 +7,13 @@ export const meta = { 'Understand Disk IO, what can deplete your Disk Budget and what you can do about it.', } -## Understanding Disk IO and Disk Budget +## Understanding disk IO and disk budget Disk IO refers to two metrics: throughput in Megabits per Second and IOPS which are Input/Output Operations per Second. Depending on the compute add-on of your instance you will have [different baseline performances](https://supabase.com/docs/guides/platform/compute-add-ons#disk-io). Smaller compute instances can burst and exceed their baseline performance for a short quota of time every day. This quota is represented as your Disk Budget and once your Disk Budget is consumed, your instance reverts back to its baseline performance. You can read more about this under [Bursting and Disk Budget](https://supabase.com/docs/guides/platform/compute-add-ons#bursting-and-disk-budget). -## Depleting your Disk Budget +## Depleting your disk budget Running out of Disk Budget means that your instance is using more disk than its compute add-on can handle and essentially gets throttled. This could have a wide range of implications: @@ -23,7 +23,7 @@ Running out of Disk Budget means that your instance is using more disk than its - Disruption of internal Postgres processes such as [autovacuuming](https://supabase.com/docs/guides/platform/database-size#vacuum-operations) - Your instance may become unresponsive -## Monitor your Disk Budget +## Monitor your disk budget To check your Disk Budget on the Supabase Platform, head over to [Database Health in the Reports section](https://supabase.com/dashboard/project/_/reports/database). diff --git a/apps/docs/pages/guides/platform/exhaust-ram.mdx b/apps/docs/pages/guides/platform/exhaust-ram.mdx index 69139f07646..40989737c0f 100644 --- a/apps/docs/pages/guides/platform/exhaust-ram.mdx +++ b/apps/docs/pages/guides/platform/exhaust-ram.mdx @@ -15,11 +15,11 @@ High memory usage doesn't necessarily mean that your instance is at risk. Memory -## Base Memory Usage +## Base memory usage You may observe elevated memory usage even when your database has little to no load. Supabase requires a wide range of services other than Postgres to operate, which can result in an elevated base memory usage. Especially on the smallest compute instance that comes with 1 GB of RAM, it is not unusual for your project to have a base memory usage of ~50%. -## Issues with High Memory Usage +## Issues with high memory usage Every Supabase project runs in its own dedicated virtual machine. Your instance will have a different set of hardware provisioned depending on your [compute add-on](https://supabase.com/docs/guides/platform/compute-add-ons). Depending on your workload, your compute hardware may not be suitable and can result in high RAM usage. diff --git a/apps/docs/pages/guides/platform/going-into-prod.mdx b/apps/docs/pages/guides/platform/going-into-prod.mdx index eae61f7fd31..b651e6b6658 100644 --- a/apps/docs/pages/guides/platform/going-into-prod.mdx +++ b/apps/docs/pages/guides/platform/going-into-prod.mdx @@ -53,12 +53,12 @@ After developing your project and deciding it's Production Ready, you should run - Point in Time Recovery (PITR) allows a project to be backed up at much shorter intervals. This provides users an option to restore to any chosen point of up to seconds in granularity. In terms of Recovery Point Objective (RPO), Daily Backups would be suitable for projects willing to lose up to 24 hours worth of data. If a lower RPO is required, enable PITR. - Upgrading to the Supabase Pro plan will give you [access to our support team](https://supabase.com/dashboard/support/new). -## Rate Limiting, Resource Allocation, & Abuse Prevention +## Rate limiting, resource allocation, & abuse prevention - Supabase employs a number of safeguards against bursts of incoming traffic to prevent abuse and help maximize stability across the platform - If you're expecting high load events including production launches or heavy load testing, or prolonged high resource usage please give us at least 2 weeks notice. You can do this by opening a ticket via the [support form](https://supabase.com/dashboard/support/new). -### Auth Rate Limits +### Auth rate limits - The table below shows the rate limit quotas on the following authentication endpoints. You can configure the auth rate limits for your project [here](/dashboard/project/_/auth/rate-limits). @@ -73,16 +73,16 @@ After developing your project and deciding it's Production Ready, you should run | Token refresh requests | `/auth/v1/token` | IP Address | 1800 requests per hour (with bursts up to 30 requests) | | Create or Verify an MFA challenge | `/auth/v1/factors/:id/challenge` `/auth/v1/factors/:id/verify` | IP Address | 15 requests per minute (with bursts up to 30 requests) | -### Realtime Quotas +### Realtime quotas - Review the [Realtime quotas](/docs/guides/realtime/quotas). - If you need quotas increased you can always [contact support](https://supabase.com/dashboard/support/new). -### Abuse Prevention +### Abuse prevention - Supabase provides CAPTCHA protection on the signup, sign-in and password reset endpoints. Please refer to [our guide](/docs/guides/auth/auth-captcha) on how to protect against abuse using this method. -### Email Link Validity +### Email link validity - When working with enterprise systems, email scanners may scan and make a `GET` request to the reset password link or sign up link in your email. Since links in Supabase Auth are single use, a user who opens an email post-scan to click on a link will receive an error. To get around this problem, consider altering the email template to replace the original magic link with a link to a domain you control. The domain can present the user with a "Sign-in" button which redirect the user to the original magic link URL when clicked. diff --git a/apps/docs/pages/guides/platform/http-status-codes.mdx b/apps/docs/pages/guides/platform/http-status-codes.mdx index abe9e9cf7ed..102e59af7d5 100644 --- a/apps/docs/pages/guides/platform/http-status-codes.mdx +++ b/apps/docs/pages/guides/platform/http-status-codes.mdx @@ -8,35 +8,35 @@ export const meta = { The Supabase platform offers several HTTP APIs for each project. These APIs can use the status codes to indicate the state of the project, and the request being processed. The status codes returned for requests can be access via the [logs explorer](../platform/logs#logs-explorer). -## 2XX Success +## 2XX success 2XX status codes indicate that the request was processed successfully. -## 3XX Redirects +## 3XX redirects 3XX status codes indicate that the client must initiate another course of action to have the request processed successfully. The most popular usage of 3XX codes is to redirect the client to a different location. -## 4XX Client Errors +## 4XX client errors 4XX status codes indicate an issue on the client's end with the request being made. These could include missing or invalid auth information, a malformed request, making too many requests in too short a time period ("rate limiting"), or a network issue on the client's end. -## 5XX Server or Project Errors +## 5XX server or project errors 5XX status codes indicate that the project was unable to process the request successfully, but not because of an issue with the client's request. 5XX status codes can be the result of the project not having enough [compute](/docs/guides/platform/compute-add-ons) to process a complex request being made by a client or not being able to keep up with the volume of requests made against the project. -### 54X Project Errors +### 54X project errors 54X status codes are custom codes used by the Supabase platform to indicate the state of the project. -#### 540 Project Paused +#### 540 project paused The project the request was being made against has been paused. The project cannot process requests until it is un-paused by the owner. Free-plan projects may be paused due to inactivity, on request by the owner, or in rare instances, due to abuse. -#### 544 Project API Gateway Timeout +#### 544 project API gateway timeout The request is not completed within the configured time limit. diff --git a/apps/docs/pages/guides/platform/logs.mdx b/apps/docs/pages/guides/platform/logs.mdx index 94b559943cd..d449fe3b2ab 100644 --- a/apps/docs/pages/guides/platform/logs.mdx +++ b/apps/docs/pages/guides/platform/logs.mdx @@ -9,7 +9,7 @@ export const meta = { The Supabase Platform includes a Logs Explorer that allows log tracing and debugging. Log retention is based on your [project's pricing plan](https://supabase.com/pricing). -## Product Logs +## Product logs Supabase provides a logging interface specific to each product. You can use simple regular expressions for keywords and patterns to search log event messages. You can also export and download the log events matching your query as a spreadsheet. @@ -88,7 +88,7 @@ Edge Function log messages have a max length of 10,000 characters. If you try to --- -## Logging Postgres Queries +## Logging Postgres queries By default, only DDL statements are logged for new Supabase projects. @@ -155,7 +155,7 @@ If any permission errors are encountered when executing `alter role postgres ... -## Logging Realtime Connections +## Logging realtime connections Realtime doesn't log new WebSocket connections or Channel joins by default. Enable connection logging per client by including an `info` `log_level` parameter when instantiating the Supabase client. @@ -190,7 +190,7 @@ You can access the following logs from the **Sources** drop-down: The Logs Explorer uses BigQuery and supports all [available SQL functions and operators](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators). -### Timestamp Display and Behavior +### Timestamp display and behavior Each log entry is stored with a `timestamp` as a `TIMESTAMP` data type. Use the appropriate [timestamp function](https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions#timestamp) to utilize the `timestamp` field in a query. @@ -206,7 +206,7 @@ select datetime(timestamp) from .... -- 2022-09-27T09:17:10.439Z ``` -### Unnesting Arrays +### Unnesting arrays Each log event stores metadata an array of objects with multiple levels, and can be seen by selecting single log events in the Logs Explorer. To query arrays, use `unnest()` on each array field and add it to the query as a join. This allows you to reference the nested objects with an alias and select their individual fields. @@ -243,11 +243,11 @@ This allows you to select the `method` and `cf_ipcountry` columns. In JS dot not - `metadata[].request[].method` - `metadata[].request[].headers[].cf_ipcountry` -### LIMIT and Result Row Limitations +### LIMIT and result row limitations The Logs Explorer has a maximum of 1000 rows per run. Use `LIMIT` to optimize your queries by reducing the number of rows returned further. -### Best Practices +### Best practices 1. Include a filter over **timestamp** @@ -278,7 +278,7 @@ from cross join unnest(m.request) as r; ``` -### Examples and Templates +### Examples and templates The Logs Explorer includes **Templates** (available in the Templates tab or the dropdown in the Query tab) to help you get started. @@ -294,7 +294,7 @@ from where h.x_real_ip is not null and r.method = "GET"; ``` -### Log Source Reference +### Log source reference Refer to the full field reference for each available source below. Do note that in order to access each nested key, you would need to perform the [necessary unnesting joins](#unnesting-arrays) diff --git a/apps/docs/pages/guides/platform/maturity-model.mdx b/apps/docs/pages/guides/platform/maturity-model.mdx index b86279f3953..525a19619be 100644 --- a/apps/docs/pages/guides/platform/maturity-model.mdx +++ b/apps/docs/pages/guides/platform/maturity-model.mdx @@ -22,7 +22,7 @@ Resources: - [Managing access on the Dashboard](/docs/guides/platform/access-control) - [PGAudit for Postgres](/docs/guides/database/extensions/pgaudit) -## In Production +## In production Once your application is live, you should never change your database using the Dashboard. Supabase provides various [access levels](https://supabase.com/docs/guides/platform/access-control) for the Dashboard that can help enforce this. Some other important things to consider at this point include: diff --git a/apps/docs/pages/guides/platform/migrating-and-upgrading-projects.mdx b/apps/docs/pages/guides/platform/migrating-and-upgrading-projects.mdx index 5da5d2b54af..f67dcbad761 100644 --- a/apps/docs/pages/guides/platform/migrating-and-upgrading-projects.mdx +++ b/apps/docs/pages/guides/platform/migrating-and-upgrading-projects.mdx @@ -14,7 +14,7 @@ In some cases, access to new features require upgrading or migrating your Supaba There are a few methods available to upgrade your project. -### pg_upgrade +### `pg_upgrade` @@ -31,7 +31,7 @@ Additionally, if a pg_upgrade upgrade should fail, your original DB would be bro As a rough rule of thumb, pg_upgrade operates at ~100mbps (when executing an upgrade on your data). Using the size of your database, you can use this metric to derive an approximate sense of the downtime window necessary for the upgrade. During this window, you should plan for your DB and associated services to be unavailable. -### Pause + Restore +### Pause + restore @@ -50,7 +50,7 @@ Note that a pause + restore upgrade involves tearing down your project's resourc Regardless of the upgrade method, a few caveats apply: -#### Logical Replication +#### Logical replication If you are using logical replication, the replication slots will not be preserved by the upgrade process. You will need to manually recreate them after the upgrade with the method `pg_create_logical_replication_slot`. Refer to the Postgres docs on [Replication Management Functions](https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-REPLICATION) for more details about the method. @@ -65,7 +65,7 @@ Breaking changes are generally only present in major version upgrades of Postgre If you are upgrading from a significantly older version, you will need to consider the release notes for any intermediary releases as well. -#### Disk Sizing +#### Disk sizing When upgrading, the Supabase platform will "right-size" your disk based on the current size of the database. For example, if your database is 100GB in size, and you have a 200GB disk, the upgrade will reduce the disk size to 120GB (1.2x the size of your database). @@ -203,7 +203,7 @@ supabase db diff --linked --schema auth,storage > changes.sql Replication for Realtime is disabled for all tables in your new project. On the [Replication](https://supabase.com/dashboard/project/_/database/replication) page in the Dashboard, select your new project and enable replication for tables that were enabled in your old project. -### Migrate Storage objects +### Migrate storage objects The new project has the old project's Storage buckets, but the Storage objects need to be migrated manually. Use this script to move storage objects from one project to another. diff --git a/apps/docs/pages/guides/platform/multi-factor-authentication.mdx b/apps/docs/pages/guides/platform/multi-factor-authentication.mdx index 50222529ce6..68eca8f210c 100644 --- a/apps/docs/pages/guides/platform/multi-factor-authentication.mdx +++ b/apps/docs/pages/guides/platform/multi-factor-authentication.mdx @@ -15,7 +15,7 @@ This guide is for adding MFA to your Supabase user account. If you want to enabl Multi-factor authentication (MFA) adds an additional layer of security to your user account, by requiring a second factor to verify your user identity. Supabase allows users to enable MFA on their account and set it as a requirement for subsequent logins. -## Supported Authentication Factors +## Supported authentication factors Currently, Supabase supports adding a unique time-based one-time password (TOTP) to your user account as an additional security factor. You can manage your TOTP factor using apps such as 1Password, Authy, Google Authenticator or Apple's Keychain. diff --git a/apps/docs/pages/guides/platform/oauth-apps/build-a-supabase-integration.mdx b/apps/docs/pages/guides/platform/oauth-apps/build-a-supabase-integration.mdx index 75235a2259f..6cbd24a94b5 100644 --- a/apps/docs/pages/guides/platform/oauth-apps/build-a-supabase-integration.mdx +++ b/apps/docs/pages/guides/platform/oauth-apps/build-a-supabase-integration.mdx @@ -10,7 +10,7 @@ export const meta = { Using OAuth2.0 you can retrieve an access and refresh token that grant your application full access to the [Management API](https://supabase.com/docs/reference/api/introduction) on behalf of the user. -## Create an OAuth App +## Create an OAuth app 1. In your organization's settings, navigate to the [**OAuth Apps**](/dashboard/org/_/apps) tab. 2. In the upper-right section of the page, click **Add application**. @@ -124,7 +124,7 @@ import { SupabaseManagementAPI } from 'supabase-management-js' const client = new SupabaseManagementAPI({ accessToken: '' }) ``` -## Integration Recommendations +## Integration recommendations There are a couple common patterns you can consider adding to your integration that can facilitate a great user experience. diff --git a/apps/docs/pages/guides/platform/oauth-apps/oauth-scopes.mdx b/apps/docs/pages/guides/platform/oauth-apps/oauth-scopes.mdx index 2dba7d4b96b..05eefdb29ed 100644 --- a/apps/docs/pages/guides/platform/oauth-apps/oauth-scopes.mdx +++ b/apps/docs/pages/guides/platform/oauth-apps/oauth-scopes.mdx @@ -17,7 +17,7 @@ Scopes restrict access to the specific [Supabase Management API endpoints](/docs Scopes are set when you [create an OAuth app](/docs/guides/platform/oauth-apps/build-a-supabase-integration#create-an-oauth-app) in the Supabase Dashboard. -## Available Scopes +## Available scopes | Name | Type | Description | | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/apps/docs/pages/guides/platform/org-based-billing.mdx b/apps/docs/pages/guides/platform/org-based-billing.mdx index 8842db98e5e..9bd3363dd56 100644 --- a/apps/docs/pages/guides/platform/org-based-billing.mdx +++ b/apps/docs/pages/guides/platform/org-based-billing.mdx @@ -29,23 +29,23 @@ The Supabase Platform has "organizations" and "projects". An organization may co Organization-based Billing was introduced on September 4th 2023. We are migrating all projects to this new structure. Read the [announcement](https://supabase.com/blog/organization-based-billing) for more context. -### Legacy Billing (Project-based) +### Legacy billing (project-based) If your organization was created before September 4th 2023, each project had an individual subscription, a plan and addons. ![Billing Before](/docs/img/guides/platform/org-billing-before.png) -### Current Billing (Organization-based) +### Current billing (organization-based) With Organization-based Billing, each organization only has a single subscription with a single plan (Free, Pro, Team or Enterprise). Project addons such as [Compute](/docs/guides/platform/compute-add-ons), [Custom Domains](/docs/guides/platform/custom-domains) and [PITR](/docs/guides/platform/backups#point-in-time-recovery) are still configured per project and are added to your organization subscription. ![Billing: After](/docs/img/guides/platform/org-billing-after.png) -## Unified Egress +## Unified egress Each organization receives a total egress quota (eg. 250GB on the Pro plan) which can be used for anything - Storage, Realtime, Auth, Functions or Database. -### Included Egress Quota +### Included egress quota Each plan includes a quota for unified egress, which is applied to your entire organization. @@ -56,7 +56,7 @@ Each plan includes a quota for unified egress, which is applied to your entire o | Team | 250 GB | $0.09 per GB | | Enterprise | Custom | Custom | -### Egress Dashboards +### Egress dashboards You can see a breakdown of the different types of egress on your [organization usage page](https://supabase.com/dashboard/org/_/usage). @@ -70,17 +70,17 @@ You can see a breakdown of the different types of egress on your [organization u /> -### Legacy Egress +### Legacy egress Under the old system, you had different quotas for each service. i.e. on the Pro plan, you had 50GB of database egress and 200GB of storage egress included. If you weren't using storage, you'd miss out on the included egress. The new system provides you more egress in every scenario. -## Quotas and Features +## Quotas and features Quotas and features are applied to your entire organization, independent of how many projects you launch within that organization. For billing purposes, we sum the usage across all projects in a monthly invoice. Upgrading your organization to a paid plan means that you unlock the benefits of the paid plan for **all** projects within that organization - for example, no projects in your "Pro" organization will be paused. See [pricing page](https://supabase.com/pricing) for details on all plans. -### Usage Items +### Usage items | Metric | Free | Pro/Team | Enterprise | | -------------------------- | ------------------------ | ------------------------------------------- | ---------- | @@ -133,7 +133,7 @@ With Legacy Billing, when you upgraded the [Compute Add-On](/docs/guides/platfor Supabase provides two "Free organizations". Each organization can run a `Starter` instance for free. This is a great way to get started with Supabase and try out the platform. -### Compute Credits +### Compute credits Paid plans come with $10 of Compute Credits to cover one Starter instance or parts of any other [Compute Add-On](/docs/guides/platform/compute-add-ons). @@ -145,7 +145,7 @@ Additionally, Compute Credits reset every month and do not accumulate, in case y With Legacy Billing, you used to pay $25 for every single Pro plan project in an organization. Previously, we gave you a free “Starter” instance on paid plans - we're now giving you $10 in Compute Credits instead, to cover the first instance. You end up not paying extra for the first project inside your paid plan organization - just like before. In case you add a Compute Add-On to your first project, you also end up paying exactly the same as before. -## Legacy vs Organization-based Billing +## Legacy vs organization-based billing If you are using Legacy Billing and have a single project in your organization, there is no change in pricing or quota. Here are some examples on how the new Organization-based Billing migration affects you. diff --git a/apps/docs/pages/guides/platform/performance.mdx b/apps/docs/pages/guides/platform/performance.mdx index 9011c1ae4cd..9a17faed208 100644 --- a/apps/docs/pages/guides/platform/performance.mdx +++ b/apps/docs/pages/guides/platform/performance.mdx @@ -8,7 +8,7 @@ export const meta = { The Supabase platform automatically optimizes your Postgres database to take advantage of the compute resources of the plan your project is on. However, these optimizations are based on assumptions about the type of workflow the project is being utilized for, and it is likely that better results can be obtained by tuning the database for your particular workflow. -## Examining Query Performance +## Examining query performance Unoptimized queries are a major cause of poor database performance. The techniques on this page can help you identify and understand queries that take the most time and resources from your database. @@ -24,7 +24,7 @@ Database performance is a large topic and many factors can contribute. Some of t Thankfully there are solutions to all these issues, which we will cover in the following sections. -### Postgres Cumulative Statistics system +### Postgres cumulative statistics system Postgres collects data about its own operations using the [cumulative statistics system](https://www.postgresql.org/docs/current/monitoring-stats.html). In addition to this, every Supabase project has the [pg_stat_statements extension](/docs/guides/database/extensions/pg_stat_statements) enabled by default. This extension records query execution performance details and is the best way to find inefficient queries. This information can be combined with the Postgres query plan analyzer to develop more efficient queries. diff --git a/apps/docs/pages/guides/platform/read-replicas.mdx b/apps/docs/pages/guides/platform/read-replicas.mdx index 6e8b7fe9505..5825b38a676 100644 --- a/apps/docs/pages/guides/platform/read-replicas.mdx +++ b/apps/docs/pages/guides/platform/read-replicas.mdx @@ -45,7 +45,7 @@ To address this, Postgres does provide tunable configuration, like `wal_keep_siz In this replication method, the primary continuously buffers WAL changes to a local file and then sends the file to the read replica. If multiple read replicas are present, files could also be sent to an intermediary location accessible by all. The read replica then reads the WAL files and applies those changes. There is higher replication lag than streaming replication since the primary buffers the changes locally first. It also means there is a small chance that WAL changes do not reach read replicas if the primary goes down before the file is transferred. In these cases, if the primary fails a replica using streaming replication would (in most cases) be more up-to-date than a replica using file-based log shipping. -### File-based log shipping 🤝 Streaming replication +### File-based log shipping 🤝 streaming replication
-### Listening to Broadcast messages +### Listening to broadcast messages You can provide a callback for the `broadcast` channel to receive message. In this example we will receive any `broadcast` messages in `room-1`: @@ -134,7 +134,7 @@ You can provide a callback for the `broadcast` channel to receive message. In th -### Sending Broadcast messages +### Sending broadcast messages -## Quotas by Plan +## Quotas by plan | | Free | Pro | Pro (no spend cap) | Team | Enterprise | | -------------------------------------------------------------------------------------- | ----- | ----- | ------------------ | ------ | ---------- | @@ -34,7 +34,7 @@ Beyond the Free and Pro plan you can customize your quotas by [contacting suppor Some basic WebSocket message throttling is implemented client-side. See the [Throttling](/docs/guides/realtime/guides/client-side-throttling) guide for more details. -## Quota Errors +## Quota errors When you exceed a quota, errors will appear in the backend logs and client-side messages in the WebSocket connection. @@ -64,7 +64,7 @@ Too many Channel joins per second. Clients will be disconnected if your project is generating too many messages per second. `supabase-js` will reconnect automatically when the message throughput decreases below your plan quota. An `event` is a WebSocket message delivered to, or sent from a client. -## Postgres Changes Payload Quota +## Postgres changes payload quota When this quota is reached, the `new` and `old` record payloads only include the fields with a value size of less than or equal to 64 bytes. diff --git a/apps/docs/pages/guides/resources.mdx b/apps/docs/pages/guides/resources.mdx index 4a5814d2bd5..6b239c60396 100644 --- a/apps/docs/pages/guides/resources.mdx +++ b/apps/docs/pages/guides/resources.mdx @@ -63,7 +63,7 @@ export const meta = {
-### Postgres Resources +### Postgres resources
diff --git a/apps/docs/pages/guides/resources/examples.mdx b/apps/docs/pages/guides/resources/examples.mdx index 26abd28ce32..f72414c1358 100644 --- a/apps/docs/pages/guides/resources/examples.mdx +++ b/apps/docs/pages/guides/resources/examples.mdx @@ -13,7 +13,7 @@ We have a [set of examples](https://github.com/supabase/supabase/tree/master/exa ## Featured -## Build a Twitter Clone with the Next.js App Router and Supabase +## Build a Twitter clone with the Next.js App Router and Supabase By [Jon Meyers](https://twitter.com/jonmeyers_io) @@ -25,7 +25,7 @@ By [Jon Meyers](https://twitter.com/jonmeyers_io) /> -### Supabase Crash Course +### Supabase crash course By [Traversy Media](https://www.youtube.com/watch?v=7uKQBl9uZ00). @@ -38,7 +38,7 @@ By [Traversy Media](https://www.youtube.com/watch?v=7uKQBl9uZ00). >
-### Build an App With Supabase and Next.js +### Build an app with Supabase and Next.js By [@jlengstorf](https://twitter.com/jlengstorf) and [@jonmeyers_io](https://twitter.com/jonmeyers_io). @@ -51,7 +51,7 @@ By [@jlengstorf](https://twitter.com/jlengstorf) and [@jonmeyers_io](https://twi > -### Is Supabase Legit +### Is Supabase legit By [Fireship](https://www.youtube.com/watch?v=WiwfiVdfRIc). @@ -64,9 +64,9 @@ By [Fireship](https://www.youtube.com/watch?v=WiwfiVdfRIc). > -## Official Examples +## Official examples -### Todo List +### Todo list Build a basic Todo List with Supabase and your favorite frontend framework: @@ -153,7 +153,7 @@ Build a basic Todo List with Supabase and your favorite frontend framework: - Supabase Auth with React Native + Next.js (Monorepo) [Github](https://github.com/mateoguzmana/react-native-next-supabase-auth-monorepo) - Supabase Auth with Nuxt3 [Github](https://github.com/zackha/supaAuth) -### Blog Posts +### Blog posts - Realtime Subscriptions using Vue + Supabase. [Blog](https://dev.to/ftonato/realtime-subscriptions-using-vue-supabase-1e11) - Creating a microblog using Vue + Supabase. [Blog](https://dev.to/ftonato/creating-a-microblog-using-vue-supabase-31p) diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/amazon-rds.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/amazon-rds.mdx index 3475d54251b..e9fa41f2b82 100644 --- a/apps/docs/pages/guides/resources/migrating-to-supabase/amazon-rds.mdx +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/amazon-rds.mdx @@ -21,7 +21,7 @@ Supabase's core is Postgres, enabling the use of row-level security and providin ![Copying RDS credentials from AWS Management Console](/docs/img/guides/resources/migrating-to-supabase/amazon-rds/amazon-rds_credentials.png) -## Retrieve your Supabase Host [#retrieve-supabase-host] +## Retrieve your Supabase host [#retrieve-supabase-host] 1. If you're new to Supabase, [create a project](https://supabase.com/dashboard). 1. Go to the [Database settings](https://supabase.com/dashboard/project/_/settings/database) for your project in the Supabase Dashboard. diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/heroku.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/heroku.mdx index 1f498b78ea7..dc96741d70a 100644 --- a/apps/docs/pages/guides/resources/migrating-to-supabase/heroku.mdx +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/heroku.mdx @@ -34,7 +34,7 @@ Alternatively, use the [Heroku to Supabase migration tool](https://migrate.supab - User (`$HEROKU_USER`) - Password (`$HEROKU_PASSWORD`) -## Retrieve your Supabase Host [#retrieve-supabase-host] +## Retrieve your Supabase host [#retrieve-supabase-host] 1. If you're new to Supabase, [create a project](https://supabase.com/dashboard). 1. Go to the [Database settings](https://supabase.com/dashboard/project/_/settings/database) for your project in the Supabase Dashboard. diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/mssql.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/mssql.mdx index 48434c16127..f954b12a454 100644 --- a/apps/docs/pages/guides/resources/migrating-to-supabase/mssql.mdx +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/mssql.mdx @@ -7,7 +7,7 @@ export const meta = { This guide aims to demonstrate the process of transferring your Microsoft SQL Server database to Supabase's PostgreSQL database. Supabase is a powerful and open-source platform offering a wide range of backend features, including a PostgreSQL database, authentication, instant APIs, edge functions, real-time subscriptions, and storage. Migrating your MSSQL database to Supabase's Postgres enables you to leverage Postgres's capabilities and access all the features you need for your project. -## Retrieve Your MSSQL Database Credentials +## Retrieve your MSSQL database credentials Before you begin the migration, you need to collect essential information about your MSSQL database. Follow these steps: @@ -18,7 +18,7 @@ Before you begin the migration, you need to collect essential information about - Username - Password -## Retrieve your Supabase Host [#retrieve-supabase-host] +## Retrieve your Supabase host [#retrieve-supabase-host] 1. If you're new to Supabase, [create a project](https://supabase.com/dashboard). 1. Go to the [Database settings](https://supabase.com/dashboard/project/_/settings/database) for your project in the Supabase Dashboard. diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/mysql.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/mysql.mdx index 5020758a8a8..6df1e241d45 100644 --- a/apps/docs/pages/guides/resources/migrating-to-supabase/mysql.mdx +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/mysql.mdx @@ -7,7 +7,7 @@ export const meta = { This guide aims to exhibit the process of transferring your MySQL database to Supabase's Postgres database. Supabase is a robust and open-source platform offering a wide range of backend features, including a PostgreSQL database, authentication, instant APIs, edge functions, real-time subscriptions, and storage. Migrating your MySQL database to Supabase's PostgreSQL enables you to leverage PostgreSQL's capabilities and access all the features you need for your project. -## Retrieve Your MySQL Database Credentials +## Retrieve your mySQL database credentials Before you begin the migration, you need to collect essential information about your MySQL database. Follow these steps: @@ -19,7 +19,7 @@ Before you begin the migration, you need to collect essential information about - Username - Password -## Retrieve your Supabase Host [#retrieve-supabase-host] +## Retrieve your Supabase host [#retrieve-supabase-host] 1. If you're new to Supabase, [create a project](https://supabase.com/dashboard). 1. Go to the [Database settings](https://supabase.com/dashboard/project/_/settings/database) for your project in the Supabase Dashboard. diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/postgres.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/postgres.mdx index 1387991a318..4ada6ef3f15 100644 --- a/apps/docs/pages/guides/resources/migrating-to-supabase/postgres.mdx +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/postgres.mdx @@ -21,7 +21,7 @@ Example: %env PSQL_COMMAND=PGPASSWORD=RgaMDfTS_password_FTPa7 psql -h dpg-a_server_in.oregon-postgres.provider.com -U my_db_pxl0_user my_db_pxl0 ``` -## Retrieve your Supabase Host [#retrieve-supabase-host] +## Retrieve your Supabase host [#retrieve-supabase-host] 1. If you're new to Supabase, [create a project](https://supabase.com/dashboard). 1. Go to the [Database settings](https://supabase.com/dashboard/project/_/settings/database) for your project in the Supabase Dashboard. diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx index b5e09b70aa9..f8178141fc5 100644 --- a/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx @@ -25,7 +25,7 @@ Example: %env PSQL_COMMAND=PGPASSWORD=RgaMDfTS_password_FTPa7 psql -h dpg-a_server_in.oregon-postgres.render.com -U my_db_pxl0_user my_db_pxl0 ``` -## Retrieve your Supabase Host [#retrieve-supabase-host] +## Retrieve your Supabase host [#retrieve-supabase-host] 1. If you're new to Supabase, [create a project](https://supabase.com/dashboard). 1. Go to the [Database settings](https://supabase.com/dashboard/project/_/settings/database) for your project in the Supabase Dashboard. diff --git a/apps/docs/pages/guides/self-hosting.mdx b/apps/docs/pages/guides/self-hosting.mdx index 083ab354ad4..45175875098 100644 --- a/apps/docs/pages/guides/self-hosting.mdx +++ b/apps/docs/pages/guides/self-hosting.mdx @@ -8,7 +8,7 @@ export const meta = { There are several ways to host Supabase on your own computer, server, or cloud. -## Officially Supported +## Officially supported
{official.map((x) => ( @@ -36,7 +36,7 @@ export const official = [ Supabase is also a hosted platform. If you want to get started for free, visit [supabase.com/dashboard](https://supabase.com/dashboard). -## Community Supported +## Community supported There are several community-driven projects to help you deploy Supabase. We encourage you to try them out and contribute back to the community. @@ -73,7 +73,7 @@ export const community = [ }, ] -## Third-party Guides +## Third-party guides The following third-party providers have shown consistent support for the self-hosted version of Supabase:. diff --git a/apps/docs/pages/guides/self-hosting/docker.mdx b/apps/docs/pages/guides/self-hosting/docker.mdx index 51fd4f942ad..652e127f3c2 100644 --- a/apps/docs/pages/guides/self-hosting/docker.mdx +++ b/apps/docs/pages/guides/self-hosting/docker.mdx @@ -45,7 +45,7 @@ Please [secure your services](#securing-your-services) as soon as possible using For security reasons, we "pin" the versions of each service in the docker-compose file (these versions are updated ~monthly). If you want to update any services immediately, you can do so by updating the version number in the docker compose file and then running `docker compose pull`. You can find all the latest docker images in the [Supabase Docker Hub](https://hub.docker.com/u/supabase). -### Accessing Supabase Studio +### Accessing Supabase dashboard You can access the Supabase Dashboard through the API gateway on port `8000`. For example: `http://:8000`, or [localhost:8000](http://localhost:8000) if you are running Docker locally. @@ -86,7 +86,7 @@ The default password is `your-super-secret-and-long-postgres-password`. You shou While we provided you with some example secrets for getting started, you should NEVER deploy your Supabase setup using the defaults we have provided. Please follow all of the steps in this section to ensure you have a secure setup, and then [restart all services](#restarting-all-services) to pick up the changes. -### Generate API Keys +### Generate API keys Create a new `JWT_SECRET` and store it securely. @@ -94,7 +94,7 @@ We can use your JWT Secret to generate new `anon` and `service` API keys using t -### Update API Keys +### Update API keys Replace the values in the `.env` file: @@ -103,7 +103,7 @@ Replace the values in the `.env` file: You will need to [restart](#restarting-all-services) the services for the changes to take effect. -### Update Secrets +### Update secrets Update the `.env` file with your own secrets. In particular, these are required: @@ -114,7 +114,7 @@ Update the `.env` file with your own secrets. In particular, these are required: You will need to [restart](#restarting-all-services) the services for the changes to take effect. -### Dashboard Authentication +### Dashboard authentication The dashboard is protected with Basic Authentication. The default user and password MUST be updated before using Supabase in production. Update the following values in the `.env` file: diff --git a/apps/docs/pages/guides/storage/buckets/fundamentals.mdx b/apps/docs/pages/guides/storage/buckets/fundamentals.mdx index ec97509fafe..be6447f45c4 100644 --- a/apps/docs/pages/guides/storage/buckets/fundamentals.mdx +++ b/apps/docs/pages/guides/storage/buckets/fundamentals.mdx @@ -9,11 +9,11 @@ export const meta = { Buckets allow you to keep your files organized and determines the [Access Model](#access-model) for your assets. [Upload restrictions](/docs/guides/storage/buckets/creating-buckets#restricting-uploads) like max file size and allowed content types are also defined at the bucket level. -## Access Model +## Access model There are 2 access models for buckets, **public** and **private** buckets. -### Private Buckets +### Private buckets When a bucket is set to **Private** all operations are subject to access control via [RLS policies](/docs/guides/storage/security/access-control). This also applies when downloading assets. Buckets are private by default. @@ -22,18 +22,18 @@ The only ways to download assets within a private bucket is to: - Use the [download method](/docs/reference/javascript/storage-from-download) by providing a authorization header containing your user's JWT. The RLS policy you create on the `storage.objects` table will use this user to determine if they have access. - Create a signed URL with the [createSignedUrl method](/docs/reference/javascript/storage-from-createsignedurl) that can be accessed for a limited time. -#### Example Use Cases: +#### Example use cases: - Uploading users' sensitive documents - Securing private assets by using RLS to set up fine-grain access controls -### Public Buckets +### Public buckets When a bucket is designated as 'Public,' it effectively bypasses access controls for both retrieving and serving files within the bucket. This means that anyone who possesses the asset URL can readily access the file. Access control is still enforced for other types of operations including uploading, deleting, moving, and copying. -#### Example Use Cases: +#### Example use cases: - User profile pictures - User public media diff --git a/apps/docs/pages/guides/storage/cdn/fundamentals.mdx b/apps/docs/pages/guides/storage/cdn/fundamentals.mdx index 010d7b161bc..f9aea721fa9 100644 --- a/apps/docs/pages/guides/storage/cdn/fundamentals.mdx +++ b/apps/docs/pages/guides/storage/cdn/fundamentals.mdx @@ -29,7 +29,7 @@ Note that CDNs might still evict your object from their cache if it has not been The cache status of a particular request is sent in the `cf-cache-status` header. A cache status of `MISS` indicates that the CDN node did not have the object in its cache and had to ping the origin to get it. A cache status of `HIT` indicates that the object was sent directly from the CDN. -### Public vs Private Buckets +### Public vs private buckets Objects in public buckets do not require any authorization to access objects. This leads to a better cache hit rate compared to private buckets. diff --git a/apps/docs/pages/guides/storage/cdn/smart-cdn.mdx b/apps/docs/pages/guides/storage/cdn/smart-cdn.mdx index 9ec314f1b63..2ca47c9d7b2 100644 --- a/apps/docs/pages/guides/storage/cdn/smart-cdn.mdx +++ b/apps/docs/pages/guides/storage/cdn/smart-cdn.mdx @@ -25,7 +25,7 @@ When a file is updated or deleted, the CDN cache is automatically invalidated to When an asset is invalidated at the CDN level, browsers may not update its cache. This is where cache eviction comes into play. -## Cache Eviction +## Cache eviction Even when an asset is marked as invalidated at the CDN level, browsers may not refresh their cache for that asset. @@ -33,7 +33,7 @@ If you have assets that undergo frequent updates, it is advisable to upload the If you anticipate that your asset might be deleted, it's advisable to set a shorter browser Time-to-Live (TTL) value using the `cacheControl` option. The default TTL is typically set to 1 hour, which is generally a reasonable default value. -## Bypassing Cache +## Bypassing cache If you need to ensure assets refresh directly from the origin server and bypass the cache, you can achieve this by adding a unique query string to the URL. diff --git a/apps/docs/pages/guides/storage/debugging/error-codes.mdx b/apps/docs/pages/guides/storage/debugging/error-codes.mdx index 39406cb2af7..4625ce58818 100644 --- a/apps/docs/pages/guides/storage/debugging/error-codes.mdx +++ b/apps/docs/pages/guides/storage/debugging/error-codes.mdx @@ -33,7 +33,7 @@ You don't have permission to action this request - Add RLS policy to grant permission. See our [Access Control docs](/docs/guides/storage/uploads/access-control) for more information. - Ensure you include the user `Authorization` header -## 429 Too many requests +## 429 too many requests This problem typically arises when a large number of clients are concurrently interacting with the Storage service, and the pooler has reached its `max_clients` limit. diff --git a/apps/docs/pages/guides/storage/debugging/logs.mdx b/apps/docs/pages/guides/storage/debugging/logs.mdx index 4165f9e0529..4202bd22355 100644 --- a/apps/docs/pages/guides/storage/debugging/logs.mdx +++ b/apps/docs/pages/guides/storage/debugging/logs.mdx @@ -9,7 +9,7 @@ export const meta = { Accessing the [Storage Logs](https://supabase.green/dashboard/project/__/logs/explorer?q=select+id%2C+storage_logs.timestamp%2C+event_message+from+storage_logs%0A++%0A++order+by+timestamp+desc%0A++limit+100%0A++) allows you to examine all incoming request logs to your Storage service. You can also filter logs and delve into specific aspects of your requests. -### Common Log Queries +### Common log queries #### Filter by status 5XX error @@ -37,7 +37,7 @@ select id, storage_logs.timestamp, event_message, r.statusCode, e.message as err limit 100 ``` -#### Filter by Method +#### Filter by method ```sql select id, storage_logs.timestamp, event_message, r.method @@ -50,7 +50,7 @@ order by timestamp desc limit 100; ``` -#### Filter by IP Address +#### Filter by IP address ```sql select id, storage_logs.timestamp, event_message, r.remoteAddress diff --git a/apps/docs/pages/guides/storage/production/scaling.mdx b/apps/docs/pages/guides/storage/production/scaling.mdx index 8c4beb74e04..35e760fc98f 100644 --- a/apps/docs/pages/guides/storage/production/scaling.mdx +++ b/apps/docs/pages/guides/storage/production/scaling.mdx @@ -14,7 +14,7 @@ Here are some optimizations that you can consider to improve performance and red If your project has high egress, these optimizations can help reducing it. -#### Resize Images +#### Resize images Images typically make up most of your egress. By keeping them as small as possible, you can cut down on egress and boost your application's performance. You can take advantage of our [Image Transformation](/docs/guides/storage/serving/image-transformations) service to optimize any image on the fly. @@ -26,7 +26,7 @@ Using the browser cache can effectively lower your egress since the asset remain You have the option to set a maximum upload size for your bucket. Doing this can prevent users from uploading and then downloading excessively large files. You can control the maximum file size by configuring this option at the [bucket level](/docs/guides/storage/buckets/creating-buckets). -## Optimize Listing Objects +## Optimize listing objects Once you have a substantial number of objects, you might observe that the `supabase.storage.list()` method starts to slow down. This occurs because the endpoint is quite generic and attempts to retrieve both folders and objects in a single query. While this approach is very useful for building features like the Storage viewer on the Supabase dashboard, it can impact performance with a large number of objects. diff --git a/apps/docs/pages/guides/storage/schema/design.mdx b/apps/docs/pages/guides/storage/schema/design.mdx index 86cdedf4c5a..5e1acef5493 100644 --- a/apps/docs/pages/guides/storage/schema/design.mdx +++ b/apps/docs/pages/guides/storage/schema/design.mdx @@ -23,7 +23,7 @@ Here is the schema that represents the Storage service: You have the option to query this table directly to retrieve information about your files in Storage without the need to go through our API. -## Modifying the Schema +## Modifying the schema We strongly recommend refraining from making any alterations to the `storage` schema and treating it as read-only. This approach is important because any modifications to the schema on your end could potentially clash with our future updates, leading to downtime. diff --git a/apps/docs/pages/guides/storage/security/access-control.mdx b/apps/docs/pages/guides/storage/security/access-control.mdx index ccaa9aa2712..6dc1219eb21 100644 --- a/apps/docs/pages/guides/storage/security/access-control.mdx +++ b/apps/docs/pages/guides/storage/security/access-control.mdx @@ -12,7 +12,7 @@ Supabase Storage is designed to work perfectly with Postgres [Row Level Security You can use RLS to create [Security Access Policies](https://www.postgresql.org/docs/current/sql-createpolicy.html) that are incredibly powerful and flexible, allowing you to restrict access based on your business needs. -## Access Policies +## Access policies By default Storage does not allow any uploads to buckets without RLS policies. You selectively allow certain operations by creating RLS policies on the `storage.objects` table. @@ -28,7 +28,7 @@ For example, the only RLS policy required for [uploading](/docs/reference/javasc To allow overwriting files using the `upsert` functionality you will need to additionally grant `SELECT` and `UPDATE` permissions. -## Policy Examples +## Policy examples An easy way to get started would be to create RLS policies for `SELECT`, `INSERT`, `UPDATE`, `DELETE` operations and restrict the policies to meet your security requirements. For example, one can start with the following `INSERT` policy: diff --git a/apps/docs/pages/guides/storage/serving/downloads.mdx b/apps/docs/pages/guides/storage/serving/downloads.mdx index 6d729577a84..a603fbd8259 100644 --- a/apps/docs/pages/guides/storage/serving/downloads.mdx +++ b/apps/docs/pages/guides/storage/serving/downloads.mdx @@ -9,7 +9,7 @@ export const meta = { tocVideo: 'dLqSmxX3r7I', } -## Public Buckets +## Public buckets As mentioned in the [Buckets Fundamentals](/docs/guides/storage/buckets/fundamentals) all files uploaded in a public bucket are publicly accessible and benefit a high CDN cache HIT ratio. diff --git a/apps/docs/pages/guides/storage/serving/image-transformations.mdx b/apps/docs/pages/guides/storage/serving/image-transformations.mdx index 8bbfb802f28..e247e421f68 100644 --- a/apps/docs/pages/guides/storage/serving/image-transformations.mdx +++ b/apps/docs/pages/guides/storage/serving/image-transformations.mdx @@ -131,7 +131,7 @@ supabase.storage.from("bucket").downloadAuthenticatedTo("image.jpg", file) { -## Automatic Image Optimization (WebP) +## Automatic image optimization (WebP) When using the image transformation API, Storage will automatically find the best format supported by the client and return that to the client, without any code change. For instance, if you use Chrome when viewing a jpeg image and using transformation options, you'll see that images are automatically optimized as `webp` images. @@ -186,7 +186,7 @@ supabase.storage.from("bucket").downloadAuthenticatedTo("image.jpg", file) { -## Next.js Loader +## Next.js loader You can use Supabase Image Transformation to optimize your Next.js images using a custom [Loader](https://nextjs.org/docs/api-reference/next/image#loader-configuration). @@ -331,7 +331,7 @@ supabase.storage.from("bucket").downloadAuthenticatedTo("image.jpg", file) { - The image size cannot exceed 25MB. - The image resolution cannot exceed 50MP. -### Supported Image Formats +### Supported image formats | Format | Extension | Source | Result | | ------ | --------- | ------ | ------ | @@ -346,11 +346,11 @@ supabase.storage.from("bucket").downloadAuthenticatedTo("image.jpg", file) { | BMP | `bmp` | ☑️ | ☑️ | | TIFF | `tiff` | ☑️ | ☑️ | -## Self Hosting +## Self hosting Our solution to image resizing and optimization can be self-hosted as with any other Supabase product. Under the hood we use [Imgproxy](https://imgproxy.net/) -#### Imgproxy Configuration: +#### Imgproxy configuration: Simply deploy an imgproxy container with the following configuration: @@ -364,7 +364,7 @@ imgproxy: Note: make sure that this service can only be reachable within an internal network and not exposed to the public internet -#### Storage API Configuration: +#### Storage API configuration: Once [Imgproxy](https://imgproxy.net/) is deployed we need to configure a couple of environment variables in your self-hosted [storage-api](https://github.com/supabase/storage-api) service as follows: diff --git a/apps/docs/pages/guides/storage/uploads/file-limits.mdx b/apps/docs/pages/guides/storage/uploads/file-limits.mdx index eccc118770b..223203ef65e 100644 --- a/apps/docs/pages/guides/storage/uploads/file-limits.mdx +++ b/apps/docs/pages/guides/storage/uploads/file-limits.mdx @@ -9,7 +9,7 @@ export const meta = { You can customize the Max file size for file uploads. -## Global File Size +## Global file size You can set the max file size across all your buckets by setting this global value in the dashboard [here](https://supabase.com/dashboard/project/_/settings/storage). @@ -29,7 +29,7 @@ You can additionally specify the max file size on a per [bucket level](/docs/gui It is a good practice to have the global limit set to the highest possible file size that your application accepts, and apply per bucket limits. -## Per Bucket Restrictions +## Per bucket restrictions You can have different restrictions on a per bucket level. You are able to restrict the file types (eg. `pdf`, `images`, `videos`) along with the max file size which should be lower than the global limit. diff --git a/apps/docs/pages/guides/storage/uploads/resumable-uploads.mdx b/apps/docs/pages/guides/storage/uploads/resumable-uploads.mdx index f10d6371b2c..4a8faed56d2 100644 --- a/apps/docs/pages/guides/storage/uploads/resumable-uploads.mdx +++ b/apps/docs/pages/guides/storage/uploads/resumable-uploads.mdx @@ -129,7 +129,7 @@ When two or more clients upload a file to the same path using different upload U If you provide the `x-upsert` header the last client to complete the upload will succeed instead. -### UppyJS Example +### UppyJS example You can check a [full example using UppyJS](https://github.com/supabase/supabase/tree/master/examples/storage/resumable-upload-uppy). @@ -140,7 +140,7 @@ UppyJS has integrations with different frameworks: - [Vue](https://uppy.io/docs/vue/) - [Angular](https://uppy.io/docs/angular/) -## Overwriting Files +## Overwriting files When uploading a file to a path that already exists, the default behavior is to return a `400 Asset Already Exists` error. If you want to overwrite a file on a specific path you can set the `x-upsert` header to `true`. diff --git a/apps/docs/pages/guides/storage/uploads/standard-uploads.mdx b/apps/docs/pages/guides/storage/uploads/standard-uploads.mdx index dbafac6e7cd..d3699892e13 100644 --- a/apps/docs/pages/guides/storage/uploads/standard-uploads.mdx +++ b/apps/docs/pages/guides/storage/uploads/standard-uploads.mdx @@ -67,7 +67,7 @@ suspend fun uploadFile(file: File) { -## Overwriting Files +## Overwriting files When uploading a file to a path that already exists, the default behavior is to return a `400 Asset Already Exists` error. If you want to overwrite a file on a specific path you can set the `upsert` options to `true` or using the `x-upsert` header. @@ -96,7 +96,7 @@ await supabase.storage.from('bucket_name').upload('file_path', file, { We do advise against overwriting files when possible, as our Content Delivery Network will take sometime to propagate the changes to all the edge nodes leading to stale content. Uploading a file to a new path is the recommended way to avoid propagation delays and stale content. -## Content Type +## Content type By default, Storage will assume the content type of an asset from the file extension. If you want to specify the content type for your asset simply pass the `contentType` option during upload.