Introduction
Welcome to Unstack Pro - A complete Next.js authentication and organization management template
Stop building auth. Start building your product.
Unstack Pro is a complete Next.js template with authentication, organizations, and admin fully configured and ready to use. I spent 160 hours perfecting this so you never have to build auth again. Clone it, set your environment variables, and start building your actual product - no auth setup required.
Save 100-200+ hours of development time. Everything from email/password to passkeys to organizations is already configured.
Unstack Pro ships in two editions of the same product. The Postgres edition — PostgreSQL through Drizzle ORM — is the reference edition. The Convex edition is the original, and the one distributed today. Pick yours with the switcher below; the choice is remembered across every page in these docs.
Better Auth runs inside Next.js and talks to PostgreSQL through Drizzle ORM. One environment surface, one dev process, SQL migrations.
Better Auth runs inside Convex. Two environment surfaces, two dev processes, and schema pushed rather than migrated.
What's Already Built
🔐 Authentication (Complete)
All auth is configured and working out of the box:
- Email/password with verification
- OTP (one-time password) login via email
- Passkeys (WebAuthn) with device management
- Two-factor authentication (TOTP) with backup codes
- Password reset flows
- Session management & audit logs
- HIBP password breach detection
- Profile settings with avatar uploads
You don't need to configure any of this. It just works.
🏢 Organizations (Complete)
Multi-tenant B2B system ready to use:
- Create and manage organizations
- Invite and manage members
- Role-based access control (custom RBAC)
- Teams within organizations
- Custom roles and permissions
- Organization-scoped billing through Autumn (per-seat pricing)
Just start using organizations in your product.
👨💼 Admin Panel (Complete)
Fully functional admin dashboard:
- User management
- Ban/unban capabilities
- Role assignment
- Session control
- System statistics
Admin routes are ready at /admin.
🔒 Security (Complete)
Enterprise-grade security built in:
- Passkeys for passwordless auth
- 2FA with TOTP and backup codes
- User audit logs (authentication and account events)
- Session revocation
- Secure account deletion
Security best practices already implemented.
🎨 Tech Stack
Built with modern, scalable technologies:
- Framework: Next.js 16 + React 19 with App Router
- Auth: Better Auth 1.7 with the organization, admin, two-factor, passkey and email-OTP plugins, plus a custom re-authentication plugin
- UI Components: 50+ components (ShadCN/ui on Radix primitives)
- Forms: React Hook Form (optimized for minimal re-renders)
- Styling: Tailwind CSS v4 with dark mode
- Email: Resend with React Email templates
- Billing: Autumn integration (per-seat pricing)
- Monitoring: Sentry ready (optional)
The data layer is the part that differs between editions:
- Database: PostgreSQL through Drizzle ORM, connected with
pg(node-postgres) — any provider works - Auth runtime: Better Auth runs natively inside Next.js on
drizzleAdapter - Data access: Server Components read through
lib/server/*; writes are server actions inactions/*
- Database: Convex, with reactive live queries in the client
- Auth runtime: Better Auth runs inside Convex via kitcn
- Data access: queries, mutations and actions in
convex/
Quick Links
Getting Started
Set up Unstack Pro in minutes
Environment Variables
Configure your environment
Authentication
Learn about auth features
Organizations
Multi-tenant organization system
Admin Panel
Manage users and system
Billing
Per-seat pricing with Autumn
Email Configuration
Transactional emails with Resend
Database Schema
How your data is modelled
Customization
Extend and customize the template
Deployment
Deploy to production
Template Updates
Pull ongoing template fixes with one command
Troubleshooting
Common issues and solutions
FAQ
Frequently asked questions
Why Use Unstack Pro?
Save Weeks of Development
Building auth, organizations, and admin from scratch takes 4-6 weeks. With Unstack Pro, you get it all in 10 minutes.
Focus on Your Product
Stop reinventing authentication. Your time is better spent on features that make your product unique.
Production-Ready Code
Not a tutorial or boilerplate - this is battle-tested, production-quality code you can deploy immediately.
Best Practices Built In
Security, scalability, and performance best practices are already implemented. No need to research "how to do auth right."
The Data Layer Is Already Wired Up
The Drizzle schema, its generated SQL migrations, and typed server-side queries
are all in place. Pages read through lib/server/* and write through server
actions — there is no client data-fetching layer to assemble.
Convex gives you real-time updates across your entire app without any extra
configuration — a useQuery re-renders on its own as the data behind it changes.
Getting Started is Simple
- Clone the repo → Get the complete codebase
- Set environment variables → Just connection strings, no auth config
- Start building → Auth, orgs, and admin already work
That's it. No auth tutorials to follow, no days of setup, no security research.
What You Build
With auth out of the way, you focus on:
- Your unique product features
- Your business logic
- Your user experience
- Your value proposition
Let Unstack Pro handle the foundation. You build what makes your product special.
Next Steps
Head to Getting Started to clone and configure your template in 10 minutes.