Skip to main content
Auth is handled using better-auth and backend is handled by convex. Schema is in /convex/schema.ts and functions (queries and mutations) are in /convex/. The better-auth api runs on convex api routes, and was set up following this guide.

Development Setup

Run convex dev command to set up locally or cloud

pnpm dlx convex dev

Generate a better auth secret

pnpm convex env set BETTER_AUTH_SECRET=$(openssl rand -base64 32)

Setup client id and secret

Get a client ID and secret from Hack Club
pnpm dlx convex env set HACKCLUB_CLIENT_ID=your_client_id
pnpm dlx convex env set HACKCLUB_CLIENT_SECRET=your_client_secret
(tip: use $(read) so it doesn’t get saved in your shell history)

Set convex site url

Set the EXPO_PUBLIC_CONVEX_SITE_URL variable in .env.local to the .site url for the convex deployment.

Development workflow

Run pnpm start and pnpm dlx convex dev in separate terminals.