diff --git a/web/docs/about.md b/web/docs/about.md deleted file mode 100755 index 5392d8d84bd..00000000000 --- a/web/docs/about.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: about -title: About -description: 'What is Supabase?' -slug: / ---- - -## What it is - -Supabase is an open source Firebase alternative. We are a service to: - -- Listen to database changes. -- Query your tables, including filtering, pagination, and deeply nested relationships (like GraphQL). -- Create, update, and delete rows. -- Manage your users and their permissions. -- Interact with your database using a simple UI. - -## What it isn't - -Supabase is not a 1-to-1 mapping of Firebase. While we are building many of the features that Firebase offers, we are not going about it the same way. - -Our technological choices are quite different to Firebase. Everything we use is open source. Wherever possible, we use and support existing tools in the ecosystem, rather than developing from scratch. - -Most notably, we use Postgres rather than a NoSQL store. This was a deliberate choice. We believe that no other database on the market offers the scalability and functionality required to legitimately compete with Firebase. - -## How it works - -At its core, Supabase is a suite of open source tools, stitched together to build a seamless developer experience: - -![Supabase Architecture](/img/supabase-architecture.png) - -- [PostgreSQL](https://www.postgresql.org/) is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. -- [Realtime](https://github.com/supabase/realtime) is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using WebSockets. Supabase listens to Postgres' built-in replication functionality, converts the replication byte stream into JSON, then broadcasts the JSON over WebSockets. -- [PostgREST](http://postgrest.org/) is a web server that turns your PostgreSQL database directly into a RESTful API. -- [postgres-meta](https://github.com/supabase/postgres-meta) is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries etc. -- [GoTrue](https://github.com/netlify/gotrue) is an SWT-based API for managing users and issuing SWT tokens. -- [Kong](https://github.com/Kong/kong) is a cloud-native API gateway. diff --git a/web/docs/about.mdx b/web/docs/about.mdx new file mode 100755 index 00000000000..9eb2a2ae602 --- /dev/null +++ b/web/docs/about.mdx @@ -0,0 +1,131 @@ +--- +id: about +title: Introduction +description: 'What is Supabase?' +slug: / +hide_table_of_contents: true +--- + +import Link from '@docusaurus/Link' +import Tabs from '@theme/Tabs' +import TabItem from '@theme/TabItem' +const frameworks = [ + { name: 'Angular', logo: '/img/libraries/dart-icon.svg', href: '/docs/guides/with-angular' }, + { + name: 'Cloudflare', + logo: '/img/libraries/dart-icon.svg', + href: 'https://github.com/supabase/supabase/tree/master/examples/with-cloudflare-workers', + }, + { + name: 'Expo', + logo: '/img/libraries/expo-icon.svg', + href: 'https://github.com/supabase/supabase/tree/master/examples/expo-todo-list', + }, + { name: 'Flutter', logo: '/img/libraries/dart-icon.svg', href: '/docs/guides/with-flutter' }, + { name: 'Next.js', logo: '/img/libraries/nextjs-icon.svg', href: '/docs/guides/with-nextjs' }, + { name: 'React', logo: '/img/libraries/react-icon.svg', href: '/docs/guides/with-react' }, + { name: 'Svelte', logo: '/img/libraries/svelte-icon.svg', href: '/docs/guides/with-svelte' }, + { name: 'Vue', logo: '/img/libraries/vuejs-icon.svg', href: '/docs/guides/with-vue-3' }, +] + +Supabase is an open source Firebase alternative. + +It's provides all the backend services you need to build a product. You can use it completely, or just the services you require: + +
+
+ {/* Database */} +
+ +
+

Database

+

A dedicated, scalable Postgres database.

+
+ +
+ {/* Auth */} +
+ +
+

Auth

+

User management with Row Level Security.

+
+ +
+ {/* Auth */} +
+ +
+

File Storage

+

Store, organize, and serve large files.

+
+ +
+ {/* API */} +
+ +
+

Auto-generated APIs

+

Instantly APIs for your database.

