Skip to content

Set up Supabase: schema, migrations, RLS, and client utilities - #14

Merged
jasoncrawford merged 1 commit into
mainfrom
supabase-setup
Feb 18, 2026
Merged

jasoncrawford merged 1 commit into
mainfrom
supabase-setup

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Initializes Supabase CLI with local project config (supabase/config.toml)
  • Creates database migration with all five tables from the tech spec: sites, checks, incidents, contacts, invitations — plus indexes for common query patterns
  • Creates RLS migration: public read access for status-page data (sites, checks, incidents), authenticated-only access for admin operations and sensitive data (contacts, invitations)
  • Creates Realtime migration enabling live updates on sites, checks, and incidents
  • Adds Supabase client utilities for server components (@supabase/ssr), browser components, and service-role admin operations
  • Adds TypeScript types matching the database schema
  • Adds .env.local.example with all required environment variables
  • Adds Vitest smoke tests verifying module exports and type shapes

Test plan

  • All 6 Vitest tests pass (smoke + supabase module tests)
  • CI passes on PR (GitHub Actions)
  • Migrations apply cleanly against a local Supabase instance (manual verification)

Closes #2

🤖 Generated with Claude Code

…t utilities

- Initialize Supabase CLI with project config
- Create migration for all tables (sites, checks, incidents, contacts, invitations) with indexes
- Create migration for RLS policies (public read for status data, authenticated write for all)
- Create migration to enable Realtime on sites, checks, and incidents
- Add Supabase client utilities (server, browser, admin/service-role)
- Add TypeScript types matching the database schema
- Add .env.local.example with required environment variables
- Add smoke tests for Supabase module exports

Closes #2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit 7f543a9 into main Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up Supabase: database schema, migrations, and RLS policies

1 participant