Supabase basics
Debrief uses Supabase for accounts. People sign up with their email and a password (or a one-time link), or with GitHub. The GitHub button appears the moment it's enabled in Supabase.
- Create a project at supabase.com. The free tier is fine.
- In Project Settings → API, copy the Project URL and the
anonkey intoSUPABASE_URLandSUPABASE_ANON_KEYin.env. - In Authentication → URL Configuration, set Site URL to your Debrief address (for example
http://localhost:3000) and addhttp://localhost:3000/**to Redirect URLs. Add your real domain the same way when you deploy. - Find your callback URL: it's your Project URL plus
/auth/v1/callback, likehttps://abcdefgh.supabase.co/auth/v1/callback. GitHub needs it. Some forms call it the redirect URL; it's the same thing.
GitHub
- Go to GitHub → Settings → Developer settings → OAuth Apps and click New OAuth App.
- Application name: Debrief. Homepage URL: your Debrief address. Authorization callback URL: your Supabase callback URL.
- Click Register application, copy the Client ID, then Generate a new client secret and copy it (GitHub shows it once).
- In Supabase, Authentication → Sign In / Providers → GitHub: enable it, paste both values, save.
Email sign-up
Email and password sign-up, "email me a link" and password reset are on by default (Authentication → Sign In / Providers → Email). Keep Confirm email switched on so people prove they own the address.
- Supabase's built-in mailer only sends a few auth emails an hour and is meant for testing. For real users, connect your own sender: Authentication → Emails → SMTP Settings → enable custom SMTP.
- With Resend (after verifying your domain): host
smtp.resend.com, port465, usernameresend, password a Resend API key, sender email an address on your verified domain such ashello@yourdomain.com, sender name "Debrief". - Raise the sending limit under Authentication → Rate Limits if you expect many sign-ups an hour.
Custom verification email
The email a new user gets to confirm their address is a template you can rewrite completely, in HTML.
- Open Authentication → Emails → Templates and pick Confirm signup.
- Set the Subject, for example
Confirm your email for Debrief. - Paste your HTML into Message body. Ready-made, on-brand templates live in the Debrief folder under
supabase/email-templates/:confirm-signup.html,magic-link.htmlandreset-password.html. - Keep the link variable in the button:
{{ .ConfirmationURL }}. Without it the email can't confirm anything. - Save, then sign up with a test address to see it. Repeat for Magic Link and Reset Password so every email matches.
Variables you can use
| Variable | What it is |
|---|---|
{{ .ConfirmationURL }} | The link that confirms the address (or signs in, or opens password reset). |
{{ .Token }} | A 6-digit code, if you'd rather show a code than a link. |
{{ .Email }} | The address the email is going to. |
{{ .SiteURL }} | Your Site URL from URL Configuration. |
{{ .Data.full_name }} | Anything saved at sign-up. Debrief saves full_name and product_name. |
Email clients ignore most CSS, so keep styles inline and the layout simple. Test in Gmail and Outlook before launch. People who sign in with GitHub never get this email: GitHub has already confirmed their address.
Email delivery (Resend)
Debrief emails customers their interview link and your win-back messages through Resend.
- Create a Resend account and an API key. Put it in
RESEND_API_KEY. - Verify a domain you own at resend.com/domains: add the DNS records Resend shows (SPF, DKIM) at your domain registrar and wait for "Verified". A subdomain like
mail.yourdomain.comworks well. - Set
FROM_EMAILto an address on that domain, likeSam from Acme <sam@mail.yourdomain.com>, and optionallyREPLY_TO_EMAILto the inbox where you read replies. Restart Debrief. - In Debrief, open Settings → Emails and click Send test. It shows Resend's exact answer.
Resend's shared test sender onboarding@resend.dev only delivers to the email on your Resend account. Customer invites sent from it fail, and Debrief marks them "Not delivered".
Stripe
Connect once and every cancelled subscription gets an interview from you. Takes about two minutes, no code.
- In Stripe, open Developers → API keys → Create restricted key.
- Give it Customers: Read and Webhook Endpoints: Write. Leave everything else as None, then create it.
- In Debrief, open Settings → Stripe, paste the key and click Connect Stripe. Debrief checks the key and adds its webhook (
customer.subscription.deleted) to your Stripe account for you. - Prefer to manage the webhook yourself? Expand Use your own webhook instead for your workspace's URL, and paste the signing secret.
We store the key encrypted and only use it to read the email and name of customers who cancel. Disconnecting removes our webhook from your Stripe.
Slack alerts
- Create a Slack app at api.slack.com/apps → Incoming Webhooks → turn on → Add New Webhook to Workspace → pick a channel.
- Copy the webhook URL (
https://hooks.slack.com/services/…) into Settings → Notifications → Slack in Debrief and save.
AI interviewer
Without an AI key, Debrief asks scripted follow-ups and tags reasons by keyword. With one, follow-ups adapt to each answer, tagging is smarter and Ask Debrief writes full answers.
- Any OpenAI-compatible router:
LLM_API_KEYandLLM_BASE_URL(for example Requesty), optionallyLLM_MODEL. - Or Anthropic directly:
ANTHROPIC_API_KEY.