Sign up to Supabase - https://supabase.com/dashboard and create a new project. Wait for your database to start.
Once your database has started, head over to your project's SQL Editor
and run the "User Management Starter" quickstart. On the SQL editor
page, scroll down until you see User Management Starter: Sets up a public Profiles table which you can access with your API
. Click that, then click RUN
to execute that query and create a new profiles
table. When that's finished, head over to the Table Editor
and see your new profiles
table.
Go to the Project Settings (the cog icon), open the API tab, and find your API URL and anon
key, you'll need these in the next step.
The anon
key is your client-side API key. It allows "anonymous access" to your database, until the user has logged in. Once they have logged in, the keys will switch to the user's own login token. This enables row level security for your data. Read more about this below.
NOTE: The service_role
key has full access to your data, bypassing any security policies. These keys have to be kept secret and are meant to be used in server environments and never on a client or browser.
Create .env.local
from the .env.example
file and populate this file with your URL and Key.
Run the application: npm run dev
. Open your browser to https://localhost:5173/
and you are ready to go 🚀.