@adan-ghuman/create-auth-kit
v0.2.9
Published
Scaffold a full-stack auth starter kit with your chosen auth methods
Downloads
912
Maintainers
Readme
create-auth-kit
Skip writing auth from scratch. create-auth-kit scaffolds a full-stack authentication starter with a Next.js frontend and a Fastify backend — wired up, tested, and ready to build on.
You pick which auth methods you want. Everything else is set up for you.
npx @adan-ghuman/create-auth-kitRun with
npx— this is a scaffolding tool, not a library to install.
What you get
A working monorepo with only the auth methods you chose:
- Email + password — register, login, logout, email verification, forgot/reset password
- Google OAuth — sign-in, account linking, conflict detection
- Magic link — passwordless one-click sign-in via email
Plus, regardless of which methods you pick:
- Refresh token rotation with HttpOnly cookies
- Rate limiting on all sensitive routes
- Config-gated UI — disabled methods are fully stripped from routes and pages
- 120 automated tests (API integration + frontend unit)
- Docker Compose with PostgreSQL and Mailpit for local dev (optional)
How it works
Answer three prompts and you're done:
◆ What is your project name?
│ my-app
◆ Which auth methods do you want?
│ ◉ Credentials (email + password)
│ ◉ Google OAuth
│ ○ Magic Link
◆ Include Docker Compose? (PostgreSQL + Mailpit for local dev)
│ Yes
◇ Scaffolding my-app...
◇ Installing dependencies...
◇ Initialising git repo...
✅ Done! Your project is ready at ./my-appThe CLI strips out everything you didn't select — routes, pages, env vars, imports. What's left is a clean codebase with no dead code.
Stack
| Layer | Technology | |---|---| | Frontend | Next.js, Tailwind CSS v4, Radix UI | | Backend | Fastify, Prisma, PostgreSQL | | Auth | JWT + HttpOnly cookies, argon2 | | Email | Nodemailer (Mailpit locally, any SMTP in production) |
After scaffolding
- Fill in your secrets in
apps/api/.env(JWT_SECRET,COOKIE_SECRET, database URL) - If you selected Google OAuth, add your
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET - Start PostgreSQL (via Docker or your own instance)
- Run migrations:
cd apps/api && npx prisma migrate deploy - Start the API:
cd apps/api && npm run dev - Start the web app:
cd apps/web && npm run dev
The CLI prints these steps after scaffolding so you don't have to remember them.
License
MIT
