Skip to content
On this page

Supabase for OLS

bash
yarn add @supabase/supabase-js

Supabase JS Docs

Prisma ORM Instructions

supabase prisma docs

bash
yarn add --dev prisma
bash
yarn add --dev @prisma/client
bash
npx prisma generate
bash
npx prisma init
✔ Your Prisma schema was created at prisma/schema.prisma
  You can now open it in your favorite editor.

warn Prisma would have added DATABASE_URL but it already exists in .env
warn You already have a .gitignore file. Don't forget to add `.env` in it to not commit any private information.

Next steps:
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
3. Run prisma db pull to turn your database schema into a Prisma schema.
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.

More information in our documentation:
https://pris.ly/d/getting-started

In the Supabase SQL Editor, run the "User Managerment Starter".

bash
npx prisma migrate dev --name init
bash
supabase start
bash
supabase init
bash
supabase gen types typescript --local > lib/database.types.ts

Seeding data supabase/seed.sql... Started supabase local development setup.

     API URL: http://localhost:54321
      DB URL: postgresql://postgres:postgres@localhost:54322/postgres
  Studio URL: http://localhost:54323
Inbucket URL: http://localhost:54324
  JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
    anon key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0        

service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU

Docs for typescript support

Docs for Push Database Migratrion with GitHub Actions

Supabase Examples(Docs)

Examples

bash
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=soadmin -e KEYCLOAK_ADMIN_PASSWORD=ASDF$#@!qwer4321 quay.io/keycloak/keycloak:20.0.2 start-dev

Internal team docs.