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-
GitHub
GitHub - Topfi/BetterAuth-Convex-9ui-shadcn-CLI-: π A polished B...
π 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...

1 Reply
Setup Video in higher resolution as Github limits Gifs to 10mb: