AuthKit Pro is a production-ready authentication CLI for Next.js App Router that scaffolds a complete authentication system in minutes — not hours.
- Preconfigured OAuth providers
- Database integration (Prisma or MongoDB)
- Middleware protection
- Login UI scaffolding
- Type-safe developer experience
npx authkit-pro initAnswer a few prompts and your authentication system is ready.
- Google OAuth
- GitHub OAuth
- Facebook OAuth
- Credentials (Email / Password)
Choose your database during setup:
- PostgreSQL (Prisma ORM)
- MongoDB (Mongoose)
- No database (OAuth only)
- Login Page
- Profile Component
- Sign Out Button
Clean, minimal, production-ready UI.
- Optional route middleware protection
- Secure JWT session handling
- Environment variable auto-generation
- Type-safe configuration
- Built specifically for Next.js App Router
- Fully typed
- Modular provider system
- Config injection support
- Clean folder structure
- CLI-based setup flow
After running:
npx authkit-pro initA .env file is generated automatically.
AUTH_SECRET=your_secret
GOOGLE_CLIENT_ID=your_id
GOOGLE_CLIENT_SECRET=your_secret
GITHUB_CLIENT_ID=your_id
GITHUB_CLIENT_SECRET=your_secret
DATABASE_URL=postgres_connection_string or mongodb_connection_stringAuthKit generates your auth configuration automatically.
// app/api/auth/[...nextauth]/route.ts
import NextAuth from "next-auth";
import { authOptions } from "@/lib/auth";
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };If you choose middleware protection during setup, it will automatically generate:
AuthKit automatically scaffolds:
Auto generated Profile component in @/components/auth/Profile.
Auto generated SignOutButton component in @/components/auth/SignOutButton.
Auto generated Login component in @/app/Login/page.tsx.
Handles logout flow automatically.
(Add your UI screenshots here)
/screenshots/login.png
/screenshots/profile.png
- More OAuth Providers
- CLI Auth Generator
- Theme Customization
- Role-Based Access Control
- Multi-Tenant Support
Contributions are welcome!
git clone repo
npm install
npm run dev1️⃣ Fork 2️⃣ Create branch 3️⃣ Open PR
MIT License
Muhammad Rabbi
Full-Stack Developer focused on frontend systems and developer tooling.
- Scaleable Backend Architecture and Database Integration
- Building UI systems
- Experimenting with AI tooling
- Creating production-ready dev utilities
If you find this project useful:
- Star the repo
- Share with developers
- Contribute ideas
It helps the project grow ❤️