For the complete documentation index, see llms.txt. This page is also available as Markdown.

Database

Add Supabase to power your app with a PostgreSQL database, authentication, file storage, real-time updates, and Edge Function

Overview

Supabase is a direct API integration, which means your app connects to Supabase by using Supabase client libraries and your own project credentials.

This page explains what's needed from the user, how to set up the frontend and backend, how authentication works, and the security rules you must follow.

Supabase Capabilities

Connecting Supabase gives your app a production-grade backend, including:

  • Database (PostgreSQL) Store and query your data with full SQL support. Tell Cody what your interface needs to show and what your database needs to include, and Cody can create the tables and schema that match your data.

  • User authentication Add secure sign-ups, logins, and access control. Cody can generate authentication flows (like email/password) and connect them to the right pages and permissions in your app.

  • File storage Upload and serve images and files using Supabase Storage — useful for profile photos, attachments, and user uploads.

  • Real-time updates Stream changes as data updates. This is useful for chat, live activity feeds, and dashboards that update instantly across users.

  • Edge Functions Run serverless backend logic on Supabase using JavaScript/TypeScript. Cody can create and deploy functions for tasks like sending emails, handling webhooks, processing payments, or integrating with external APIs.

Connecting Supabase

1

Register a new Supabase account here or sign in if you already have one.

Create an organization if you don't have one.

2

Create a new project in Supabase.

Click on + New Project, complete the necessary fields, and allow a few minutes for setup.

3

Share the the Supabase Project URL to Cody

4

Provide the Cody with the anon public key and the service role secret

Navigate to Project Settings - API Keys

Copy both the anon public key & the service role secret and share it with Cody

Cody will safely store all your secrets and help you with integrating a database for your needs.

When Cody asks you to run SQL queries on supabase, click on the SQL editor from your supabase dashboard located at the top right corner or command +E shortcut on Mac devices.

This will open the SQL Editor where you can copy and paste the SQL query and click Run at the bottom right to execute the SQL query.

Last updated

Was this helpful?