diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 5ea6c6b7aef..76a6a0a33e3 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -501,7 +501,6 @@ export const resources = { url: '/guides/resources', items: [ { name: 'Examples', url: '/guides/resources/examples', items: [] }, - { name: 'Features', url: '/features', items: [] }, { name: 'Glossary', url: '/guides/resources/glossary', items: [] }, { name: 'Migrate to Supabase', @@ -557,23 +556,23 @@ export const resources = { ], }, { - name: 'Self-Hosting reference docs', + name: 'Self-Hosting Reference', items: [ { - name: 'Auth server', - url: '/reference/self-hosting-auth', + name: 'Auth Server', + url: '/reference/self-hosting-auth/introduction', icon: '/docs/img/icons/menu/reference-auth', items: [], }, { - name: 'Storage server', - url: '/reference/self-hosting-storage', + name: 'Storage Server', + url: '/reference/self-hosting-storage/introduction', icon: '/docs/img/icons/menu/reference-storage', items: [], }, { - name: 'Realtime server', - url: '/reference/self-hosting-realtime', + name: 'Realtime Server', + url: '/reference/self-hosting-realtime/introduction', icon: '/docs/img/icons/menu/reference-realtime', items: [], }, @@ -750,22 +749,22 @@ export const reference_api = { export const reference_self_hosting_auth = { icon: 'reference-auth', - title: 'Self Hosting Auth', + title: 'Self-Hosting Auth', url: '/guides/reference/self-hosting/auth', parent: '/reference', } export const reference_self_hosting_storage = { icon: 'reference-storage', - title: 'Self Hosting Storage', - url: '/guides/reference/self-hosting/auth', + title: 'Self-Hosting Storage', + url: '/guides/reference/self-hosting/storage', parent: '/reference', } export const reference_self_hosting_realtime = { icon: 'reference-auth', - title: 'Self Hosting Realtime', - url: '/guides/reference/self-hosting/auth', + title: 'Self-Hosting Realtime', + url: '/guides/reference/self-hosting/realtime', parent: '/reference', } diff --git a/apps/docs/docs/ref/api/introduction.mdx b/apps/docs/docs/ref/api/introduction.mdx index 47dbbcf3cd4..68d27b6e1b8 100644 --- a/apps/docs/docs/ref/api/introduction.mdx +++ b/apps/docs/docs/ref/api/introduction.mdx @@ -14,6 +14,8 @@ hideTitle: true + Manage your Supabase organizations and projects programmatically. + ## Status The Management API is in `beta`. It is usable in it's current state, but it's likely that there will be breaking changes. @@ -44,7 +46,7 @@ hideTitle: true - [OpenAPI Docs](https://api.supabase.com/api/v1) - [OpenAPI Spec](https://api.supabase.com/api/v1-json) - - Reporting bugs and issues: [github.com/supabase/supabase](https://github.com/supabase/supabase) + - [Report bugs and issues](https://github.com/supabase/supabase) diff --git a/apps/docs/docs/ref/cli/introduction.mdx b/apps/docs/docs/ref/cli/introduction.mdx index bb12eea9481..e204038abae 100644 --- a/apps/docs/docs/ref/cli/introduction.mdx +++ b/apps/docs/docs/ref/cli/introduction.mdx @@ -11,9 +11,33 @@ hideTitle: true -
- This reference documents every object and method available in Supabase's isomorphic JavaScript - library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to - database changes, invoke Deno Edge Functions, build login and user management functionality, and - manage large files. -
+ + + + The Supabase CLI provides tools to develop your project locally and deploy to the Supabase Platform. + The CLI is still under development, but it contains all the functionality for working with your Supabase projects and the Supabase Platform. + + - Run Supabase locally: [`supabase start`](/docs/reference/cli/usage#supabase-start) + - Manage database migrations: [`supabase migration`](/docs/reference/cli/usage#supabase-migration) + - CI/CD for releasing to production: [`supabase db push`](/docs/reference/cli/usage#supabase-db-push) + - Manage your Supabase projects: [`supabase projects`](/docs/reference/cli/usage#supabase-projects) + - Generate types directly from your database schema: [`supabase gen types`](/docs/reference/cli/usage#supabase-gen) + - A [community-supported GitHub Action](https://github.com/lyqht/generate-supabase-db-types-github-action) to generate TypeScript types + - Shell autocomplete: [`supabase completion`](/docs/reference/cli/usage#supabase-completion) + - A [community-supported Fig autocomplete spec](https://fig.io/manual/supabase) for macOS terminal + + + + + + ### Additional links + + - [Install the Supabase CLI](/docs/guides/cli) + - [Source code](https://github.com/supabase/cli) + - [Known bugs and issues](https://github.com/supabase/cli/issues) + - [Supabase CLI v1 and Management API Beta](https://supabase.com/blog/supabase-cli-v1-and-admin-api-beta) + - [Video: Announcing CLI V1 and Management API Beta](https://www.youtube.com/watch?v=OpPOaJI_Z28) + + + + diff --git a/apps/docs/docs/ref/self-hosting-auth/introduction.mdx b/apps/docs/docs/ref/self-hosting-auth/introduction.mdx index 3e1af1ff9dd..d33aee3de4f 100644 --- a/apps/docs/docs/ref/self-hosting-auth/introduction.mdx +++ b/apps/docs/docs/ref/self-hosting-auth/introduction.mdx @@ -5,16 +5,34 @@ hideTitle: true ---
- +
-

Javascript Client Library

-

@supabase/supabase-js

+

Self-Hosting Auth

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

Javascript Client Library

-

@supabase/supabase-js

+

Self-Hosting Realtime

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

Javascript Client Library

-

@supabase/supabase-js

+

Self-Hosting Storage

-
- This reference documents every object and method available in Supabase's isomorphic JavaScript - library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to - database changes, invoke Deno Edge Functions, build login and user management functionality, and - manage large files. -
+ + + + An S3 compatible object storage service that integrates with Postgres. + + - Uses Postgres as it's datastore for storing metadata + - Authorization rules are written as Postgres Row Level Security policies + - Integrates with S3 as the storage backend (with more in the pipeline!) + - Extremely lightweight and performant + + + + + + ### Client libraries + + - [JavaScript](https://github.com/supabase/storage-js) + - [Dart](https://github.com/supabase/storage-dart) + + ### Additional links + + - [Source code](https://github.com/supabase/storage-api) + - [Known bugs and issues](https://github.com/supabase/storage-js/issues) + - [Storage guides](/docs/guides/storage) + - [OpenAPI docs](https://supabase.github.io/storage-api/) + - [Why we built a new object storage service](https://supabase.com/blog/supabase-storage) + + + +