+
+ +
+
+
+ +## Getting started + +Visit [app.supabase.io](https://app.supabase.io) to get started with the hosted platform or visit the [self-hosting](/docs/guides/self-hosting) docs to learn how to host Supabase yourself. + +Supabase is just Postgres, which makes it compatible with a large number of tools and frameworks. + +
+
+ {frameworks.map((x) => ( +
+ +
+ {x.logo && {x.name}} +

{x.name}

+
+ +
+ ))} +
+
+ +## How to use these docs + +The documentation is divided into 3 sections. + +
+
+ {/* Overview */} +
+ +
+

Overview

+

A summary of the tools and how to get started.

+
+ +
+ {/* Auth */} +
+ +
+

Guides

+

In-depth explainations for each tool.

+
+ +
+ {/* Ref */} +
+ +
+

Reference Docs

+

Technical documentation for Client Libraries and Systems.

+
+ +
+
+
diff --git a/web/docs/architecture.mdx b/web/docs/architecture.mdx new file mode 100755 index 00000000000..22cf34e8535 --- /dev/null +++ b/web/docs/architecture.mdx @@ -0,0 +1,17 @@ +--- +id: architecture +title: Architecture +description: 'Supabase design and architecture' +# hide_table_of_contents: true +--- + +Supabase is open source. Wherever possible, we use and support existing tools rather than developing from scratch. +We choose open source tools which are scalable and we make them simple to use. + +![Supabase Architecture](/img/supabase-architecture.png) + +Supabase is not a 1-to-1 mapping of Firebase. While we are building many of the features that Firebase offers, we are not going about it the same way. + +Our technological choices are quite different to Firebase. Everything we use is open source. Wherever possible, we use and support existing tools in the ecosystem, rather than developing from scratch. + +Most notably, we use Postgres rather than a NoSQL store. This was a deliberate choice. We believe that no other database on the market offers the scalability and functionality required to legitimately compete with Firebase. \ No newline at end of file diff --git a/web/docs/guides/auth.mdx b/web/docs/guides/auth.mdx index 8fd47316bd9..1298484a113 100644 --- a/web/docs/guides/auth.mdx +++ b/web/docs/guides/auth.mdx @@ -4,57 +4,112 @@ title: Auth description: Use Supabase to Authenticate and Authorize your users. --- +import Link from '@docusaurus/Link' +import Tabs from '@theme/Tabs' +import TabItem from '@theme/TabItem' +const providers = [ + { + name: 'Apple', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-apple', + }, + { + name: 'Bitbucket', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-bitbucket', + }, + { + name: 'Discord', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/discord', + }, + { + name: 'Facebook', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-facebook', + }, + { + name: 'GitHub', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-github', + }, + { + name: 'GitLab', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-gitlab', + }, + { + name: 'Google', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/docs/guides/auth/auth-google', + }, + { + name: 'Twitter', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-twitter', + }, + { + name: 'Twitch', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-twitch', + }, + { + name: 'Twilio', + // logo: '/img/libraries/dart-icon.svg', + href: '/docs/guides/auth/auth-twilio', + }, +] + ## User Management Supabase makes it simple to manage your users. When users sign up, Supabase assigns them a unique ID. You can reference this ID anywhere in your database. For example, you might create a `profiles` table referencing the user using a `user_id` field. -Supabase provides the routes to [sign up](/docs/reference/javascript/auth-signup), [log in](/docs/reference/javascript/auth-signin), +Supabase provides the routes to [sign up](/docs/reference/javascript/auth-signup), [log in](/docs/reference/javascript/auth-signin), [log out](/docs/reference/javascript/auth-signout), and manage users in your apps and websites. - ## Third Party Logins We currently support the following OAuth providers: -- Google -- GitHub -- GitLab -- Azure -- Facebook -- Bitbucket -- Twitter -- Apple (See [this guide](https://medium.com/identity-beyond-borders/how-to-configure-sign-in-with-apple-77c61e336003) to generate an Apple `client_secret`) -![OAuth Logins.](/img/supabase-oauth-logins.png) +
+
+ {providers.map((x) => ( +
+ +
+ {x.logo && {x.name}} +

{x.name}

+
+ +
+ ))} +
+
You can enable providers by navigating to Authentication > Settings > External OAuth Providers and inputting your `Client ID` and `Secret` for each. -To fetch these, you need to: - -1. Generate `Client ID` and `Secret` ([Google](https://console.developers.google.com/apis/credentials), [GitHub](https://github.com/settings/applications/new), [GitLab](https://gitlab.com/oauth/applications), [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/), [Apple](https://developer.apple.com/account/ios/certificate), [Twitter](https://developer.twitter.com/en/portal/projects-and-apps) ). -2. Enter Authorized Redirect URI: `https://.supabase.co/auth/v1/callback` on provider dashboard. - +![OAuth Logins.](/img/supabase-oauth-logins.png) ## Row Level Security Authentication only gets you so far. When you need granular authorization rules, nothing beats PostgreSQL's [Row Level Security (RLS)](https://www.postgresql.org/docs/current/ddl-rowsecurity.html). Supabase makes it simple to turn RLS on and off. - ## Policies -[Policies](https://www.postgresql.org/docs/current/sql-createpolicy.html) are PostgreSQL's rule engine. They are incredibly powerful and flexible, allowing you to write complex SQL rules which fit your unique business needs. +[Policies](https://www.postgresql.org/docs/current/sql-createpolicy.html) are PostgreSQL's rule engine. They are incredibly powerful and flexible, allowing you to write complex SQL rules which fit your unique business needs. - - -### Full list of extensions - -Supabase is pre-configured with over 50 extensions. You can also install your own SQL extensions directly into the database through our SQL editor. - - - +[Learn more](/docs/guides/database/extensions) about all the extensions provided on Supabase. ## Tips diff --git a/web/docs/guides/platform.mdx b/web/docs/guides/platform.mdx index ef13ae8ba1b..9919207606d 100644 --- a/web/docs/guides/platform.mdx +++ b/web/docs/guides/platform.mdx @@ -1,7 +1,6 @@ --- id: platform -title: Getting started -sidebar_label: Introduction +title: Platform description: Getting started with the Supabase platform. --- diff --git a/web/docs/guides/self-hosting.mdx b/web/docs/guides/self-hosting.mdx index 983a7f05420..cf81e187d0b 100644 --- a/web/docs/guides/self-hosting.mdx +++ b/web/docs/guides/self-hosting.mdx @@ -7,6 +7,8 @@ description: How to use configure and deploy Supabase. Supabase is a [Hosted Platform](https://app.supabase.io), so you don't _have_ to deploy it yourself. However, if you want to configure and deploy it yourself, that's also possible. +![Supabase Architecture](/img/supabase-architecture.png) + ## Before you begin The self-hosted version of Supabase does not include a UI yet. @@ -25,7 +27,7 @@ In the meantime, here are some suggestions for working with your Postgres Databa We provide a Docker Compose directory which is includes all of the tools required for building on top of Supabase. -You can download the Docker files like so: +Download the Docker files: ```bash # 1. Copy an empty repo diff --git a/web/sidebars.js b/web/sidebars.js index b41ed776223..af85d54856e 100755 --- a/web/sidebars.js +++ b/web/sidebars.js @@ -33,37 +33,29 @@ module.exports = { docs: [ { type: 'category', - label: 'Introduction', - items: ['about', 'faq'], - collapsed: false, - }, - { - type: 'category', - label: 'Getting Started', - collapsed: false, + label: 'Overview', items: [ - 'guides/platform', + 'about', + 'architecture', 'guides/database', 'guides/auth', 'guides/storage', 'guides/api', - 'guides/client-libraries', - 'guides/local-development', + 'guides/examples', ], + collapsed: false, }, { type: 'category', label: 'Tutorials', collapsed: false, items: [ - 'guides/examples', 'guides/with-angular', 'guides/with-flutter', 'guides/with-nextjs', 'guides/with-react', 'guides/with-svelte', 'guides/with-vue-3', - 'guides/self-hosting', ], }, { @@ -71,6 +63,7 @@ module.exports = { label: 'See Also', collapsed: false, items: [ + 'faq', 'handbook/contributing', 'handbook/supasquad', 'company/terms', @@ -83,7 +76,7 @@ module.exports = { { type: 'category', label: 'Guides', - items: ['guides'], + items: ['guides', 'guides/platform', 'guides/local-development', 'guides/self-hosting'], collapsed: false, }, { diff --git a/web/static/img/libraries/c-sharp-icon.svg b/web/static/img/libraries/c-sharp-icon.svg new file mode 100644 index 00000000000..5f58f928629 --- /dev/null +++ b/web/static/img/libraries/c-sharp-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/static/img/libraries/dart-icon.svg b/web/static/img/libraries/dart-icon.svg new file mode 100644 index 00000000000..7fdd552a41e --- /dev/null +++ b/web/static/img/libraries/dart-icon.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/web/static/img/libraries/expo-icon.svg b/web/static/img/libraries/expo-icon.svg new file mode 100644 index 00000000000..e4deeadf133 --- /dev/null +++ b/web/static/img/libraries/expo-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/static/img/libraries/javascript-icon.svg b/web/static/img/libraries/javascript-icon.svg new file mode 100644 index 00000000000..1f203d35ed6 --- /dev/null +++ b/web/static/img/libraries/javascript-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/static/img/libraries/kotlin-icon.svg b/web/static/img/libraries/kotlin-icon.svg new file mode 100644 index 00000000000..93fee789273 --- /dev/null +++ b/web/static/img/libraries/kotlin-icon.svg @@ -0,0 +1 @@ +icon_Kotlin \ No newline at end of file diff --git a/web/static/img/libraries/nestjs-icon.svg b/web/static/img/libraries/nestjs-icon.svg new file mode 100644 index 00000000000..6deb3ed54ee --- /dev/null +++ b/web/static/img/libraries/nestjs-icon.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/web/static/img/libraries/nextjs-icon.svg b/web/static/img/libraries/nextjs-icon.svg new file mode 100644 index 00000000000..99afa3413d3 --- /dev/null +++ b/web/static/img/libraries/nextjs-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/static/img/libraries/nextjs.svg b/web/static/img/libraries/nextjs.svg new file mode 100644 index 00000000000..843612152bb Binary files /dev/null and b/web/static/img/libraries/nextjs.svg differ diff --git a/web/static/img/libraries/python-icon.svg b/web/static/img/libraries/python-icon.svg new file mode 100644 index 00000000000..366f52f3393 --- /dev/null +++ b/web/static/img/libraries/python-icon.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/web/static/img/libraries/react-icon.svg b/web/static/img/libraries/react-icon.svg new file mode 100644 index 00000000000..88860de5722 --- /dev/null +++ b/web/static/img/libraries/react-icon.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/web/static/img/libraries/react-native-icon.svg b/web/static/img/libraries/react-native-icon.svg new file mode 100644 index 00000000000..88860de5722 --- /dev/null +++ b/web/static/img/libraries/react-native-icon.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/web/static/img/libraries/rust-icon.svg b/web/static/img/libraries/rust-icon.svg new file mode 100644 index 00000000000..b486919ff05 --- /dev/null +++ b/web/static/img/libraries/rust-icon.svg @@ -0,0 +1,2 @@ + +Rust programming language logoimage/svg+xml diff --git a/web/static/img/libraries/svelte-icon.svg b/web/static/img/libraries/svelte-icon.svg new file mode 100644 index 00000000000..4bf279659a9 --- /dev/null +++ b/web/static/img/libraries/svelte-icon.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/web/static/img/libraries/vuejs-icon.svg b/web/static/img/libraries/vuejs-icon.svg new file mode 100644 index 00000000000..a1d285eb2a1 --- /dev/null +++ b/web/static/img/libraries/vuejs-icon.svg @@ -0,0 +1,2 @@ + +