This Deno-based backend, hosted on Supabase Edge Functions, aims to synchronize Missive data into our Supabase database for later processing.
The webhooks are triggered by Missive rules. For more information on how to set up and manage these rules, please refer to the Missive Rules Overview.
The backend handles the following Missive webhook types:
- New Comment
- Label Change
- Conversation Closed
- Conversation Reopened
- Conversation Assignee Change
- Language: Deno
- Hosting: Supabase Edge Functions
- Database: PostgreSQL (Supabase)
To create a new migration, follow these steps:
- Change directory into ./drizzle
- Run
npm install - Edit the Drizzle config to point to the existing Supabase database.
- Run
npm run introspectto import the schema. - Run
npm run migration:generateto generate a new migration (note: you need to change the import statements in schema.ts from 'npm:drizzle-orm/pg-core' to 'drizzle-orm/pg-core').
supabase start
cd supabase/functions/user-actions
supabase functions serve --no-verify-jwt --env-file=supabase/functions/user-actions/tests/.env.test
deno test --no-check --allow-all --env=tests/.env.test -qFollow these steps to run the project locally:
-
Create a
.envfile from the.env-examplefile. -
Run Deno server by itself:
deno task devor run the Supabase Edge function:
- Add DB_POOL_URL=postgresql://supabase_admin:postgres@db:5432/postgres to
supabase/functions/user-actions/tests/.env.test - Run
supabase functions serve --no-verify-jwt --env-file=supabase/functions/user-actions/tests/.env.testsupabase functions deploy user-actionssupabase functions delete user-actionssupabase secrets listsupabase secrets set NAME1=VALUE1 NAME2=VALUE2supabase secrets unset NAME1 NAME2