AIvoices/supabase
2025-04-21 13:19:13 +01:00
..
migrations updated migration files 2025-04-17 17:23:50 +01:00
.gitignore updated migration files 2025-04-17 17:23:50 +01:00
config.toml updated migration files 2025-04-17 17:23:50 +01:00
README.md adding supabase readme 2025-04-21 13:19:13 +01:00
seed.sql updated migration files 2025-04-17 17:23:50 +01:00
tables.png adding supabase readme 2025-04-21 13:19:13 +01:00

Supabase Setup and Usage Guide

Installation

  1. Install Supabase CLI

    # Using NPM
    npm install -g supabase
    
    # Using Homebrew (macOS)
    brew install supabase/tap/supabase
    
  2. Start Supabase locally

    # Navigate to your project
    cd ElatoAI
    
    # Start Supabase local development
    supabase start
    
  3. Verify installation The output should show local endpoints including:

Configuration

  1. Environment variables Add these to your .env.local and .env file in frontend-nextjs and server-deno respectively:
    SUPABASE_URL=http://127.0.0.1:54321
    SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
    JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long
    

Tables chart

View a live chart of the tables and their relationships here

Supabase Tables Chart

Tables

  1. users - user details are stored here
  2. devices - device details (mac address, device name, etc) are stored here
  3. conversations - conversation details (start time, end time, etc) are stored here
  4. messages - all conversations and transcripts are stored here
  5. api_keys - api keys are stored here (not used for local development)
  6. languages - all supported languages are stored here

Development Workflow

  1. Make schema changes in Supabase Studio (http://127.0.0.1:54323)
  2. Generate migrations: supabase db diff -f <migration_name>
  3. Apply to local database: supabase migration up
  4. Push changes to production when ready

Stopping Supabase

supabase stop

For more details, visit the Supabase documentation.