Skip to Content
sesameSend

Supabase

Create the project and apply the schema.

All data lives in one Supabase Postgres project.

  1. Create a Supabase project.

  2. Put SUPABASE_URL (https://<ref>.supabase.co) and SUPABASE_SERVICE_ROLE_KEY in .env. Both are in Project Settings, API. The service-role key bypasses row-level security, so keep it on the server.

  3. Apply the schema with either:

    supabase link --project-ref <ref> && supabase db push

    or paste each file from supabase/migrations/ into the SQL editor, in filename order.

Filename order is a valid replay order. scripts/replay-migrations.sh replays every migration into a throwaway Postgres container to prove it. It needs Docker.

  1. Create your first team and API key:

    node --env-file=.env scripts/bootstrap.mjs "My team" you@example.com

bootstrap.mjs writes a full-access key to .env as OPENSEND_API_KEY without printing it, adds a CRON_SECRET if missing, and makes the email you pass the team owner.

Use a separate test project for the live check scripts in scripts/. They create and delete data.