Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: adds a basic Auth page, to our docs and updates the docs wording to be a bit more consistent with our product positioning

Paul Copplestone98f7652a030c
diff --git a/web/docs/about.md b/web/docs/about.md
index d5a19c9bc59..a8415151c4e 100755
--- a/web/docs/about.md
+++ b/web/docs/about.md
@@ -6,38 +6,34 @@ description: 'What is Supabase?'
## What it is
-Supabase is a service to:
+Supabase is an open source Firebase alternative. We are a service to:
-- listen to changes to your PostgreSQL database
-- query your tables, including filtering, pagination, and deeply nested relationships (just like GraphQL)
+- 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
-It does all of this without you having to write a single line of code.
## What it isn't
-- An ORM, at least not like typical ORMs. Supabase is more like an API, since we don't require you to set up any mappings and we interact with your database through a derived schema that get from introspecting your database.
+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.
-## How it works
-
-At its core, Supabase 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.
+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.
-For all Restful functionality, we introspect your database to provide an instant, fully functional API.
+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.
-## Features
+## How it works
-- Fast. Performance and simplicity are our two most important features.
-- 100% open source under the Apache 2.0 License.
-- Accessible by mobile and web with simple client libraries.
-- Works without any major changes to your database (like adding `NOTIFY` functions) or additional plugins (like `wal2json`). By using PostgreSQL's replication functionality we overcome many of their limitations. For example, `NOTIFY` has a 8000 byte payload limit, making it hard to listen to bulk changes.
+At its core, is a suite of open source tools, stiched together to build a seamless developer experience:
-## Benefits
+![Supabase Architecture](/img/supabase-architecture.png)
-- You own your data. Realtime can be pointed at any PostgreSQL database that has replication enabled.
-- Listening to data changes on client side solves stale data problems and update collisions.
-- Many systems that give you realtime functionality require you to update via the same interface that the listener is on. Supabase is source agnostic. Update your database from anywhere and you'll still get the changes.
-- Scale the realtime servers without putting any additional load on your DB. All you need is one connection to your database, and you can handle thousands (or millions) of users
+- [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
+- [pg-api](https://github.com/supabase/pg-api) 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.
-## Where it is
-All code is hosted on [our GitHub org](https://github.com/supabase).
\ No newline at end of file
diff --git a/web/docs/faq.md b/web/docs/faq.md
index ff087b87657..7dbcb1809ff 100755
--- a/web/docs/faq.md
+++ b/web/docs/faq.md
@@ -4,14 +4,32 @@ title: FAQs
description: 'Most frequently asked questions regarding Supabase'
---
-## Do you support (some other database)?
+### Have you built `[insert Firebase feature]` yet?
-At the moment we only support PostgreSQL. However you can [vote on a new database](https://github.com/supabase/supabase/issues/6) if you want us to start development.
+We're building as fast as we can! And we are even adding a few things that Firebase doesn't have as we go. Here are the features we have built:
-## Do you have a library for (some other language)?
+- A dashboard/UI for spinning up and managing your database in less than 1 minute.
+- User Authentication to sign up users and edit access rules on your database.
+- Real-time database listeners
+- JS library and APIs
+- Functions (kinda). These exist as database stored procedures, which can be written in SQL, Javascript, Python, and Java.
-We currently have only a Javascript library. However you can [vote on a new client library](https://github.com/supabase/supabase/issues/5) for your favourite language.
+### How can you be a Firebase alternative if you're built with a relational database?
-## Can you build a connector for (some other product)?
+We started Supabase because we love the functionality of Firebase, but we personally experienced the scaling issues that many others experienced. We chose Postgres because it's well-trusted and is has phenomenal scalability. Our goal is to make Postgres as easy to use as Firebase, so that you no longer have to choose between usability and scalability. Also, we're sure that once you start using Postgres, you'll love it more than any other database.
+
+### How do I host Supabase?
+
+Supabase is an amalgamation of 5 open source tools (and growing). We don't have an simple way to install everything on a single server, but we will work on this as soon as we have a stable set of features. Each tool can be installed as a standalone product. Some of these tools are made by Supabase (like our [Realtime Server](https://github.com/supabase/realtime)), some we support indirectly (like [PostgREST](http://postgrest.org/en/v7.0.0/)), and some are 3rd-party tools (like [Kong](https://github.com/Kong/kong)). All of the tools we use in Supabase are MIT, Apache 2.0, or PostgreSQL licensed.
+
+### Do you support `[some other database]`?
+
+At the moment we only support PostgreSQL. It's very unlikely we'll ever move away from Postgre, however you can [vote on a new database](https://github.com/supabase/supabase/issues/6) if you want us to start development.
+
+### Do you have a library for `[some other language]`?
+
+We currently have a Javascript library. You can [vote on a new client library](https://github.com/supabase/supabase/issues/5) for your favourite language.
+
+### Can you build a connector for `[some other product]`?
We don't have any connectors right now. However you can [vote on a new connector](https://github.com/supabase/supabase/issues/4) for a tool that you use.
diff --git a/web/docs/guides/examples.mdx b/web/docs/guides/examples.mdx
index b189ed9e0b2..e654bbed33c 100644
--- a/web/docs/guides/examples.mdx
+++ b/web/docs/guides/examples.mdx
@@ -8,7 +8,7 @@ description: 'Examples you can use to get started with supabase'
[![alt text](https://dev-to-uploads.s3.amazonaws.com/i/n48hnd9zl78a0uq68xak.png "Todo Example")](https://todo-zeta.now.sh/)
-## [Slack Clone](https://github.com/supabase/supabase/tree/master/examples/slack-clone-basic)
+## [Slack Clone](https://github.com/supabase/supabase/tree/master/examples/slack-clone)
[![alt text](https://camo.githubusercontent.com/2e235d7ebd21ad7ab2b6057553ddcd0084bf3979/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f4a3037553869626c4a686c4b44715a4f78562f67697068792e676966 "Slack Clone Example")](https://github.com/supabase/supabase/tree/master/examples/slack-clone-basic)
diff --git a/web/docs/library/examples/users.js b/web/docs/library/examples/users.js
new file mode 100644
index 00000000000..02061af26dd
--- /dev/null
+++ b/web/docs/library/examples/users.js
@@ -0,0 +1,29 @@
+export const signup = `
+let { body: user } = await supabase
+ .auth
+ .signup({
+ email: '[email protected]',
+ password: 'fOdaPdyTpkpxJgDVIORt'
+ })
+`.trim()
+
+export const login = `
+let { body: user } = await supabase
+ .auth
+ .login({
+ email: '[email protected]',
+ password: 'fOdaPdyTpkpxJgDVIORt'
+ })
+`.trim()
+
+export const userData = `
+let { bod: user } = await supabase
+ .auth
+ .user()
+`.trim()
+
+export const logout = `
+let { body: loggedOut } = await supabase
+ .auth
+ .logout()
+`.trim()
diff --git a/web/docs/library/user-management.mdx b/web/docs/library/user-management.mdx
new file mode 100644
index 00000000000..ecff9df7107
--- /dev/null
+++ b/web/docs/library/user-management.mdx
@@ -0,0 +1,68 @@
+---
+id: user-management
+title: User Management
+description: Use Supabase to Authenticate and Authorize your users.
+---
+
+import CustomCodeBlock from '../../src/components/CustomCodeBlock'
+import {
+ signup,
+ login,
+ userData,
+ logout,
+} from './examples/users'
+
+## About
+
+Supabase makes it easy to manage your users.
+
+When a user signs up, Supabase assigns them a unique ID. You can reference this ID anywhere in your database. For example, you might create a `profiles` table references the user using a `user_id` field.
+
+Supabase already has built in the routes to sign up, login, and log out for managing users in your apps and websites.
+
+
+### Sign up
+
+
+<CustomCodeBlock
+ header="New user."
+ js={signup}
+/>
+<br />
+
+Allow your users to sign up and create a new account.
+
+After they have signed up, all interactions using the Supabase JS client will be performed as "that user".
+
+### Log in
+
+<CustomCodeBlock
+ header="Existing user."
+ js={login}
+/>
+<br />
+
+If an account is created, users can login to your app.
+
+After they have logged in, all interactions using the Supabase JS client will be performed as "that user".
+
+### User data
+
+<CustomCodeBlock
+ header="Get the logged in user."
+ js={userData}
+/>
+<br />
+
+Get the JSON object for the logged in user.
+
+### Log out
+
+<CustomCodeBlock
+ header="Get the logged in user."
+ js={logout}
+/>
+<br />
+
+After calling log out, all interactions using the Supabase JS client will be "anonymous".
+
diff --git a/web/sidebars.js b/web/sidebars.js
index 906e2d97815..32e84bc2e21 100755
--- a/web/sidebars.js
+++ b/web/sidebars.js
@@ -10,11 +10,12 @@ module.exports = {
Introduction: ['about', 'faq'],
Library: [
'library/getting-started',
- 'library/subscribe',
+ 'library/user-management',
'library/get',
'library/post',
'library/patch',
'library/delete',
+ 'library/subscribe',
'library/stored-procedures',
],
// Guides: ['guides/examples'],
@@ -26,7 +27,7 @@ module.exports = {
'realtime/source',
],
Postgres: ['postgres/postgres-intro'],
- 'See Also': ['guides/examples', 'pricing', 'support'],
- Handbook: ['handbook/introduction', 'handbook/contributing'],
+ 'See Also': ['guides/examples', 'pricing', 'support', 'handbook/contributing'],
+ // Handbook: ['handbook/introduction', 'handbook/contributing'],
},
}
diff --git a/web/static/img/custom-docs.png b/web/static/img/custom-docs.png
index 60a04276be6..65b688effa6 100644
Binary files a/web/static/img/custom-docs.png and b/web/static/img/custom-docs.png differ
diff --git a/web/static/img/supabase-architecture.png b/web/static/img/supabase-architecture.png
new file mode 100644
index 00000000000..258225a1e37
Binary files /dev/null and b/web/static/img/supabase-architecture.png differ