Supasheet

Database Setup

Initialize and configure your PostgreSQL database

Overview

Supasheet includes pre-built migrations in /supabase/migrations/ that create all necessary schemas, tables, and functions. You just need to apply them.

Local Setup (Development)

Start Supabase

npx supabase start

Starts local Supabase instance with PostgreSQL.

Apply Migrations

npx supabase db reset

Applies all migrations from /supabase/migrations/.

Verify Setup

npx supabase status

Check that all services are running.

Cloud Setup (Production)

Create Supabase Project

  1. Go to supabase.com/dashboard
  2. Click "New Project"
  3. Choose organization and region
  4. Set database password
  5. Wait for project creation (~2 minutes)
npx supabase link --project-ref your-project-ref

Get project-ref from dashboard URL: https://supabase.com/dashboard/project/[project-ref]

Push Migrations

npx supabase db push

Applies all local migrations to cloud database.

What Gets Created

The migrations automatically create:

  • Schemas: supasheet, public
  • Core Tables: accounts, roles, permissions, meta tables
  • Feature Tables: dashboards, charts, reports, audit logs
  • Storage Buckets: public, personal
  • Functions: Permission checks, audit triggers, meta generators
  • RLS Policies: Row-level security on all tables

Adding Your Own Tables

Create new migrations for your application tables:

npx supabase migration new add_products_table

See Quickstart for complete examples.

Next Steps