From 82c4fa30278c97df303483568fc53f95667b2f18 Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Fri, 23 Jan 2026 15:16:57 +1100 Subject: [PATCH] Idea for quickstarts --- .../content/_partials/quickstart_db_setup.mdx | 87 ++++++++++++------- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/apps/docs/content/_partials/quickstart_db_setup.mdx b/apps/docs/content/_partials/quickstart_db_setup.mdx index 7c9489d64bb..e0fed7dc93b 100644 --- a/apps/docs/content/_partials/quickstart_db_setup.mdx +++ b/apps/docs/content/_partials/quickstart_db_setup.mdx @@ -2,31 +2,43 @@ Go to [database.new](https://database.new) and create a new Supabase project. -Alternatively, you can create a project using the Management API: - -```bash -# First, get your access token from https://supabase.com/dashboard/account/tokens -export SUPABASE_ACCESS_TOKEN="your-access-token" + + + ```bash + # First, get your access token from https://supabase.com/dashboard/account/tokens + export SUPABASE_ACCESS_TOKEN="your-access-token" -# List your organizations to get the organization ID -curl -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \ - https://api.supabase.com/v1/organizations + # List your organizations to get the organization ID + curl -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \ + https://api.supabase.com/v1/organizations -# Create a new project (replace with your organization ID) -curl -X POST https://api.supabase.com/v1/projects \ - -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \ - -H "Content-Type: application/json" \ - -d '{ - "organization_id": "", - "name": "My Project", - "region": "us-east-1", - "db_pass": "" - }' -``` + # Create a new project (replace with your organization ID) + curl -X POST https://api.supabase.com/v1/projects \ + -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "organization_id": "", + "name": "My Project", + "region": "us-east-1", + "db_pass": "" + }' + ``` + + @@ -34,12 +46,24 @@ curl -X POST https://api.supabase.com/v1/projects \ When your project is up and running, go to the [Table Editor](/dashboard/project/_/editor), create a new table and insert some data. -Alternatively, you can run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create an `instruments` table with some sample data. - + + + Run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create an `instruments` table with some sample data. + ```sql SQL_EDITOR -- Create the table create table instruments ( @@ -55,16 +79,12 @@ Alternatively, you can run the following snippet in your project's [SQL Editor]( alter table instruments enable row level security; ``` - - - - - -Make the data in your table publicly readable by adding an RLS policy: - - - - + + + Make the data in your table publicly readable by adding an RLS policy: ```sql SQL_EDITOR create policy "public can read instruments" @@ -72,5 +92,8 @@ Make the data in your table publicly readable by adding an RLS policy: for select to anon using (true); ``` + - + + + \ No newline at end of file