TopfT
Convex Communityβ€’4mo agoβ€’
1 reply
Topf

A (somewhat) polished BetterAuth x Convex starter template with (decently) sane defaults

Hey ya'll,

as part of my work for the Hackathon, I decided to take some of the effort I put into the Auth layer and factor it out into an easy to start with Template.

Some things you get out of the box:


- πŸ”‘ Full auth flows (passphrase, magic links, email codes, resets), all wired to Convex with shared schemas so client + server don't drift.

- 🌍 Social sign-in & linking (GitHub, Google, Apple) – just plug in envs and go.

- πŸ›‘οΈ Security helpers built in – zxcvbn passphrase strength meter, Have I Been Pwned plugin (Better Auth does have some neat plugins to say the least), email OTP.

- πŸ“¦ Pre-styled UI using 9ui.dev primitives (think shadcn/ui but with Base UI + Tailwind v4 under the hood); can easily replace with shadcn/ui as they use the same CLI and I will probably improve the setup script to allow choosing between 9ui and shadcn/ui.

- 🚦 Rate limiting & audit trails baked in – destructive ops log to Convex automatically.

- πŸ•ΉοΈ A realtime counter example so you can check Convex queries/mutations are working.

- πŸ“¬ Email preview in dev mode (no setup required – just sends them to console).

- ⏰ Cron job - deletes temporary 24h username holds during verification.

- πŸ“– Readme - An overly verbose readme that explains some decisions I made.

- πŸ₯šEaster eggs - Cause why not?

- βš™οΈ Solid DX: One command to setup everything.


Happy to get some feedback, harsh criticism is always welcome as well. Hope you can get some use out of it.

Here you go: https://github.com/Topfi/BetterAuth-Convex-9ui-shadcn-CLI-
Screenshot_2025-09-22_at_14.17.10.png
GitHub
πŸ” A polished Better Auth + Convex setup with React 19 & Vite. Full auth flows (magic links, OTP, TOTP, social sign-in), strong security, styled UI, & realtime sync. Perfect for MVPs...
GitHub - Topfi/BetterAuth-Convex-9ui-shadcn-CLI-: πŸ” A polished B...
Was this page helpful?