Skip to main content

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.

convex/launch.test.ts
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

AreaWhat it doesDetails
Rate limitsLimits how often a person, a team or everyone may run a write.Rate limits and audit log
Audit logRecords who ran which action and which rows it changed.Rate limits and audit log
Account deletion and erasureLets people delete their account, then erases their data by your erasure map.Account deletion
Sign-in rate limitsBetter Auth limits sign-in attempts. On by default.Better Auth
Agents housekeepingDeletes 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

NeedUseWhy it matters
Background retriesConvex Workpool or Action Retrier componentA failed email or webhook call is lost.
Multi-step workConvex Workflow componentAn import or onboarding that stops halfway stays half done.
Data migrationsConvex Migrations componentOld rows keep a shape the new code cannot read.
Counts and totalsConvex Aggregate componentCounts get slow as tables grow, or drift from the rows.
BillingConvex 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 deliveryResend component behind the email hookSign-in, reset and invite emails silently fail to arrive.
InvitationsBetter Auth organization pluginInvites never expire, or anyone with a link joins.
Email verificationOn by default for password sign-in; keep it on, or sign in with email codesPeople sign up with addresses they do not own.
Session and device listBetter Auth listSessions / revokeSessionA lost device stays signed in.
Bot protectionCloudflare Turnstile checked on the serverBots create accounts. A widget without a server check stops nothing.
Data regionChoose the region when you create the deployment (EU for EU users); it cannot be changed laterPersonal data sits in the wrong region, and moving it means export and import.
BackupsConvex backups, and test one restoreAn untested backup can fail on the day you need it.
Separate dev and productionSeparate deployments and secretsTest data and test keys reach production.
MonitoringConvex log streams with call eventsYou learn about errors from your users.

This page is a checklist. It does not make an app compliant with any law on its own.