This is a Convex project created with npm create convex using Resend via the Resend Component.
- Convex as your backend (database, server logic).
- Resend for email sending.
- Resend Component:
- Queueing: Send as many emails as you want, as fast as you want—they'll all be delivered (eventually).
- Batching: Automatically batches large groups of emails and sends them to Resend efficiently.
- Durable execution: Uses Convex workpools to ensure emails are eventually delivered, even in the face of temporary failures or network outages.
- Idempotency: Manages Resend idempotency keys to guarantee emails are delivered exactly once, preventing accidental spamming from retries.
- Rate limiting: Honors API rate limits established by Resend.
- Convex Auth for authentication.
npm install
npm run dev
Set up Convex Auth:
npx @convex-dev/auth
Follow the Resend Component instructions to get started.
In particular, make sure to set the environment variables:
npx convex env set RESEND_API_KEY "<your-api-key>"
Use this to make your webhook url:
npx convex env get CONVEX_SITE_URL
Set the webhook secret:
npx convex env set RESEND_WEBHOOK_SECRET "<your-webhook-secret>"
To log into the app, use the same email domain as you have set up in Resend.
For more information on how to configure Convex Auth, check out the Convex Auth docs.
For more examples of different Convex Auth flows, check out this example repo.
To learn more about developing your project with Convex, check out:
- The Tour of Convex for a thorough introduction to Convex principles.
- The rest of Convex docs to learn about all Convex features.
- Stack for in-depth articles on advanced topics.
Join thousands of developers building full-stack apps with Convex:
- Join the Convex Discord community to get help in real-time.
- Follow Convex on GitHub, star and contribute to the open-source implementation of Convex.
