Skip to content

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

mocking up some reference docs

Paul Copplestone9d41a9554b27
diff --git a/web/package.json b/web/package.json
index b59f10d4fb5..80434340181 100644
--- a/web/package.json
+++ b/web/package.json
@@ -11,7 +11,9 @@
"gen:gotrue": "ts-node ReferenceGenerator.ts -o docs/gotrue/client spec/gotrue.yml",
"gen:postgrest": "ts-node ReferenceGenerator.ts -o docs/postgrest/client spec/postgrest.yml",
"gen:realtime": "ts-node ReferenceGenerator.ts -o docs/realtime/client spec/realtime.yml",
- "gen:supabase": "ts-node ReferenceGenerator.ts -o docs/client spec/supabase.yml"
+ "gen:supabase": "ts-node ReferenceGenerator.ts -o docs/client spec/supabase.yml",
+ "gen:cli": "ts-node ReferenceGenerator.ts -o docs/reference/cli spec/cli.yml",
+ "gen:postgres": "ts-node ReferenceGenerator.ts -o docs/reference/postgres spec/postgres.yml"
},
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.63",
diff --git a/web/sidebar_spec_cli.js b/web/sidebar_spec_cli.js
new file mode 100644
index 00000000000..11b203a9d30
--- /dev/null
+++ b/web/sidebar_spec_cli.js
@@ -0,0 +1,16 @@
+module.exports = {
+ docs: [
+ {
+ type: 'category',
+ label: 'About',
+ items: ['reference/cli/index', 'reference/cli/supa-init'],
+ collapsed: false,
+ },
+ {
+ type: 'category',
+ label: 'Local Development',
+ items: ['reference/cli/supa-dev', 'reference/cli/supa-eject'],
+ collapsed: false,
+ }
+ ],
+}
\ No newline at end of file
diff --git a/web/sidebar_spec_postgres.js b/web/sidebar_spec_postgres.js
new file mode 100644
index 00000000000..17cbfbfe26f
--- /dev/null
+++ b/web/sidebar_spec_postgres.js
@@ -0,0 +1,34 @@
+module.exports = {
+ docs: [
+ {
+ type: 'category',
+ label: 'About',
+ items: ['reference/postgres/index'],
+ collapsed: false,
+ },
+ {
+ type: 'category',
+ label: 'Database',
+ items: ['reference/postgres/database-users', 'reference/postgres/database-passwords'],
+ collapsed: false,
+ },
+ {
+ type: 'category',
+ label: 'Schemas',
+ items: ['reference/postgres/creating-schemas'],
+ collapsed: false,
+ },
+ {
+ type: 'category',
+ label: 'Tables',
+ items: ['reference/postgres/creating-tables'],
+ collapsed: false,
+ },
+ {
+ type: 'category',
+ label: 'Columns',
+ items: ['reference/postgres/creating-columns', 'reference/postgres/column-types'],
+ collapsed: false,
+ }
+ ],
+}
\ No newline at end of file
diff --git a/web/sidebars.js b/web/sidebars.js
index 0270ffd3433..7c57c3d2702 100755
--- a/web/sidebars.js
+++ b/web/sidebars.js
@@ -9,12 +9,18 @@ const goTrueClient = require('./sidebar_spec_gotrue')
const postgrestClient = require('./sidebar_spec_postgrest')
const realtimeClient = require('./sidebar_spec_realtime')
const supabaseClient = require('./sidebar_spec_supabase')
+const supabaseCli = require('./sidebar_spec_cli')
+const postgres = require('./sidebar_spec_postgres')
module.exports = {
goTrueClient: goTrueClient.docs,
postgrestClient: postgrestClient.docs,
realtimeClient: realtimeClient.docs,
- supabaseClient: supabaseClient.docs,
+ supabaseClient: [
+ { Postgres: postgres.docs },
+ { Javascript: supabaseClient.docs },
+ { CLI: supabaseCli.docs },
+ ],
docs: [
{ type: 'category', label: 'Introduction', items: ['about', 'faq'], collapsed: false },
{
diff --git a/web/spec/cli.yml b/web/spec/cli.yml
new file mode 100644
index 00000000000..956886bfe85
--- /dev/null
+++ b/web/spec/cli.yml
@@ -0,0 +1,56 @@
+openref: 0.1
+
+info:
+ title: Getting started
+ description: |
+
+ Supabase CLI.
+
+ definition: spec/combined.json
+ libraries:
+ - name: 'sh'
+ id: 'sh'
+ version: '0.0.1'
+ docs:
+ path: reference/cli/
+ sidebar:
+ - name: 'About'
+ items:
+ - index
+ - supa init
+ - name: 'Local Development'
+ items:
+ - supa dev
+ - supa eject
+
+pages:
+ supa init:
+ description: |
+ init
+
+ examples:
+ - name: supa init
+ sh: |
+ ```sh
+ supa init
+ ```
+ supa dev:
+ description: |
+ dev
+
+ examples:
+ - name: supa dev
+ sh: |
+ ```sh
+ supa dev
+ ```
+ supa eject:
+ description: |
+ eject
+
+ examples:
+ - name: supa eject
+ sh: |
+ ```sh
+ supa eject
+ ```
diff --git a/web/spec/postgres.yml b/web/spec/postgres.yml
new file mode 100644
index 00000000000..f8c4a12fcd1
--- /dev/null
+++ b/web/spec/postgres.yml
@@ -0,0 +1,100 @@
+openref: 0.1
+
+info:
+ title: Getting started
+ description: |
+
+ PostgreSQL
+
+ definition: spec/combined.json
+ libraries:
+ - name: 'sql'
+ id: 'sql'
+ version: '0.0.1'
+ docs:
+ path: reference/postgres/
+ sidebar:
+ - name: 'About'
+ items:
+ - index
+ - name: 'Database'
+ items:
+ - Database Users
+ - Database Passwords
+ - name: 'Schemas'
+ items:
+ - Creating schemas
+ - name: 'Tables'
+ items:
+ - Creating tables
+ - name: 'Columns'
+ items:
+ - Creating columns
+ - Column types
+
+pages:
+ Database Users:
+ description: |
+ Users and Roles are almost interchangable.
+
+ examples:
+ - name: Create New User
+ sql: |
+ ```sql
+ create user prisma
+ with password 'hello';
+ ```
+ Database Passwords:
+ description: |
+ Resetting passwords.
+
+ examples:
+ - name: Password reset
+ sql: |
+ ```sql
+ alter user postgres
+ with password 'new_password';
+ ```
+ Creating schemas:
+ description: |
+ Creating schemas.
+
+ examples:
+ - name: Create schema
+ sql: |
+ ```sql
+ create schema new_schema;
+ ```
+ Creating tables:
+ description: |
+ Creating tables.
+
+ examples:
+ - name: Create table
+ sql: |
+ ```sql
+ create table new_table;
+ ```
+ Creating columns:
+ description: |
+ Creating columns.
+
+ examples:
+ - name: Create column
+ sql: |
+ ```sql
+ alter table new_table
+ add new_column text;
+ ```
+ Column types:
+ description: |
+ Column types.
+
+ examples:
+ - name: Create column
+ sql: |
+ ```sql
+ alter table new_table
+ add new_column text;
+ ```
+