Before your app goes live
Check the settings that apps most often forget before the first public launch.
One test checks what apps most often forget. It fails when a function skips the policy, when a table would keep a deleted person's data, when the agents' housekeeping is not scheduled, when a public write has no limit, or when no agent sees a tool. Each problem names its fix. Launch check explains the five checks.
import { launchProblems } from '@lupinum/better-convex-functions/test'
import { expect, test } from 'vitest'
import crons from './crons'
import { fns } from './functions'
import schema from './schema'
import { modules } from './test.setup'
// Catches the mistakes that hurt after launch: a raw Convex function, a table that keeps a
// person's data after they delete their account, housekeeping nobody schedules, a public write
// without a limit, and a tool that no agent sees. Each problem names the fix.
test('the app has no launch problems', async () => {
const trustedRoutes = { '/api/auth/': 'Better Auth endpoints; the auth library checks each one.' }
expect(await launchProblems({ modules, schema, crons, fns, trustedRoutes })).toEqual([])
})What the library does for you
| Area | What it does | Details |
|---|---|---|
| Rate limits | Limits how often a person, a team or everyone may run a write. | Rate limits and audit log |
| Audit log | Records who ran which action and which rows it changed. | Rate limits and audit log |
| Account deletion and erasure | Lets people delete their account, then erases their data by your erasure map. | Account deletion |
| Sign-in rate limits | Better Auth limits sign-in attempts. On by default. | Better Auth |
| Agents housekeeping | Deletes old agent data: activity after a year, decided requests after 90 days, finished runs after 30 days. | The MCP door |
What you set up yourself
| Need | Use | Why it matters |
|---|---|---|
| Background retries | Convex Workpool or Action Retrier component | A failed email or webhook call is lost. |
| Multi-step work | Convex Workflow component | An import or onboarding that stops halfway stays half done. |
| Data migrations | Convex Migrations component | Old rows keep a shape the new code cannot read. |
| Counts and totals | Convex Aggregate component | Counts get slow as tables grow, or drift from the rows. |
| Billing | Convex Polar or Stripe component (their Better Auth plugins are not supported) | A missed payment event leaves a paying customer without access, or the reverse. |
| Transactional email delivery | Resend component behind the email hook | Sign-in, reset and invite emails silently fail to arrive. |
| Invitations | Better Auth organization plugin | Invites never expire, or anyone with a link joins. |
| Email verification | On by default for password sign-in; keep it on, or sign in with email codes | People sign up with addresses they do not own. |
| Session and device list | Better Auth listSessions / revokeSession | A lost device stays signed in. |
| Bot protection | Cloudflare Turnstile checked on the server | Bots create accounts. A widget without a server check stops nothing. |
| Data region | Choose the region when you create the deployment (EU for EU users); it cannot be changed later | Personal data sits in the wrong region, and moving it means export and import. |
| Backups | Convex backups, and test one restore | An untested backup can fail on the day you need it. |
| Separate dev and production | Separate deployments and secrets | Test data and test keys reach production. |
| Monitoring | Convex log streams with call events | You learn about errors from your users. |
This page is a checklist. It does not make an app compliant with any law on its own.